Car back to old spawn position.
#1

hello,

i need script code, car back to respawn position on ~10min, please HELP. Sorry for bad english language.
Reply
#2

AddStaticVehicleEx(modelid, Floatpawn_x, Floatpawn_y, Floatpawn_z, Float:z_angle, color1, color2, respawn_delay);

where respawn_delay = 600 secs = 10min

i think its if a cars taken and left somewhere and respawn_delay passes then it goes back where it came from
Reply
#3

Not working, can you script code i can insert in GM.
Reply
#4

lol dude, it should work :
pawn Код:
AddStaticVehicleEx(modelid, X, Y, Z, Z_angle, color 1, color 2, respawn delay);

Example :
public OnGameModeInit()
{
 AddStaticVehicleEx(522, 1349.53125, -1050.8861083984, 26.242525100708, 356.03002929688, -1, -1, 60*10);
 return 1;
}
Which means, its NRG, somewhere in LS near ammunation store and will respawn in 10 minutes.
Reply
#5

Not working, i using a GRP mod, not working. I need script. When you get out of the car you get messege when car destroy after 10min.
Reply
#6

60*10 only equals 0.6 seconds, do 1000*60*10.

The car only respawns if it's idle. As soon as you enter it again the timer gets reset.
Reply
#7

Autorespawn system

In top of you script
pawn Код:
forward RespawnAuto();
OnGameModeInit
pawn Код:
SetTimer("RespawnAuto",TIMEOFRESPAWN,1);
At finish of you script
pawn Код:
public RespawnAuto()
{
for(new i = 0; i < MAX_VEHICLES; i++)
{
SetVehicleToRespawn(i);
}
}


P.S You request is autorespawn of car ?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)