joukuna Posted February 5, 2008 Author Posted February 5, 2008 i save car spawn in lua. how i can make re spawn when they EXLODE
heavy air Posted February 15, 2008 Posted February 15, 2008 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 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
heavy air Posted February 15, 2008 Posted February 15, 2008 sorry if sounds dumb but whats code display
norby89 Posted February 15, 2008 Posted February 15, 2008 sorry if sounds dumb but whats code display use these tags when posting scripts ][[/color]/code]
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now