08.07.2014, 22:23
i wanna make a anti-drive by system and i make this
But this works only when hit player, i wanna make this works when shoot in vehicle and that vehicle health is <= 550.
What to do ?
Код:
PUBLIC: OnPlayerShootPlayer(Shooter,Target,Float:HealthLost,Float:ArmourLost) { if(GetPlayerState(Shooter) == 3) { new Float:vhealth; new veh = GetPlayerVehicleID(Target); if(GetVehicleHealth(veh, vhealth) <= 550) { SetVehicleHealth(veh, 550); TogglePlayerControllable(Shooter, 0); SetTimerEx("ResetFreeze", 10000, false, "i", Shooter); SendClientMessage(Shooter,COLOR_RED,"Drive-By: You`re freeze for 10 seconds !"); } } return 1;
What to do ?