01.02.2014, 10:50
You should test the code before releasing it.
When a player tries to enter a vehicle, enter[playerid] will be set to 1. And nothing else will be detected after that.
You could use enter[playerid] = vehicleid under OnPlayerEnterVehicle and check for the vehicle in OnPlayerStateChange. Not 100% accurate, though.
Sometimes player get detected when they shouldn't. Sometimes players never get detected. If you teleport from one vehicle to another using cheats (as a driver), OnPlayerStateChange will not get called, because the state does change. You are still a driver, but in a different vehicle.
When a player tries to enter a vehicle, enter[playerid] will be set to 1. And nothing else will be detected after that.
You could use enter[playerid] = vehicleid under OnPlayerEnterVehicle and check for the vehicle in OnPlayerStateChange. Not 100% accurate, though.
Sometimes player get detected when they shouldn't. Sometimes players never get detected. If you teleport from one vehicle to another using cheats (as a driver), OnPlayerStateChange will not get called, because the state does change. You are still a driver, but in a different vehicle.