Jump to content

Destruir vehiculo


Destroyer.-

Recommended Posts

Posted
addCommandHandler -- Para agregar el comando 
getPedOccupiedVehicle -- Para obtener el vehiculo de un jugador. 
blowVehicle -- Para explotar el vehiculo. 

Posted
addCommandHandler -- Para agregar el comando 
getPedOccupiedVehicle -- Para obtener el vehiculo de un jugador. 
blowVehicle -- Para explotar el vehiculo. 

hice esto pero no me funciona, sorry es que soy nuevo xD

function showVehicledestroy (  ) 
  vehicles = getElementsByType ( "vehicle" ) 
for vehicleKey, vehicleValue in ipairs(vehicles) do 
    blowVehicle ( vehicleValue ) 
end 
end 
addCommandHandler ( "destroy", showVehicledestroy ) 

Posted

Server side:

function dest ( thePlayer ) 
  local theVeh = getPedOccupiedVehicle ( thePlayer ) 
    if theVeh then 
      destroyElement ( theVeh ) 
    end 
end 
addCommandHandler ( "de", dest ) 

Posted
function destruir ( jugador ) 
      local auto = getPedOccupiedVehicle ( jugador ) 
        if auto then 
          destroyElement ( auto ) 
        end 
    end 
    addCommandHandler ( "auto", destruir ) 

Ya probe el script y funciona perfectamente, el commandhandler es /auto, puedes cambiarselo si quieres

PD: es la primera vez que publico algo ayudando xD

el script debe ir en el server side, ya que si lo pones en el client no te funcionara

  • Recently Browsing   0 members

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