Jump to content

mcer

Members
  • Posts

    145
  • Joined

  • Last visited

Everything posted by mcer

  1. Don't work and no errors in Debugscript.
  2. I want it for serverside, But idk how.
  3. 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.
  4. Sourceplayer = Localplayer?
  5. 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.
  6. Read this (Have how to make a login GUI). https://wiki.multitheftauto.com/wiki/In ... ipting_GUI
  7. Look this too (Forum tutorials): https://forum.multitheftauto.com/viewforum.php?f=148
  8. This youtube channel have some tutorials https://www.youtube.com/user/MrAlienCode/videos
  9. The wiki have tutorials...
  10. See the examples: https://wiki.multitheftauto.com/wiki/TriggerServerEvent
  11. Don't worry, Is there a mistake?
  12. 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 )
  13. Let me edit this to serverside.
  14. mcer

    A Question.

    Ok, thanks!.
  15. 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 )
  16. mcer

    A Question.

    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?
  17. mcer

    A Question.

    Trigger an event is the same at call one function?
  18. Copy that in Clientside script. I think this going to work: callServerFunction(":ResourceName/Function")
  19. mcer

    [HELP] Image

    Look if "site" resource is started. https://wiki.multitheftauto.com/wiki/Filepath
  20. mcer

    [HELP] Image

    It's possible use " : " in the Dir?.
  21. 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...
  22. mcer

    HUD

    Y usa esto tambien: function ShowCross() showPlayerHudComponent ( source, "crosshair", true ) end addEventHandler ( "onClientRender", getRootElement(), ShowCross )
  23. Asi: Clientside: function infiniteAmmo() setWeaponAmmo( ID del arma,99) end addEventHandler ( "onClientRender", root, infiniteAmmo )
×
×
  • Create New...