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. 

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

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 ) 

560x95_FFFFFF_FF9900_000000_000000.png
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

Posted

El script que Cocodrilo posteo es lo mismo que el tuyo, no veo la razon por la cual era necesario que vos pusieras lo mismo.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

  • Recently Browsing   0 members

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