Jump to content

Como Bloqueo? (Comandos-Teleport)


maauroo

Recommended Posts

Posted

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  ) 
  

Posted

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

Posted

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.

Posted

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?

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...