XADRENALINEIX

ap ii intense Group Hack Protection 2.0

Jul 6th, 2013
172
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 2.06 KB | None | 0 0
  1. #include <natives.h>
  2. #include <common.h>
  3. #include <strings.h>
  4. #include <types.h>
  5. #include <consts.h>
  6.  
  7. int s,i;
  8. Group mygroup,hackgroup;
  9.  
  10. void main(void){
  11.     THIS_SCRIPT_IS_SAFE_FOR_NETWORK_GAME();
  12.    
  13.     if(IS_PED_IN_GROUP(GetPlayerPed())){
  14.         GET_PED_GROUP_INDEX(GetPlayerPed(),&s);
  15.         GET_PLAYER_GROUP(GetPlayerIndex(), &mygroup);
  16.     }
  17.     else{
  18.         CREATE_GROUP(0, mygroup, true);
  19.         SET_GROUP_LEADER(mygroup, GetPlayerPed());
  20.         GET_PED_GROUP_INDEX(GetPlayerPed(),&s);
  21.         GET_PLAYER_GROUP(GetPlayerIndex(), &mygroup);
  22.     }
  23.    
  24.     print("Group Protection [on]");
  25.     WAIT(0);
  26.     do{
  27.         WAIT(0);
  28.    
  29.         if(IS_PED_IN_GROUP(GetPlayerPed())){
  30.             GET_PED_GROUP_INDEX(GetPlayerPed(),&i);
  31.             if(s != i){
  32.                 GET_PLAYER_GROUP(GetPlayerIndex(), &hackgroup);
  33.                 if(DOES_GROUP_EXIST(hackgroup)){
  34.                     REMOVE_CHAR_FROM_GROUP(GetPlayerPed());
  35.                     if(!DOES_GROUP_EXIST(mygroup)){
  36.                         CREATE_GROUP(0, mygroup, true);
  37.                         SET_GROUP_LEADER(mygroup, GetPlayerPed());
  38.                     }
  39.                     else SET_GROUP_LEADER(mygroup, GetPlayerPed());
  40.                    
  41.                     GET_PED_GROUP_INDEX(GetPlayerPed(),&s);
  42.                     print("Attempt to join a unauthorized group blocked.~n~Someone may have used group hack on you.");
  43.                 }
  44.                 else{
  45.                     CREATE_GROUP(0, mygroup, true);
  46.                     SET_GROUP_LEADER(mygroup, GetPlayerPed());
  47.                     print("You aren't in a group.~n~Someone may have used group hack on you.");
  48.                     GET_PED_GROUP_INDEX(GetPlayerPed(),&s);
  49.                 }
  50.             }  
  51.         }
  52.         else{
  53.             CREATE_GROUP(0, mygroup, true);
  54.             SET_GROUP_LEADER(mygroup, GetPlayerPed());
  55.             print("You aren't in a group.~n~Someone may have used group hack on you.");
  56.             GET_PED_GROUP_INDEX(GetPlayerPed(),&s);
  57.         }
  58.        
  59.     } while(true);
  60. }
Add Comment
Please, Sign In to add comment