new LastVehID[MAX_PLAYERS]; public OnPlayerStateChange(playerid,oldstate,newstate) { if(newstate == PLAYER_STATE_DRIVER || newstate == PLAYER_STATE_PASSENGER) { LastVehID[playerid] = GetPlayerVehicleID(playerid); } }