ID of last vehicle entered
#6

Quote:
Originally Posted by SnG.Scot_MisCuDI
Посмотреть сообщение
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
Make a global variable:

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]
Reply


Messages In This Thread
ID of last vehicle entered - by SnG.Scot_MisCuDI - 25.07.2012, 02:47
Re: ID of last vehicle entered - by Akira297 - 25.07.2012, 02:52
Re: ID of last vehicle entered - by SnG.Scot_MisCuDI - 25.07.2012, 02:54
Re: ID of last vehicle entered - by Akira297 - 25.07.2012, 02:56
Re: ID of last vehicle entered - by SnG.Scot_MisCuDI - 25.07.2012, 03:06
Re: ID of last vehicle entered - by DeathTone - 25.07.2012, 03:06
Re: ID of last vehicle entered - by SnG.Scot_MisCuDI - 25.07.2012, 03:22
Re: ID of last vehicle entered - by maramizo - 25.07.2012, 05:50

Forum Jump:


Users browsing this thread: 2 Guest(s)