maauroo Posted June 11, 2012 Posted June 11, 2012 Hola.. Tengo Un Zonadm y Me Gustaria Bloquear Algunos Comandos O Teleport Para Que No Alla Problemas.¿Como Lo Puedo Hacer ? En ZonaDm Tiene El Cmd /salirdm. Entonse Cuando Uno Esta Dentro De Dm, No Puede Usar Comandos, Tendra Que Salir De Zona Dm. Se Entiende? Aqui Unos De Los Teleport Y El De /salirdm: addCommandHandler ( "salirdm", function ( thePlayer ) if ( jugadoresEnDM [ thePlayer ] ) then setElementInterior ( thePlayer, unpack ( jugadoresEnDM [ thePlayer ] ) ) jugadoresEnDM [ thePlayer ] = nil end end ) function aerols ( hitPlayer, commandName, posX, posY, posZ ) if isPlayerInVehicle (hitPlayer) then setElementPosition (getPlayerOccupiedVehicle (hitPlayer),1505.0350,-2616.3782,13.5469) else setElementPosition ( hitPlayer,1505.0350,-2616.3782,13.5469) end end addCommandHandler ( "aerols", aerols )
Plate Posted June 11, 2012 Posted June 11, 2012 creo que para bloquear comandos esto sirve addEventHandler ( "onPlayerCommand", root, function( cd ) if ( cd == 'kill' ) then cancelEvent() end end ) addEventHandler("onResourceStart", getRootElement(), cancelar) creo es un ejemplo para cancelar el kill Visita Full GameZ DayZ Mod Server IP: mtasa://158.69.125.144:29015
iFoReX Posted June 11, 2012 Posted June 11, 2012 y para que pones el evento onResourceStart ?, ademas la funcion cancelar no existe u.u elMota/elFoReX De Vuelta En MTA *---------* Cuenta De Youtube En La Que Subo Tutoriales Acerca De MTA :3 https://www.youtube.com/user/KillersGPs
Plate Posted June 11, 2012 Posted June 11, 2012 a mi me funciona ElMota Visita Full GameZ DayZ Mod Server IP: mtasa://158.69.125.144:29015
Castillo Posted June 11, 2012 Posted June 11, 2012 Claro que va a funcionar, pero vas a tener un error en el debug script diciendo que la funcion "cancelar" no existe, ademas de que ese evento no deberia estar ahi. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Plate Posted June 11, 2012 Posted June 11, 2012 esos comandos me los pasaron cuando ElMota (que le agredesco)me paso un script Visita Full GameZ DayZ Mod Server IP: mtasa://158.69.125.144:29015
maauroo Posted June 11, 2012 Author Posted June 11, 2012 No Funciona.. Lo Que Intento Decir Es Por Ejemplo: Voy A /zonadm.. Me Aburri.. Intento Ir A /sanfierro Pero No Me Deja Porque Esta Bloqueado,Primero Debo Salir, Pondre /salirdm. Se Entiende? Osea Bloquear Para Que Nadie Pueda Sacar Las Armas Del Dm Que Estaba. ¿Se Entendio?
Recommended Posts