Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <natives.h>
- #include <common.h>
- #include <strings.h>
- #include <types.h>
- #include <consts.h>
- int s,i;
- Group mygroup,hackgroup;
- void main(void){
- THIS_SCRIPT_IS_SAFE_FOR_NETWORK_GAME();
- if(IS_PED_IN_GROUP(GetPlayerPed())){
- GET_PED_GROUP_INDEX(GetPlayerPed(),&s);
- GET_PLAYER_GROUP(GetPlayerIndex(), &mygroup);
- }
- else{
- CREATE_GROUP(0, mygroup, true);
- SET_GROUP_LEADER(mygroup, GetPlayerPed());
- GET_PED_GROUP_INDEX(GetPlayerPed(),&s);
- GET_PLAYER_GROUP(GetPlayerIndex(), &mygroup);
- }
- print("Group Protection [on]");
- WAIT(0);
- do{
- WAIT(0);
- if(IS_PED_IN_GROUP(GetPlayerPed())){
- GET_PED_GROUP_INDEX(GetPlayerPed(),&i);
- if(s != i){
- GET_PLAYER_GROUP(GetPlayerIndex(), &hackgroup);
- if(DOES_GROUP_EXIST(hackgroup)){
- REMOVE_CHAR_FROM_GROUP(GetPlayerPed());
- if(!DOES_GROUP_EXIST(mygroup)){
- CREATE_GROUP(0, mygroup, true);
- SET_GROUP_LEADER(mygroup, GetPlayerPed());
- }
- else SET_GROUP_LEADER(mygroup, GetPlayerPed());
- GET_PED_GROUP_INDEX(GetPlayerPed(),&s);
- print("Attempt to join a unauthorized group blocked.~n~Someone may have used group hack on you.");
- }
- else{
- CREATE_GROUP(0, mygroup, true);
- SET_GROUP_LEADER(mygroup, GetPlayerPed());
- print("You aren't in a group.~n~Someone may have used group hack on you.");
- GET_PED_GROUP_INDEX(GetPlayerPed(),&s);
- }
- }
- }
- else{
- CREATE_GROUP(0, mygroup, true);
- SET_GROUP_LEADER(mygroup, GetPlayerPed());
- print("You aren't in a group.~n~Someone may have used group hack on you.");
- GET_PED_GROUP_INDEX(GetPlayerPed(),&s);
- }
- } while(true);
- }
Add Comment
Please, Sign In to add comment