What's new

Code [REL] Nathan's Private Protection Source

  • Thread starter IIV NATHAN VII
  • Start date
  • Views 12,343
IIV NATHAN VII

IIV NATHAN VII

You never know for sure unless you try
Frame In Gold Modder Platinum Record
Messages
1,091
Reaction score
1,353
Points
860
Sin$
7
Hi guys, thought I would finally bite the bullet and release my private Network Protection source code, It's full of publicly new gimmicks and utilities you probably haven't used before.

P.S. Actually not an april fools prank, this is legitimate.

THIS IS A SOURCE RELEASE, PRIMARILY DESIGNED FOR XBOX 360.
PLEASE DO NOT ASK FOR HELP COMPILING, IF YOU CAN'T COMPILE DOWNLOAD THE PUBLIC REL HERE.

Including but not limited too:
- Machine ID Grabbing, (yes retail)
- Displays how many Xbox 360 users are currently in the game (works on retail).
- Displays how many people are currently invincible in the game (godmode, works on retail).
- Vehicle door lock bypass (act as if vehicle door locks never existed, retail)
- sneaky god mode (currently undetectable, retail)
- Kicking consoles from your game if host (yes consoles, works on the likes of Aizle/Clout, they can't re-join, works on retail),
- Shared host power map-wide and seamlessly (Only works if player is on friends list, online, and in the game AND one of you is host)
--includes kicking player/console, time setting and weather control. (works on retail & with shared host power)
- Ability to spoof to friends gamertags and recent players names. (yes works on retail).
- Ability to copy players XUID/Gamertag. (yes works on retail).
--also includes a couple of Pre-set XUID/Gamertag combos. (XUID is the player card that will open on XBL, works on retail).
- Teleporting on foot off-host (yes works on retail).
- Weather/Time setting off-host (works on retail but I think only on TBoGT or Original, one or the other).
- Auto-warp (automatically plops you into the drivers new vehicle based on setting, friends-only mode by default, retail).
- Anti-shoot me (removes peoples weapons when they shoot you, only accurate on a 2D axis, retail).
- Auto-lock vehicle that actually works reliably (unlike MD's), default setting is Unlock for friends.

I've removed a few pieces of code, such as the odd freeze method and IP grabbing, but mostly it remains intact.
Power to the people.

I'm hoping people can learn from this, and if they can then something good came out of this release, feel free to ask questions on this thread if you're unsure of what certain code does or how it works, (I WILL NOT HELP YOU WITH COMPILE ERRORS).

SPECIAL THANKS:
Buffeting / Snapmatic - Was a great help getting me started off in this community, especially back in the 3n1 days.
Sockstress - Helping to understand memory / offsets as a noob.
Rock4259 / Ap ii Intense & Nayjames123 - Lots of this wouldn't be possible here without their new[Click here to view this link] so kudos.

Download 7.4 Source.zip
Virus Scan
 
Last edited:
B

blessup421

Newbie
Messages
13
Reaction score
3
Points
45
Sin$
7
Hi guys, thought I would finally bite the bullet and release my private Network Protection source code, It's full of publicly new gimmicks and utilities you probably haven't used before.

P.S. Actually not an april fools prank, this is legitimate.

THIS IS A SOURCE RELEASE, PRIMARILY DESIGNED FOR XBOX 360.
PLEASE DO NOT ASK FOR HELP COMPILING, IF YOU CAN'T COMPILE DOWNLOAD THE PUBLIC REL HERE.

Including but not limited too:
- Machine ID Grabbing, (yes retail)
- Displays how many Xbox 360 users are currently in the game (works on retail).
- Displays how many people are currently invincible in the game (godmode, works on retail).
- Vehicle door lock bypass (act as if vehicle door locks never existed, retail)
- sneaky god mode (currently undetectable, retail)
- Kicking consoles from your game if host (yes consoles, works on the likes of Aizle/Clout, they can't re-join, works on retail),
- Shared host power map-wide and seamlessly (Only works if player is on friends list, online, and in the game AND one of you is host)
--includes kicking player/console, time setting and weather control. (works on retail & with shared host power)
- Ability to spoof to friends gamertags and recent players names. (yes works on retail).
- Ability to copy players XUID/Gamertag. (yes works on retail).
--also includes a couple of Pre-set XUID/Gamertag combos. (XUID is the player card that will open on XBL, works on retail).
- Teleporting on foot off-host (yes works on retail).
- Weather/Time setting off-host (works on retail but I think only on TBoGT or Original, one or the other).
- Auto-warp (automatically plops you into the drivers new vehicle based on setting, friends-only mode by default, retail).
- Anti-shoot me (removes peoples weapons when they shoot you, only accurate on a 2D axis, retail).
- Auto-lock vehicle that actually works reliably (unlike MD's), default setting is Unlock for friends.

I've removed a few pieces of code, such as the odd freeze method and IP grabbing, but mostly it remains intact.
Power to the people.

I'm hoping people can learn from this, and if they can then something good came out of this release, feel free to ask questions on this thread if you're unsure of what certain code does or how it works, (I WILL NOT HELP YOU WITH COMPILE ERRORS).

SPECIAL THANKS:
Buffeting / Snapmatic - Was a great help getting me started off in this community, especially back in the 3n1 days.
Sockstress - Helping to understand memory / offsets as a noob.
Rock4259 / Ap ii Intense & Nayjames123 - Lots of this wouldn't be possible here without their new SC-CL compiler so kudos.

Download 7.4 Source.zip
Virus Scan
Nice, should make a optional file folder that works with a batch file though, as visual studio can be a mess sometimes with errors. Good release!!
 
D

Deleted member 837606

Enthusiast
Messages
249
Reaction score
51
Points
95
Sin$
0
Nice, should make a optional file folder that works with a batch file though, as visual studio can be a mess sometimes with errors. Good release!!
It doesn't compile by default since you're either supposed to learn from it or you already know how to fix it.
 
B

blessup421

Newbie
Messages
13
Reaction score
3
Points
45
Sin$
7
It doesn't compile by default since you're either supposed to learn from it or you already know how to fix it.
ok nvm then, i guess we just expected to have the latest visual studio installed with the updated SDK's to make any use of this then. Copy paste it is :smile:
 
IIV NATHAN VII

IIV NATHAN VII

You never know for sure unless you try
Frame In Gold Modder Platinum Record
Messages
1,091
Reaction score
1,353
Points
860
Sin$
7
For those of you interested, here's the code required to run in order to protect you from player model (the most basic).
C:
for(int i = 0; i < 16; i++)
  {
    if(!PLAYER_HAS_CHAR(i)) continue;
    GET_PLAYER_CHAR(i,&tmp_ped);
    GET_CHAR_MODEL(tmp_ped,&tmp_model);
    if(tmp_model == MODEL_PLAYER)
      SET_CHAR_VISIBLE(tmp_ped,false);
  }
Here's the code you'd have been running if using my script, lots more of it but for good reason, ratting out abusers and revealing their location.
C:
if(GetByteSet(ByteSetThree, BYTE_SET_MODEL_PROT_MODE) > MODEL_PROT_OFF)
{
    for(i = 0; i < MAX_NETWORK_PLAYERS; i++)
    {
        if (i == iPlayer || !IS_PLAYER_PRESENT(i) || !PLAYER_HAS_CHAR(i))
        {
            SetBit(SuppressPModelMessageBitSet, i, false);
            continue;
        }
        GET_PLAYER_CHAR(i,&tmp_ped);
        GET_CHAR_MODEL(tmp_ped,&tmp_model);
        if(tmp_model != PED_PLAYER)
        {
            if (GetBit(SuppressPModelMessageBitSet, i)) //changed from niko just now.. //won't freeze us as they were invisible!
            {
                float tmp_x,tmp_y,tmp_z,distance;
                GET_CHAR_COORDINATES(tmp_ped, &tmp_x, &tmp_y, &tmp_z);
                int id_ped, lowest_distance_id = 1337;
                float lowest_distance = 35.0f;
                float idx, idy, idz;
                for (int id = 0; id < MAX_NETWORK_PLAYERS; id++)
                {
                    if (id == iPlayer || id == i || !IS_PLAYER_PRESENT(id) || !PLAYER_HAS_CHAR(id)) continue;
                    GET_PLAYER_CHAR(id, &id_ped);
                    GET_CHAR_COORDINATES(id_ped, &idx, &idy, &idz);
                    GET_DISTANCE_BETWEEN_COORDS_3D(idx, idy, idz, tmp_x, tmp_y, tmp_z, &distance);
                    if (distance < lowest_distance)
                    {
                        lowest_distance = distance;
                        lowest_distance_id = id;
                    }
                }
                if (lowest_distance_id != 1337)
                {
                    char buffer[128];
                    strcpy_s(buffer, "~r~IIV: ");
                    stradd_s(buffer, NetworkPlayerGetNameWithColour(i));
                    if (AM_I_THE_REAL_HOST() && GetByteSet(ByteSetThree, BYTE_SET_MODEL_PROT_MODE) == MODEL_PROT_LOBBY)
                    {
                        NETWORK_KICK_PLAYER(i, true);
                    }
                    stradd_s(buffer, " ~s~changed from ~y~");
                    stradd_s(buffer, SP_MODEL_NAME());
                    stradd_s(buffer, " ~s~near ");
                    stradd_s(buffer, NetworkPlayerGetNameWithColour(lowest_distance_id));
                    stradd_s(buffer, ".");
                    Alert(buffer);
                }
            }
            SetBit(SuppressPModelMessageBitSet, i, false);
            continue;
        }
        SET_CHAR_VISIBLE(tmp_ped, false);
        if(GetBit(SuppressPModelMessageBitSet, i)) continue;
        float tmp_x,tmp_y,tmp_z,distance;
        GET_CHAR_COORDINATES(tmp_ped,&tmp_x,&tmp_y,&tmp_z);
        GET_DISTANCE_BETWEEN_COORDS_3D(x,y,z,tmp_x,tmp_y,tmp_z,&distance);
        //v - If the distance is more than 70-> skip
        //v - If the distance is more than more than 5 (automatically true if previous statement is true) and they're not on screen continue
       
        bool trying_to_freeze_you = !( (distance > 70.0f) || (distance > 5.0f && !IS_CHAR_ON_SCREEN(tmp_ped)) );      
        SetBit(SuppressPModelMessageBitSet, i, true);
       
        char buffer[94];
        strcpy_s(buffer, "~r~IIV: ");
        stradd_s(buffer, NetworkPlayerGetNameWithColour(i));
        stradd_s(buffer, trying_to_freeze_you ? " ~s~tried to use ~y~" : " ~s~changed to ~y~");
        stradd_s(buffer, SP_MODEL_NAME()); //Niko/Johnny/Luis
        stradd_s(buffer, trying_to_freeze_you ? " ~s~against you" : "~s~");
        if(trying_to_freeze_you)
        {
            bool shouldKick = (GetBit(ProtectionOptionsBitSet, PROTECTION_OPT_AUTO_KICK) || ((GET_NUMBER_OF_PLAYERS() > 2) && GetByteSet(ByteSetThree, BYTE_SET_MODEL_PROT_MODE) == MODEL_PROT_LOBBY));
            if(AM_I_THE_REAL_HOST() && shouldKick)
            {
                NETWORK_KICK_PLAYER(i, true);
                stradd_s(buffer, ", player kicked.");
            }
            else
            {
                stradd_s(buffer, ".");
            }
        }
        else
        {
            int id_ped, lowest_distance_id = 1337;
            float lowest_distance = 35.0f; //maybe increase with time but meh..
            float idx, idy, idz;
            for(int id = 0; id < MAX_NETWORK_PLAYERS; id++)
            {
                if(id == iPlayer || id == i || !IS_PLAYER_PRESENT(id) || !PLAYER_HAS_CHAR(id)) continue;
                GET_PLAYER_CHAR(id,&id_ped);
                GET_CHAR_COORDINATES(id_ped,&idx,&idy,&idz);
                GET_DISTANCE_BETWEEN_COORDS_3D(idx,idy,idz,tmp_x,tmp_y,tmp_z,&distance);
                if(distance < lowest_distance)
                {
                    lowest_distance = distance;
                    lowest_distance_id = id;
                }
            }
            if(lowest_distance_id != 1337)
            {
                if (AM_I_THE_REAL_HOST() && GetByteSet(ByteSetThree, BYTE_SET_MODEL_PROT_MODE) == MODEL_PROT_LOBBY)
                    NETWORK_KICK_PLAYER(i, true);

                stradd_s(buffer, " near ");
                stradd_s(buffer, NetworkPlayerGetNameWithColour(lowest_distance_id));
               
            }
            stradd_s(buffer, ".");
        }
        Alert(buffer);
    }

    const int ClosestNiko = GET_NEAREST_NIKO_PLAYER_PED(x, y, z);
    for (i = 0; i < MAX_NETWORK_PLAYERS; i++)
    {
        if (!GetBit(SuppressPModelMessageBitSet, i) || !IS_PLAYER_PRESENT(i) || !PLAYER_HAS_CHAR(i)) continue;
        const int netPed = GetPlayerPed(i);
        REMOVE_FAKE_NETWORK_NAME_FROM_PED(netPed);
        if (IS_CHAR_ON_SCREEN(netPed)) //works
        {
            float px, py, pz;
            GET_CHAR_COORDINATES(netPed, &px, &py, &pz);
            int pr, pg, pb;
            GET_PLAYER_RGB_COLOUR(i, &pr, &pg, &pb);
           
            if (IS_CHAR_IN_ANY_CAR(netPed))
            {
                DRAW_CHECKPOINT_WITH_ALPHA(px, py, (pz - 0.5f), 1.02f, pr, pg, pb, 255);
            }
            else
            {
                DRAW_CHECKPOINT_WITH_ALPHA(px, py, (pz - 1.0f), 1.02f, pr, pg, pb, 255);
                GET_OFFSET_FROM_CHAR_IN_WORLD_COORDS(netPed, 0.0f, 0.75f, 0.0f, &px, &py, &pz);
                DRAW_CHECKPOINT_WITH_ALPHA(px, py, (pz - 1.0f), 0.35f, pr, pg, pb, 255);
            }
            //PX PY PZ IS NO LONGER CENTERED TO PLAYER FROM THIS POINT.
            if (ClosestNiko == netPed)
            {
                GIVE_PED_FAKE_NETWORK_NAME(netPed, SAFE_GET_PLAYER_NAME(i), pr, pg, pb, 255);
            }
        }
    }
}
T'was fun.
 
D

Deleted member 837606

Enthusiast
Messages
249
Reaction score
51
Points
95
Sin$
0
For those of you interested, here's the code required to run in order to protect you from player model (the most basic).
C:
for(int i = 0; i < 16; i++)
  {
    if(!PLAYER_HAS_CHAR(i)) continue;
    GET_PLAYER_CHAR(i,&tmp_ped);
    GET_CHAR_MODEL(tmp_ped,&tmp_model);
    if(tmp_model == MODEL_PLAYER)
      SET_CHAR_VISIBLE(tmp_ped,false);
  }
Here's the code you'd have been running if using my script, lots more of it but for good reason, ratting out abusers and revealing their location.
C:
if(GetByteSet(ByteSetThree, BYTE_SET_MODEL_PROT_MODE) > MODEL_PROT_OFF)
{
    for(i = 0; i < MAX_NETWORK_PLAYERS; i++)
    {
        if (i == iPlayer || !IS_PLAYER_PRESENT(i) || !PLAYER_HAS_CHAR(i))
        {
            SetBit(SuppressPModelMessageBitSet, i, false);
            continue;
        }
        GET_PLAYER_CHAR(i,&tmp_ped);
        GET_CHAR_MODEL(tmp_ped,&tmp_model);
        if(tmp_model != PED_PLAYER)
        {
            if (GetBit(SuppressPModelMessageBitSet, i)) //changed from niko just now.. //won't freeze us as they were invisible!
            {
                float tmp_x,tmp_y,tmp_z,distance;
                GET_CHAR_COORDINATES(tmp_ped, &tmp_x, &tmp_y, &tmp_z);
                int id_ped, lowest_distance_id = 1337;
                float lowest_distance = 35.0f;
                float idx, idy, idz;
                for (int id = 0; id < MAX_NETWORK_PLAYERS; id++)
                {
                    if (id == iPlayer || id == i || !IS_PLAYER_PRESENT(id) || !PLAYER_HAS_CHAR(id)) continue;
                    GET_PLAYER_CHAR(id, &id_ped);
                    GET_CHAR_COORDINATES(id_ped, &idx, &idy, &idz);
                    GET_DISTANCE_BETWEEN_COORDS_3D(idx, idy, idz, tmp_x, tmp_y, tmp_z, &distance);
                    if (distance < lowest_distance)
                    {
                        lowest_distance = distance;
                        lowest_distance_id = id;
                    }
                }
                if (lowest_distance_id != 1337)
                {
                    char buffer[128];
                    strcpy_s(buffer, "~r~IIV: ");
                    stradd_s(buffer, NetworkPlayerGetNameWithColour(i));
                    if (AM_I_THE_REAL_HOST() && GetByteSet(ByteSetThree, BYTE_SET_MODEL_PROT_MODE) == MODEL_PROT_LOBBY)
                    {
                        NETWORK_KICK_PLAYER(i, true);
                    }
                    stradd_s(buffer, " ~s~changed from ~y~");
                    stradd_s(buffer, SP_MODEL_NAME());
                    stradd_s(buffer, " ~s~near ");
                    stradd_s(buffer, NetworkPlayerGetNameWithColour(lowest_distance_id));
                    stradd_s(buffer, ".");
                    Alert(buffer);
                }
            }
            SetBit(SuppressPModelMessageBitSet, i, false);
            continue;
        }
        SET_CHAR_VISIBLE(tmp_ped, false);
        if(GetBit(SuppressPModelMessageBitSet, i)) continue;
        float tmp_x,tmp_y,tmp_z,distance;
        GET_CHAR_COORDINATES(tmp_ped,&tmp_x,&tmp_y,&tmp_z);
        GET_DISTANCE_BETWEEN_COORDS_3D(x,y,z,tmp_x,tmp_y,tmp_z,&distance);
        //v - If the distance is more than 70-> skip
        //v - If the distance is more than more than 5 (automatically true if previous statement is true) and they're not on screen continue
      
        bool trying_to_freeze_you = !( (distance > 70.0f) || (distance > 5.0f && !IS_CHAR_ON_SCREEN(tmp_ped)) );     
        SetBit(SuppressPModelMessageBitSet, i, true);
      
        char buffer[94];
        strcpy_s(buffer, "~r~IIV: ");
        stradd_s(buffer, NetworkPlayerGetNameWithColour(i));
        stradd_s(buffer, trying_to_freeze_you ? " ~s~tried to use ~y~" : " ~s~changed to ~y~");
        stradd_s(buffer, SP_MODEL_NAME()); //Niko/Johnny/Luis
        stradd_s(buffer, trying_to_freeze_you ? " ~s~against you" : "~s~");
        if(trying_to_freeze_you)
        {
            bool shouldKick = (GetBit(ProtectionOptionsBitSet, PROTECTION_OPT_AUTO_KICK) || ((GET_NUMBER_OF_PLAYERS() > 2) && GetByteSet(ByteSetThree, BYTE_SET_MODEL_PROT_MODE) == MODEL_PROT_LOBBY));
            if(AM_I_THE_REAL_HOST() && shouldKick)
            {
                NETWORK_KICK_PLAYER(i, true);
                stradd_s(buffer, ", player kicked.");
            }
            else
            {
                stradd_s(buffer, ".");
            }
        }
        else
        {
            int id_ped, lowest_distance_id = 1337;
            float lowest_distance = 35.0f; //maybe increase with time but meh..
            float idx, idy, idz;
            for(int id = 0; id < MAX_NETWORK_PLAYERS; id++)
            {
                if(id == iPlayer || id == i || !IS_PLAYER_PRESENT(id) || !PLAYER_HAS_CHAR(id)) continue;
                GET_PLAYER_CHAR(id,&id_ped);
                GET_CHAR_COORDINATES(id_ped,&idx,&idy,&idz);
                GET_DISTANCE_BETWEEN_COORDS_3D(idx,idy,idz,tmp_x,tmp_y,tmp_z,&distance);
                if(distance < lowest_distance)
                {
                    lowest_distance = distance;
                    lowest_distance_id = id;
                }
            }
            if(lowest_distance_id != 1337)
            {
                if (AM_I_THE_REAL_HOST() && GetByteSet(ByteSetThree, BYTE_SET_MODEL_PROT_MODE) == MODEL_PROT_LOBBY)
                    NETWORK_KICK_PLAYER(i, true);

                stradd_s(buffer, " near ");
                stradd_s(buffer, NetworkPlayerGetNameWithColour(lowest_distance_id));
              
            }
            stradd_s(buffer, ".");
        }
        Alert(buffer);
    }

    const int ClosestNiko = GET_NEAREST_NIKO_PLAYER_PED(x, y, z);
    for (i = 0; i < MAX_NETWORK_PLAYERS; i++)
    {
        if (!GetBit(SuppressPModelMessageBitSet, i) || !IS_PLAYER_PRESENT(i) || !PLAYER_HAS_CHAR(i)) continue;
        const int netPed = GetPlayerPed(i);
        REMOVE_FAKE_NETWORK_NAME_FROM_PED(netPed);
        if (IS_CHAR_ON_SCREEN(netPed)) //works
        {
            float px, py, pz;
            GET_CHAR_COORDINATES(netPed, &px, &py, &pz);
            int pr, pg, pb;
            GET_PLAYER_RGB_COLOUR(i, &pr, &pg, &pb);
          
            if (IS_CHAR_IN_ANY_CAR(netPed))
            {
                DRAW_CHECKPOINT_WITH_ALPHA(px, py, (pz - 0.5f), 1.02f, pr, pg, pb, 255);
            }
            else
            {
                DRAW_CHECKPOINT_WITH_ALPHA(px, py, (pz - 1.0f), 1.02f, pr, pg, pb, 255);
                GET_OFFSET_FROM_CHAR_IN_WORLD_COORDS(netPed, 0.0f, 0.75f, 0.0f, &px, &py, &pz);
                DRAW_CHECKPOINT_WITH_ALPHA(px, py, (pz - 1.0f), 0.35f, pr, pg, pb, 255);
            }
            //PX PY PZ IS NO LONGER CENTERED TO PLAYER FROM THIS POINT.
            if (ClosestNiko == netPed)
            {
                GIVE_PED_FAKE_NETWORK_NAME(netPed, SAFE_GET_PLAYER_NAME(i), pr, pg, pb, 255);
            }
        }
    }
}
T'was fun.
wirus
 
ReVoLuTiioNz

ReVoLuTiioNz

Mr BigShot
Programmer Mr. Nice Guy Experienced Veteran
Messages
2,256
Reaction score
1,252
Points
430
Sin$
7
For those of you interested, here's the code required to run in order to protect you from player model (the most basic).
C:
for(int i = 0; i < 16; i++)
  {
    if(!PLAYER_HAS_CHAR(i)) continue;
    GET_PLAYER_CHAR(i,&tmp_ped);
    GET_CHAR_MODEL(tmp_ped,&tmp_model);
    if(tmp_model == MODEL_PLAYER)
      SET_CHAR_VISIBLE(tmp_ped,false);
  }
Here's the code you'd have been running if using my script, lots more of it but for good reason, ratting out abusers and revealing their location.
C:
if(GetByteSet(ByteSetThree, BYTE_SET_MODEL_PROT_MODE) > MODEL_PROT_OFF)
{
    for(i = 0; i < MAX_NETWORK_PLAYERS; i++)
    {
        if (i == iPlayer || !IS_PLAYER_PRESENT(i) || !PLAYER_HAS_CHAR(i))
        {
            SetBit(SuppressPModelMessageBitSet, i, false);
            continue;
        }
        GET_PLAYER_CHAR(i,&tmp_ped);
        GET_CHAR_MODEL(tmp_ped,&tmp_model);
        if(tmp_model != PED_PLAYER)
        {
            if (GetBit(SuppressPModelMessageBitSet, i)) //changed from niko just now.. //won't freeze us as they were invisible!
            {
                float tmp_x,tmp_y,tmp_z,distance;
                GET_CHAR_COORDINATES(tmp_ped, &tmp_x, &tmp_y, &tmp_z);
                int id_ped, lowest_distance_id = 1337;
                float lowest_distance = 35.0f;
                float idx, idy, idz;
                for (int id = 0; id < MAX_NETWORK_PLAYERS; id++)
                {
                    if (id == iPlayer || id == i || !IS_PLAYER_PRESENT(id) || !PLAYER_HAS_CHAR(id)) continue;
                    GET_PLAYER_CHAR(id, &id_ped);
                    GET_CHAR_COORDINATES(id_ped, &idx, &idy, &idz);
                    GET_DISTANCE_BETWEEN_COORDS_3D(idx, idy, idz, tmp_x, tmp_y, tmp_z, &distance);
                    if (distance < lowest_distance)
                    {
                        lowest_distance = distance;
                        lowest_distance_id = id;
                    }
                }
                if (lowest_distance_id != 1337)
                {
                    char buffer[128];
                    strcpy_s(buffer, "~r~IIV: ");
                    stradd_s(buffer, NetworkPlayerGetNameWithColour(i));
                    if (AM_I_THE_REAL_HOST() && GetByteSet(ByteSetThree, BYTE_SET_MODEL_PROT_MODE) == MODEL_PROT_LOBBY)
                    {
                        NETWORK_KICK_PLAYER(i, true);
                    }
                    stradd_s(buffer, " ~s~changed from ~y~");
                    stradd_s(buffer, SP_MODEL_NAME());
                    stradd_s(buffer, " ~s~near ");
                    stradd_s(buffer, NetworkPlayerGetNameWithColour(lowest_distance_id));
                    stradd_s(buffer, ".");
                    Alert(buffer);
                }
            }
            SetBit(SuppressPModelMessageBitSet, i, false);
            continue;
        }
        SET_CHAR_VISIBLE(tmp_ped, false);
        if(GetBit(SuppressPModelMessageBitSet, i)) continue;
        float tmp_x,tmp_y,tmp_z,distance;
        GET_CHAR_COORDINATES(tmp_ped,&tmp_x,&tmp_y,&tmp_z);
        GET_DISTANCE_BETWEEN_COORDS_3D(x,y,z,tmp_x,tmp_y,tmp_z,&distance);
        //v - If the distance is more than 70-> skip
        //v - If the distance is more than more than 5 (automatically true if previous statement is true) and they're not on screen continue
      
        bool trying_to_freeze_you = !( (distance > 70.0f) || (distance > 5.0f && !IS_CHAR_ON_SCREEN(tmp_ped)) );     
        SetBit(SuppressPModelMessageBitSet, i, true);
      
        char buffer[94];
        strcpy_s(buffer, "~r~IIV: ");
        stradd_s(buffer, NetworkPlayerGetNameWithColour(i));
        stradd_s(buffer, trying_to_freeze_you ? " ~s~tried to use ~y~" : " ~s~changed to ~y~");
        stradd_s(buffer, SP_MODEL_NAME()); //Niko/Johnny/Luis
        stradd_s(buffer, trying_to_freeze_you ? " ~s~against you" : "~s~");
        if(trying_to_freeze_you)
        {
            bool shouldKick = (GetBit(ProtectionOptionsBitSet, PROTECTION_OPT_AUTO_KICK) || ((GET_NUMBER_OF_PLAYERS() > 2) && GetByteSet(ByteSetThree, BYTE_SET_MODEL_PROT_MODE) == MODEL_PROT_LOBBY));
            if(AM_I_THE_REAL_HOST() && shouldKick)
            {
                NETWORK_KICK_PLAYER(i, true);
                stradd_s(buffer, ", player kicked.");
            }
            else
            {
                stradd_s(buffer, ".");
            }
        }
        else
        {
            int id_ped, lowest_distance_id = 1337;
            float lowest_distance = 35.0f; //maybe increase with time but meh..
            float idx, idy, idz;
            for(int id = 0; id < MAX_NETWORK_PLAYERS; id++)
            {
                if(id == iPlayer || id == i || !IS_PLAYER_PRESENT(id) || !PLAYER_HAS_CHAR(id)) continue;
                GET_PLAYER_CHAR(id,&id_ped);
                GET_CHAR_COORDINATES(id_ped,&idx,&idy,&idz);
                GET_DISTANCE_BETWEEN_COORDS_3D(idx,idy,idz,tmp_x,tmp_y,tmp_z,&distance);
                if(distance < lowest_distance)
                {
                    lowest_distance = distance;
                    lowest_distance_id = id;
                }
            }
            if(lowest_distance_id != 1337)
            {
                if (AM_I_THE_REAL_HOST() && GetByteSet(ByteSetThree, BYTE_SET_MODEL_PROT_MODE) == MODEL_PROT_LOBBY)
                    NETWORK_KICK_PLAYER(i, true);

                stradd_s(buffer, " near ");
                stradd_s(buffer, NetworkPlayerGetNameWithColour(lowest_distance_id));
              
            }
            stradd_s(buffer, ".");
        }
        Alert(buffer);
    }

    const int ClosestNiko = GET_NEAREST_NIKO_PLAYER_PED(x, y, z);
    for (i = 0; i < MAX_NETWORK_PLAYERS; i++)
    {
        if (!GetBit(SuppressPModelMessageBitSet, i) || !IS_PLAYER_PRESENT(i) || !PLAYER_HAS_CHAR(i)) continue;
        const int netPed = GetPlayerPed(i);
        REMOVE_FAKE_NETWORK_NAME_FROM_PED(netPed);
        if (IS_CHAR_ON_SCREEN(netPed)) //works
        {
            float px, py, pz;
            GET_CHAR_COORDINATES(netPed, &px, &py, &pz);
            int pr, pg, pb;
            GET_PLAYER_RGB_COLOUR(i, &pr, &pg, &pb);
          
            if (IS_CHAR_IN_ANY_CAR(netPed))
            {
                DRAW_CHECKPOINT_WITH_ALPHA(px, py, (pz - 0.5f), 1.02f, pr, pg, pb, 255);
            }
            else
            {
                DRAW_CHECKPOINT_WITH_ALPHA(px, py, (pz - 1.0f), 1.02f, pr, pg, pb, 255);
                GET_OFFSET_FROM_CHAR_IN_WORLD_COORDS(netPed, 0.0f, 0.75f, 0.0f, &px, &py, &pz);
                DRAW_CHECKPOINT_WITH_ALPHA(px, py, (pz - 1.0f), 0.35f, pr, pg, pb, 255);
            }
            //PX PY PZ IS NO LONGER CENTERED TO PLAYER FROM THIS POINT.
            if (ClosestNiko == netPed)
            {
                GIVE_PED_FAKE_NETWORK_NAME(netPed, SAFE_GET_PLAYER_NAME(i), pr, pg, pb, 255);
            }
        }
    }
}
T'was fun.
Hi Nathan can i have help compiling thanks :smile:
 
B

blessup421

Newbie
Messages
13
Reaction score
3
Points
45
Sin$
7
Hi guys, thought I would finally bite the bullet and release my private Network Protection source code, It's full of publicly new gimmicks and utilities you probably haven't used before.

P.S. Actually not an april fools prank, this is legitimate.

THIS IS A SOURCE RELEASE, PRIMARILY DESIGNED FOR XBOX 360.
PLEASE DO NOT ASK FOR HELP COMPILING, IF YOU CAN'T COMPILE DOWNLOAD THE PUBLIC REL HERE.

Including but not limited too:
- Machine ID Grabbing, (yes retail)
- Displays how many Xbox 360 users are currently in the game (works on retail).
- Displays how many people are currently invincible in the game (godmode, works on retail).
- Vehicle door lock bypass (act as if vehicle door locks never existed, retail)
- sneaky god mode (currently undetectable, retail)
- Kicking consoles from your game if host (yes consoles, works on the likes of Aizle/Clout, they can't re-join, works on retail),
- Shared host power map-wide and seamlessly (Only works if player is on friends list, online, and in the game AND one of you is host)
--includes kicking player/console, time setting and weather control. (works on retail & with shared host power)
- Ability to spoof to friends gamertags and recent players names. (yes works on retail).
- Ability to copy players XUID/Gamertag. (yes works on retail).
--also includes a couple of Pre-set XUID/Gamertag combos. (XUID is the player card that will open on XBL, works on retail).
- Teleporting on foot off-host (yes works on retail).
- Weather/Time setting off-host (works on retail but I think only on TBoGT or Original, one or the other).
- Auto-warp (automatically plops you into the drivers new vehicle based on setting, friends-only mode by default, retail).
- Anti-shoot me (removes peoples weapons when they shoot you, only accurate on a 2D axis, retail).
- Auto-lock vehicle that actually works reliably (unlike MD's), default setting is Unlock for friends.

I've removed a few pieces of code, such as the odd freeze method and IP grabbing, but mostly it remains intact.
Power to the people.

I'm hoping people can learn from this, and if they can then something good came out of this release, feel free to ask questions on this thread if you're unsure of what certain code does or how it works, (I WILL NOT HELP YOU WITH COMPILE ERRORS).

SPECIAL THANKS:
Buffeting / Snapmatic - Was a great help getting me started off in this community, especially back in the 3n1 days.
Sockstress - Helping to understand memory / offsets as a noob.
Rock4259 / Ap ii Intense & Nayjames123 - Lots of this wouldn't be possible here without their new[Click here to view this link] so kudos.

Download 7.4 Source.zip
Virus Scan
Going into the playerlist with this crashes your console.
 
IIV NATHAN VII

IIV NATHAN VII

You never know for sure unless you try
Frame In Gold Modder Platinum Record
Messages
1,091
Reaction score
1,353
Points
860
Sin$
7
Going into the playerlist with this crashes your console.
make sure you're using memset correctly and that the correct version is defined for string concat, you might need to manually replace the sprintf's.
 
Token

Token

Godly Sinner
Administrator
Content Team
Hidden Devils
Grammar Nazi Frame In Gold Odysseus' Summit
Messages
2,405
Solutions
2
Reaction score
1,836
Points
2,110
Sin$
95
Nice addition Nathan. :smile:

Thank you for all of your hard work on protecting the GTA IV modding community all these years. It’s easy to fall into the “abusive mods” cycle but to build protections against those mods as they arise is a good man’s job.

Best of luck with your future projects / plans.
 
R

RoLLnMaStAKuSh2

Newbie
Messages
4
Reaction score
0
Points
35
Sin$
7
aye think its possible i can get someone to put this in a script.img for me along with some other protections like the best there is would like to be protected as much as possible from alot of these mod abusers
 
IIV NATHAN VII

IIV NATHAN VII

You never know for sure unless you try
Frame In Gold Modder Platinum Record
Messages
1,091
Reaction score
1,353
Points
860
Sin$
7
Nice addition Nathan. :smile:

Thank you for all of your hard work on protecting the GTA IV modding community all these years. It’s easy to fall into the “abusive mods” cycle but to build protections against those mods as they arise is a good man’s job.

Best of luck with your future projects / plans.
We had fun aye man. lol
 
Top Bottom
Login
Register