Advertisement
Guest User

restraint jacket

a guest
May 3rd, 2015
227
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 1.65 KB | None | 0 0
  1.  if(rest) // Restraint Jacket Mod
  2.     {
  3.         for(i = 0;i <= 15;i++)
  4.         {
  5.             if(!IS_NETWORK_PLAYER_ACTIVE(i)) continue;
  6.             GET_PLAYER_CHAR(i, &online_player);
  7.             if(!DOES_CHAR_EXIST(online_player)) continue;
  8.             if((IS_PLAYER_FREE_AIMING_AT_CHAR(GET_PLAYER_ID(), online_player) || IS_PLAYER_TARGETTING_CHAR(GET_PLAYER_ID(), online_player)))
  9.             {
  10.             Object yeye;
  11.             if (IS_CHAR_SHOOTING(GetPlayerPed()))
  12.                 {
  13.                     ptfx_show(online_player);
  14.                             CREATE_OBJECT(0x1B42315D,0.0,0.0,0.0,&yeye,true);
  15.                                 ATTACH_OBJECT_TO_PED(yeye,online_player,0,0.0,0.0,-0.11,0.0,0.0,3.0,false);
  16.                             SET_OBJECT_VISIBLE(yeye, false);
  17.                                 GIVE_WEAPON_TO_CHAR(online_player, WEAPON_ARMOUR, 1, false);
  18.                                 ADD_ARMOUR_TO_CHAR(online_player, 99);
  19.                     WAIT(10);
  20.                     if(IS_CHAR_TOUCHING_VEHICLE(online_player, online_vehicle))
  21.                     {
  22.                             GET_CAR_CHAR_IS_USING(online_player, &online_vehicle);
  23.                             GET_NETWORK_ID_FROM_VEHICLE(online_vehicle,&i);
  24.                                         if(HasControlOfNetworkID(i))
  25.                             {
  26.                             DELETE_CAR(online_vehicle);
  27.                         }
  28.                     }
  29.                     if(HAS_CHAR_BEEN_DAMAGED_BY_CHAR(online_player, online_attacker, true))
  30.                     {
  31.                                GIVE_WEAPON_TO_CHAR(online_player, WEAPON_ARMOUR, 1, false);
  32.                                        ADD_ARMOUR_TO_CHAR(online_player, 99);
  33.                                        print("Player Given Help to live");
  34.                     }
  35.             }
  36.         }
  37.     }
  38. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement