25.07.2012, 03:06
Quote:
How can i get the vehicle id of the last vehicle the player was in?
Example: I get into an elegy ID: 20, then i exit, and do /lock, then it locks car ID:20 |
new LastVehicle[MAX_PLAYERS];
OnPlayerStateChange, when he actually enters a vehicle, do:
LastVehicle[playerid] = GetVehicleID(playerid);
Then it will just set that variable to every vehicle he enters, and it won't change until he enters a new vehicle. So to view the last vehicle a player entered, use LastVehicle[playerid]