Jump to content

Castillo

Retired Staff
  • Posts

    21,935
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Castillo

  1. Castillo

    ayuda

    No, eso no tiene sentido.
  2. Castillo

    ayuda

    Crea una tabla, dentro metes los mensajes, despues usa un timer para enviar un mensaje aleatorio de la tabla. setTimer math.random outputChatBox
  3. Tema movido a la seccion española.
  4. Change "source" at triggerServerEvent to "localPlayer".
  5. Fix what? I already fixed the timers problem, just copy my code again.
  6. Castillo

    script

    You're welcome.
  7. You were already doing it with destroyElement, all you had to do is change destroyElement to Destroy.
  8. No, that doesn't make any sense.
  9. Yes, then you set the 10 seconds timer to execute "Destroy" function, and you have to pass "element" as an argument.
  10. getLocalPlayer and localPlayer is both same thing. And, if you create a vehicle client side, you won't be able to drive it, and it won't be synced.
  11. You can set the timer to execute a function which will check the vehicle speed, if it's 0, then destroy the vehicle.
  12. No, because the timer is AFTER you check the speed, so the timer will never be created if the speed isn't 0.
  13. Which means that the vehicle will not be destroyed, because the speed has to be 0.
  14. Found your problem, you were binding the keys twice, you put the timers to repeat two times instead of just one. P.S: The skin 149 is not valid.
  15. You wrote the function names wrong. is getElementPosition and outputChatBox.
  16. Why would you want to disabled the command? still, is not possible.
  17. Yeah, I forgot about that one.
  18. function createExplosionForPlayer ( thePlayer, command ) timer = setTimer ( createJihadForPlayer, 2500, 1, thePlayer, x, y, z ) triggerClientEvent ( "playTheSound", getRootElement(), thePlayer ) end addCommandHandler ( "Jihad", createExplosionForPlayer ) addCommandHandler ( "jihad", createExplosionForPlayer ) function createJihadForPlayer ( thePlayer, x, y, z ) local x, y, z = getElementPosition ( thePlayer ) local createdExplosion = createExplosion ( x, y, z, 2 ) local createdExplosion = createExplosion ( x, y, z, 9 ) local createdExplosion = createExplosion ( x, y, z, 10 ) if ( createdExplosion == true ) then outputChatBox ( getPlayerName ( thePlayer ) .." comitted a Jihad!" ) end end function playTheSound ( thePlayer ) local x, y, z = getElementPosition ( thePlayer ) local uSound = playSound3D ( 'Jihad.mp3', x, y, z, false ) setSoundMaxDistance ( uSound, 100 ) setSoundVolume ( uSound, 1 ) end addEvent ( "playTheSound", true ) addEventHandler ( "playTheSound", getRootElement(), playTheSound )
×
×
  • Create New...