Javier Posted April 30, 2013 Share 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. Link to comment
Alexs Posted April 30, 2013 Share 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 ) Link to comment
Castillo Posted May 1, 2013 Share Posted May 1, 2013 No te aconsejo usar timers, no son muy eficientes, usa getTickCount. Link to comment
Recommended Posts