Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- forward AC_SetVehicleHealth(vehicleid, Float:hp, sta);
- public AC_SetVehicleHealth(vehicleid, Float:hp, sta)
- {
- if(sta == 999)
- {
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerInVehicle(i, vehicleid))
- {
- if(GetPlayerState(i) == 2)
- {
- HPauta2[i] = 5;
- HPauta[i] = hp;
- }
- }
- }
- }
- else
- {
- if(IsPlayerInVehicle(sta, vehicleid))
- {
- if(GetPlayerState(sta) == 2)
- {
- HPauta2[sta] = 5;
- HPauta[sta] = hp;
- }
- }
- }
- if(IsAnOwnableCar(vehicleid)) CarInfo[vehicleid][cHP] = hp;
- SetVehicleHealth(vehicleid, hp);
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement