24.08.2014, 13:31
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.
like that..
should I add anything to onvehicledeath ?
Thank you in advance.
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_ID) DestroyVehicle(Veh[playerid][VehId]);
should I add anything to onvehicledeath ?
Thank you in advance.