DestroyVehicle and Variables
#1

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:

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;)?
Does the function "DestroyVehicle" ONLY remove the vehicle from the server, or initialize the variable it was stored in, to zero?
Reply


Messages In This Thread
DestroyVehicle and Variables - by Tee - 28.07.2012, 19:05
Re: DestroyVehicle and Variables - by Kindred - 28.07.2012, 19:36
Re: DestroyVehicle and Variables - by SuperViper - 28.07.2012, 19:39
Re: DestroyVehicle and Variables - by Tee - 28.07.2012, 19:40

Forum Jump:


Users browsing this thread: 1 Guest(s)