SA-MP Forums Archive
Weird vehicle_id conflicting bug [+REP] - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Server (https://sampforum.blast.hk/forumdisplay.php?fid=6)
+--- Forum: Server Support (https://sampforum.blast.hk/forumdisplay.php?fid=19)
+--- Thread: Weird vehicle_id conflicting bug [+REP] (/showthread.php?tid=533420)



Weird vehicle_id conflicting bug [+REP] - Aasim - 24.08.2014

So basically, after a while of playing on my server, some players start conflicting with eachother, it's usually between 2 id's.

Like, player id X uses /car nrg and then player Y uses /car nrg and because I only allow 1 car per player, player X loses his vehicle for some reason.

Even tho I set the variable to invalid_vehicle_id on everywhere after destroying it.

Here's the code for /car and /v

http://hastebin.com/renodomite.tex

I hope someone can help me.

Also I'm reseting the variable onplayerdisconnect.

PHP Code:
if(Veh[playerid][VehId] != INVALID_VEHICLE_IDDestroyVehicle(Veh[playerid][VehId]); 
like that..

should I add anything to onvehicledeath ?

Thank you in advance.