
mcer
Members-
Posts
145 -
Joined
-
Last visited
Everything posted by mcer
-
Don't work and no errors in Debugscript.
-
I want it for serverside, But idk how.
-
Look (Clientside). addEventHandler('onClientResourceStart',resourceRoot, function () Shocking1() end ) function Shocking1() setTimer ( function ( ) local anim = {getPedAnimation( localPlayer )} if getElementHealth ( localPlayer ) <= 20 then if not ( anim[1] == "crack" and anim[2] =="crckidle1" ) then addEventHandler("onClientRender", getRootElement(), ShockWinGui) setPedAnimation ( localPlayer, "crack", "crckidle1", -1, true, true, false ) end else if ( anim[1] == "crack" and anim[2] == "crckidle1" ) then setPedAnimation( localPlayer, false) removeEventHandler("onClientRender", getRootElement(), ShockWinGui) end end end,500,0 ) end It set the anim only for the client... The other players can't see it.
-
Sourceplayer = Localplayer?
-
function LowBloodAnim() local getplayer = getPlayerName(sourcePlayer) if getElementHealth ( sourcePlayer ) <= 20 then if not ( anim[1] == "crack" and anim[2] =="crckidle1" ) then setPedAnimation ( sourcePlayer, "crack", "crckidle1", -1, true, true, false ) end end end It's serverside.
-
Read this (Have how to make a login GUI). https://wiki.multitheftauto.com/wiki/In ... ipting_GUI
-
Look this too (Forum tutorials): https://forum.multitheftauto.com/viewforum.php?f=148
-
This youtube channel have some tutorials https://www.youtube.com/user/MrAlienCode/videos
-
The wiki have tutorials...
-
See the examples: https://wiki.multitheftauto.com/wiki/TriggerServerEvent
-
Don't worry, Is there a mistake?
-
Serverside ( In line 3, edit "Acount Name Here" ). function VehicleAccolor () local PlayerbyAccount = getAccountPlayer ( Acount Name Here ) local Vehicle = getPedOccupiedVehicle( PlayerbyAccount ) if ( getElementType ( PlayerbyAccount ) == "player" ) then setVehicleColor( Vehicle, 0, 0, 0 ) end end addEventHandler ( "onVehicleEnter", getRootElement(), VehicleAccolor )
-
Let me edit this to serverside.
-
Example (Not Tested): function Colorbyplayer() local PlayerNames = getPlayerName(getLocalPlayer()) if isPedInVehicle( getLocalPlayer() ) then if PlayerNames == "Reflex" then local Vehicle = getPedOccupiedVehicle( getLocalPlayer() ) if Vehicle then setVehicleColor( Vehicle, 0, 0, 0 ) end end end end addEventHandler( "onClientRender", rootElement, Colorbyplayer )
-
Why?, I mean this: Here u can call the function with "Example()" or use CallServerFunction or CallClientFunction function Example() spawnPlayer ..... end if u use an Event u need to use triggerClientEvent or triggerServerEvent What is the difference?
-
Trigger an event is the same at call one function?
-
Copy that in Clientside script. I think this going to work: callServerFunction(":ResourceName/Function")
-
Look if "site" resource is started. https://wiki.multitheftauto.com/wiki/Filepath
-
It's possible use " : " in the Dir?.
-
eso no tiene sentido. onClientRender es Client, y le estas dando argumentos a setWeapon del serverside. intenta esto function iWeapons() setWeaponAmmo ( source, 34, 9999 ) -- 34 es la ID de la M4 end addEventHandler("onPlayerSpawn",getRootElement(),iWeapons) El codigo es serverside y aca te dejo las ID de las armas https://wiki.multitheftauto.com/wiki/Weapon No se si estes enterado que esta funcion es Clientside tambien...
-
Asi: Clientside: function infiniteAmmo() setWeaponAmmo( ID del arma,99) end addEventHandler ( "onClientRender", root, infiniteAmmo )