Anyelberth Posted July 31, 2013 Share Posted July 31, 2013 Hola, Cuales Serian Las Funciones Para Hacer Que Las Armas Que tengas a Mano, No Funcionen Cuando Colocas un comando por ejemplo /stoppoder Link to comment
Castillo Posted July 31, 2013 Share Posted July 31, 2013 Podes desactivar el control para disparar usando toggleControl. Link to comment
Anyelberth Posted July 31, 2013 Author Share Posted July 31, 2013 Seria Algo Como Esto: function fire() toggleControl ( source, "fire", true ) end addCommandHandler( "fire", fire) Pero Como aria para que cuando Ejecute /fire automaticamente se ejecute para todos tambien? Link to comment
Arsilex Posted July 31, 2013 Share Posted July 31, 2013 function fire() for key, value in pairs( getElementsByType("player")) do toggleControl ( value , "fire", true ) end end addCommandHandler( "fire", fire) Link to comment
Castillo Posted July 31, 2013 Share Posted July 31, 2013 El no dijo que queria desactivarlas para todos, sino para el que usa el comando. function fire ( thePlayer ) toggleControl ( thePlayer, "fire", false ) end addCommandHandler ( "fire", fire ) Link to comment
Anyelberth Posted July 31, 2013 Author Share Posted July 31, 2013 El no dijo que queria desactivarlas para todos, sino para el que usa el comando. function fire ( thePlayer ) toggleControl ( thePlayer, "fire", false ) end addCommandHandler ( "fire", fire ) Si lo dije, Lo que paso fue que entendiste mal, lo que queria decir era que si yo coloco el comando, se me balla el fire a mi y a todos... Link to comment
Castillo Posted July 31, 2013 Share Posted July 31, 2013 function fire ( ) for key, value in ipairs ( getElementsByType ( "player" ) ) do toggleControl ( value, "fire", false ) end end addCommandHandler ( "fire", fire ) Usa eso entonces, pero igual no desactivara solo para la que esten usando, ya que para eso necesitas algo mas sofisticado. Link to comment
Anyelberth Posted July 31, 2013 Author Share Posted July 31, 2013 Me Sale bad Argument @ toggleControl EDIT: Lo tenia en Client Side, Aora lo tengo en Server Side y si funciona gracias Link to comment
Recommended Posts