18.11.2009, 20:43
use DestroyVehicle before CreateVehicle
My method is making a var for the playervehicle
The reason why I'm giving the var the '-1' value, is that 0 would make a vehicle ID, so it can't be used.
Then do:
Good luck!
My method is making a var for the playervehicle
pawn Код:
//global
new pVeh[MAX_PLAYERS] = -1;
Then do:
pawn Код:
if(pVeh[playerid] != -1) //You might wanna throw in a check if player is inside the vehicle too, but it's not that important
DestroyVehicle(pVeh[playerid]);
//rest of command here