28.07.2012, 19:05
I'm having a problem where vehicle IDs get mixed up (well I think so). It just came to me that when you create a vehicle that's stored in an array, then destroy the vehicle, the vehicle ID would still be in that array (then maybe later, cause conflicts)
Example:
Does the function "DestroyVehicle" ONLY remove the vehicle from the server, or initialize the variable it was stored in, to zero?
Example:
pawn Код:
PlayerData[playerid][Vehicle] = CreateVehicle(...);
//somewhere later...
DestroyVehicle(PlayerData[playerid][Vehicle]);//vehicle gets destroyed...but what happens to the variable?
//do I initialize it to zero? (PlayerData[playerid][Vehicle] = 0;)?