SA-MP Forums Archive
Vehicles dissapear with this code - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Vehicles dissapear with this code (/showthread.php?tid=66006)



Vehicles dissapear with this code - Henrix - 18.02.2009

Hi.
I need some help.
I want vehicles when someone exit it to respawn back, but not immediately.

I got this now

Код:
public OnPlayerExitVehicle(playerid, vehicleid)
{
	new currentveh;
 	currentveh = GetPlayerVehicleID(playerid);
 	SetVehicleToRespawn(currentveh);
	return 1;
}
Код:
public OnGameModeInit()
SetTimer("OnPlayerExitVehicle",300000,false);
How can i fix this so it'll spawn back after 5 min?


+ This isn't a good code, because cars dissapear also when someone is still in it.
The best would be that someone helps me with a total script for Respawning a car after some time.

And the thing is, i'm using Taxi vehicle streamer, so i can't use AddStaticVehicleEx for respawn_delay.


Re: Vehicles dissapear with this code - Joe Staff - 18.02.2009

Try AddStaticVehicleEx