27.12.2014, 01:34
pawn Код:
public OnPlayerVehicleDamage(playerid, vehicleid, Floatamage)
{
new Float: HP;
GetPlayerHealth(playerid, HP);
if(IsPlayerInVehicle(playerid, vehicleid))
{
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER || GetPlayerState(playerid) == PLAYER_STATE_PASSENGER)
{
if(Damage > 165.0 && 195.0)
{
Cselekves(playerid, "convulse.");
SetPlayerDrunkLevel(playerid, 5000);
SetPlayerHealth(playerid, HP - 20);
}
}
}
return 1;
}