Advertisement
Guest User

Untitled

a guest
Sep 17th, 2019
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 0.79 KB | None | 0 0
  1. forward AC_SetVehicleHealth(vehicleid, Float:hp, sta);
  2. public AC_SetVehicleHealth(vehicleid, Float:hp, sta)
  3. {
  4.     if(sta == 999)
  5.     {
  6.         for(new i = 0; i < MAX_PLAYERS; i++)
  7.         {
  8.             if(IsPlayerInVehicle(i, vehicleid))
  9.             {
  10.                 if(GetPlayerState(i) == 2)
  11.                 {
  12.                     HPauta2[i] = 5;
  13.                     HPauta[i] = hp;
  14.                 }
  15.             }
  16.         }
  17.     }
  18.     else
  19.     {
  20.         if(IsPlayerInVehicle(sta, vehicleid))
  21.         {
  22.             if(GetPlayerState(sta) == 2)
  23.             {
  24.                 HPauta2[sta] = 5;
  25.                 HPauta[sta] = hp;
  26.             }
  27.         }
  28.     }
  29.     if(IsAnOwnableCar(vehicleid)) CarInfo[vehicleid][cHP] = hp;
  30.     SetVehicleHealth(vehicleid, hp);
  31.     return 1;
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement