SA-MP Forums Archive
Vehicle destroying - 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)
+--- Thread: Vehicle destroying (/showthread.php?tid=491969)



Vehicle destroying - VD1337 - 01.02.2014

So, I made some dynamic vehicle renting system and I wanted it to destroy vehicle when you leave, but it doesn't work that way. Maybe anyone could help me with that please?

Here is code which I added to OnPlayerDisconnect:


Код:
if(HireCar[playerid] != 999)
	{
	DestroyVehicle(HireCar[playerid]);
	HireCar[playerid] = 999;
        }