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 )
Castillo Posted May 1, 2013 Posted May 1, 2013 No te aconsejo usar timers, no son muy eficientes, usa getTickCount.
Recommended Posts