10.01.2013, 09:18
Obviously not tested, because it won't work. You have the 'vehicleid' parameter in the header of OnPlayerEnterVehicle. Use it. Using GetPlayerVehicleID in OnPlayerEnterVehicle will always return 0 because the player isn't in the vehicle yet. Furthermore, you have not defined newstate. It looks to me like you mixed up OnPlayerEnterVehicle with OnPlayerStateChange.