06.10.2014, 15:57
IsPlayerInAnyVehicle, checks if the player is in an vehicle, no matter the seat.
It is called when the player takes damage.
Try to check if the player is in an vehicle, but is not an actual driver
Im saying this assuming you already know how to script that, if not, learn.
It is called when the player takes damage.
Try to check if the player is in an vehicle, but is not an actual driver
pawn Код:
if((IsPlayerInAnyVehicle(damagedid)) && (GetPlayerState(damagedid) != PLAYER_STATE_DRIVER))
{
// if the player is in an car, but not a driver!
// try to work with Health local float variable, since OnPlayerGiveDamage supports a amount float parameter
// Increease health of the player everytime he gets damage +=amount;
// Decrease vehicle health of the vehicle of the player.
}