MrXz Posted August 19, 2012 Share Posted August 19, 2012 Hola amigos!, Como puedo cancelar un comando ya hecho, por ejemplo pongo /nextmap, como haría para cancelar dicho comando, se los agradecería mucho Link to comment
Arsilex Posted August 19, 2012 Share Posted August 19, 2012 cancelarlo para un s.mod mod o dices general? Link to comment
Arsilex Posted August 19, 2012 Share Posted August 19, 2012 tienes que buscar el comando si quieres te puede decir donde se encuentra. para mi la solucion mas facil es entrar en racevoting_server ((En mi caso Linea 691 y cambiar el comando nextmap por algo que no se suele poner ejemplo /asdasdasd Link to comment
MrXz Posted August 19, 2012 Author Share Posted August 19, 2012 (edited) Solo quiero cancelar el comando, no cambiarlo, estoy haciendo un 'UnbuyMap' y pues al comprar un mapa ejecuta un comando, ahora lo que quiero lograr es cancelar dicho comando para que se devuelva el dinero. PD: Puedo usar "removeCommandHandler" ? Edited August 19, 2012 by Guest Link to comment
Castillo Posted August 19, 2012 Share Posted August 19, 2012 No hay que editar nada, cancelas el evento: onPlayerCommand con cancelEvent. addEventHandler ( "onPlayerCommand", root, function ( command ) if ( command == "nextmap" ) then cancelEvent ( ) end end ) Link to comment
MrXz Posted August 19, 2012 Author Share Posted August 19, 2012 (edited) Justo encontre el "removeCommandHandler" en la wiki, gracias Solid ! Cierre el tema porfavor. Edited August 19, 2012 by Guest Link to comment
Arsilex Posted August 19, 2012 Share Posted August 19, 2012 aver cuando tu seteas un mapa el comando no es nextmap es setmap por si no sabias Link to comment
MrXz Posted August 19, 2012 Author Share Posted August 19, 2012 Ok, de igual manera gracias pekio. Link to comment
Castillo Posted August 19, 2012 Share Posted August 19, 2012 Justo encontre el "removeCommandHandler" en la wiki, gracias Solid ! Cierre el tema porfavor. De nada. Link to comment
MrXz Posted August 19, 2012 Author Share Posted August 19, 2012 verdad se me olvidaba preguntar, como haria para hacer esto con un comando addEventHandler ( "onPlayerCommand", root, function unbuy ( command ) if ( command == "nextmap" ) then cancelEvent ( ) end end ) addCommandHandler ( "unbuymap", unbuy ) Link to comment
Alexs Posted August 19, 2012 Share Posted August 19, 2012 verdad se me olvidaba preguntar, como haria para hacer esto con un comando addEventHandler ( "onPlayerCommand", root, function unbuy ( command ) if ( command == "nextmap" ) then cancelEvent ( ) end end ) addCommandHandler ( "unbuymap", unbuy ) eso carece de sentido, y creo que no es lo que necesitas para lo que buscas. Link to comment
MrXz Posted August 19, 2012 Author Share Posted August 19, 2012 Ahora si cierren porfavor, ya lo solucione Link to comment
Recommended Posts