-
Posts
4,121 -
Joined
-
Last visited
-
Days Won
2
Everything posted by Kenix
-
https://wiki.multitheftauto.com/wiki/Scr ... troduction viewtopic.php?f=148&t=40809 Also what is it???!! S.W.A.T = createTeam ( "S.W.A.T", 255, 255, 255 ) You can not call as a variable name. Your should create like this: Example S = { W = { A = { } } } S.W.A.T = createTeam ( "S.W.A.T", 255, 255, 255 ) print( S.W.A.T ) --> userdata You need learn lua.
-
setWeaponProperty is server side function. But you use in client side And also event onPlayerWasted is server side event, but you use in client side. Your code full wrong. Also you need attach handler to function at the bottom of the script. You need understand: Server side events ( onPlayerWasted, onPlayerSpawn, ... ) use only in server side. Client side events ( onClientPlayerWasted, onClientPlayerSpawn, ... ) use only in client side. Same thing with the functions ( There are exceptions, where you can use on the server and the client too ). https://wiki.multitheftauto.com/wiki/Scr ... troduction
-
/debugscript 3? https://wiki.multitheftauto.com/wiki/Debugging
-
function fOnScroll( ) local scrollvolume = guiScrollBarGetScrollPosition ( scrolll ) if scrollvolume > 0 and scrollvolume < 20 then startA( ) elseif scrollvolume > 20 and scrollvolume < 40 then startB( ) elseif scrollvolume > 40 and scrollvolume < 60 then startC( ) elseif scrollvolume > 60 and scrollvolume < 80 then startD( ) elseif scrollvolume > 80 and scrollvolume < 100 then startE( ) end end addEventHandler( "onClientGUIScroll", root, fOnScroll ) Условия неверные были. viewtopic.php?f=141&t=32458
-
No problem. I'm always glad to help.
-
function fMain( ) -- You:execute function I am:Define function local nVar = 1 -- You:the value = 1 I am:Define number variable with value 1 if nVar == 0 then -- You:check if it has been changed return false -- You:it will not return to this function I am:It return false. end return true -- You:execute function again? I am:It return true end print( fMain( ) -- You:Output:true -- output ??? I am:It output returned value by function fMain. So it output true. ) -- Also i said if you use operator 'return' it quit from function. Say me if you not understand something.
-
Function fTest return number value 1. P.S I update last post.
-
function fTest( ) return 1 end function fCheck( nValue ) if nValue == 1 then return 'False' end return 'True' end nValue = fTest( ) -- We call function fTest and function return number 1. print( fCheck( nValue ) --Call function fCheck with argument variable nValue ( number 1 ). ) --> output: False You mean it? Read all comments. Also what i forgot say. if you use operator 'return' then you out of function or something. Example function fMain( ) local nVar = 1 if nVar == 0 then return false end return true end print( fMain( ) -- Output:true ) Also do if true then return end print 'false' end Not output anything.
-
viewtopic.php?f=108&t=24262&hilit=textlib Download http://www.mediafire.com/?o3ndd7jtf8gqf54
-
setTimer ( destroyElement(wdwWarning) wdwWarning = false, 2600, 1) --Таймер по которому должно закрыться Может быть? setTimer ( function( wdwWarning ) destroyElement( wdwWarning ) end, 2600, 1, wdwWarning ) -- На вики написано, что 1 аргумент это функция, которая вызывается через промежуток времени ( который ты задал в аргументах ). В этой функции и делай что нужно.
-
https://wiki.multitheftauto.com/wiki/Int ... ng_the_GUI
-
It example working. It's client side. https://wiki.multitheftauto.com/wiki/Scr ... troduction
-
Try test with development mode. https://wiki.multitheftauto.com/wiki/SetDevelopmentMode
-
Copy again. I did think you need it Anyway you yourself can change arguments in function showPlayerHudComponent.
-
local uTimer function fDamage ( ) showPlayerHudComponent ( "health", true ) showPlayerHudComponent ( "armour", true ) if isTimer( uTimer ) then killTimer( uTimer ) end uTimer = setTimer( function( ) showPlayerHudComponent ( "health", false ) showPlayerHudComponent ( "armour", false ) end, 5000, 1 ) end addEventHandler ( "onClientPlayerDamage", localPlayer, fDamage ) I think you mean it ^^ So onPlayerDamage is server side event and you use showPlayerHudComponent with client side arguments.
-
Server local uRadar = createRadarArea( -466.317, -468.559, -150, -90, 255, 255, 0, 175 ) local uRectangle = createColRectangle( -466.317, -468.559, -150, -90 ) function fColshapeManager ( uElement, bDim ) if getElementType( uElement ) == 'player' then outputChatBox( eventName == 'onColShapeHit' and 'You entered the zone. Welcome!' or eventName == 'onColShapeLeave' and 'You left the zone. Bye bye!', uElement, 0, 255, 0 ) end end addEventHandler ( 'onColShapeHit', uRectangle, fColshapeManager ) addEventHandler ( 'onColShapeLeave', uRectangle, fColshapeManager )
-
Report about it in bug tracker.
-
How to Make Gate Opened Only when Group Member are near that
Kenix replied to Jokeℝ1472771893's topic in Scripting
Also https://wiki.multitheftauto.com/wiki/GetPlayerTeam https://wiki.multitheftauto.com/wiki/CreateTeam -
Buke, You need show all where you create/change code ( not show all code ).
-
[RHD]ReFleX, Read viewtopic.php?f=148&t=40809
-
addEventHandler( "onPlayerLogin", root, function( ) outputChatBox( getPlayerName( source ):gsub( '#%x%x%x%x%x%x', '' ) .." has logged in!" ) end ) addEventHandler( "onPlayerLogout", root, function( ) outputChatBox( getPlayerName( source ):gsub( '#%x%x%x%x%x%x', '' ) .." has logged out!" ) end )
-
<meta> <info author="ReFleX" type="script" name="Logged" version="1.0.3" /> <script src="Logged.lua" /> </meta> Because onPlayerLogin and onPlayerLogout is server side events.
-
Show meta.xml. Also why you define 2 times variable root? root is predefined variable viewtopic.php?f=91&t=39678
-
https://wiki.multitheftauto.com/wiki/Scr ... troduction https://wiki.multitheftauto.com/wiki/Int ... ng_the_GUI