Jump to content

Respawn


joukuna

Recommended Posts

  • 2 weeks later...

i use the BROPH and FR resources

the createvehicle function in the script has toggleVehicleRespawn in it but im not sure if thats what makes them respawn

probably worth a l :roll: k though

hope it helps

function consoleCreateVehicle ( player, commandName, first, second, third )

if ( player ) then

local id, x, y, z, r, d = 0, 0, 0, 0, 0, 5

local plate = false

r = getPlayerRotation ( player )

x, y, z = getElementPosition ( player )

x = x + ( ( math.cos ( math.rad ( r ) ) ) * d )

y = y + ( ( math.sin ( math.rad ( r ) ) ) * d )

if ( third ) then

id = getVehicleIDFromName ( first .. " " .. second )

plate = third

elseif ( second ) then

if ( getVehicleIDFromName ( first .. " " .. second ) ) then

id = getVehicleIDFromName ( first .. " " .. second )

else

id = getVehicleIDFromName ( first )

if ( not id ) then

id = tonumber ( first )

end

plate = second

end

else

id = getVehicleIDFromName ( first )

if ( not id ) then

id = tonumber ( first )

end

end

local veh = false

if ( plate == false ) then

veh = createVehicle ( id, x, y, z, 0, 0, r )

--toggleVehicleRespawn ( veh, false ) --------------------- HERE :!:

else

veh = createVehicle ( id, x, y, z, 0, 0, r, plate )

--toggleVehicleRespawn ( veh, false ) --------------------- HERE :!:

end

if ( veh == false ) then outputConsole ( "Failed to create vehicle.", player ) end

end

end

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...