Javier Posted April 30, 2013 Posted April 30, 2013 Hola amigos, Tengo una duda de como hacer esto: Cuando un player ponga un determinado comando, Como le hago para que cada sierto tiempo pueda volver a escribirlo? Es decir, vuelva a funcionar el commando. Gracias.
Alexs Posted April 30, 2013 Posted April 30, 2013 Te dejo un ejemplo simple: local heCan = true addCommandHandler( "sanar", function ( thePlayer ) if heCan then setElementHealth( thePlayer, 100) heCan = false setTimer( function() heCan = true end, 2000, 1 ) end end ) Developer @ MYVAL
Castillo Posted May 1, 2013 Posted May 1, 2013 No te aconsejo usar timers, no son muy eficientes, usa getTickCount. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Recommended Posts