03.12.2009, 22:23
Quote:
Originally Posted by Outbreak
You can either set the vehicle params so the DM players can enter the vehicle but others can't (vehicle locked).
Or use the code you already have but place it in OnPlayerStateChange instead. You'll need to check newstate == PLAYER_STATE_DRIVER then check the vehicle model, and if the player ain't in DM you can remove them from the vehicle. OnPlayerEnterVehicle is called the moment the player hits F or Enter, so the removal from the vehicle at that time is impossible since their state is PLAYER_STATE_ONFOOT |