Jump to content

Spawn Car


Recommended Posts

  • 1 month later...

--SERVER-SIDE :

--------------------------------------------------- 
 --Configuraciones-- 
  
 Acl = "viptitan" 
 Id_Vehiculo = 411 -- infernus 
 Motores = 2 
 Ruedas = 4 
 Tanque_De_Gas = 1 
 Gasolina = 150 
 Tiempo_De_Uso = 600000 -- en milisegundos 
  
 -------------------------------------------------- 
  
  
 function autovip( thePlayer,veh,seat,jacked ) 
   local Cuenta = getAccountName ( getPlayerAccount ( thePlayer ) )  
  if isObjectInACLGroup ("user."..Cuenta, aclGetGroup ( Acl ) ) then  
    local x, y, z = getElementPosition ( thePlayer ) 
    local theVehicle = getPedOccupiedVehicle ( thePlayer ) 
        veh = createVehicle(Id_Vehiculo,x+1,y,z) 
        vehCol = createColSphere(x+1,y,z,2) 
        attachElements ( vehCol, veh, 0, 0, 0 ) 
        setElementData(vehCol,"parent",veh) 
        setElementData(veh,"parent",vehCol) 
        setElementData(vehCol,"vehicle",true) 
        setElementData(vehCol,"MAX_Slots",300) 
        setElementData(vehCol,"Tire_inVehicle",Ruedas) 
        setElementData(vehCol,"Engine_inVehicle",Motores) 
        setElementData(vehCol,"Parts_inVehicle",Tanque_De_Gas) 
        setElementData(vehCol,"fuel",Gasolina) 
        setVehicleDamageProof(veh, true) 
        addVehicleUpgrade ( theVehicle, 1010 ) 
        outputChatBox("#545454Yo " ..getPlayerName ( thePlayer )..  " #545454he sacado un auto vip [30 Minutos]!", thePlayer,250,0,0,true) 
        setTimer ( function()destroyElement(veh)destroyElement(vehCol)destroyElement(carblib) end,Tiempo_De_Uso , 1 ) 
    else 
    outputChatBox("Usted deve ser [VIP Full] para sacar el Auto o Carro, hable con Admin [D]eath!", thePlayer,84,84,84,true)    
    end 
     
end 
addCommandHandler("auto", autovip)  

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

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