OnPlayerUpdate Anti Weapon Hack (Urgent)
#1

Hi guys, I have this on OnPlayerUpdate. It's supposed to ban the person if they aren't admin and have an RPG.

pawn Код:
new weaponid = GetPlayerWeapon(playerid);
    if(PlayerInfo[playerid][pAdmin] <= 1 && weaponid == 38 || weaponid == 35 || weaponid == 36) //anti minigun and rpg
    {
    PlayerInfo[playerid][pBand] = 3;
    PlayerInfo[playerid][pPermBand] = 1;
    SendClientMessageToAll(COLOR_LIGHTRED, "{CC1100}{CC1100}AdmCmd:{FFFFFF}{FFFFFF} Another user was just banned by Leslie's Anti-Weapon hack!");
    BanEx(playerid, "Banned by Leslie, Reason: Hacked Minigun/RPG");
    }
    else {
    return 1;
    }
EDIT:

Fixed, code above it was stopping it from working.
Reply
#2

Try this.

pawn Код:
if(PlayerInfo[playerid][pAdmin] <= 1)
{
    new weaponid = GetPlayerWeapon(playerid);
    if(weaponid == 38 || weaponid == 35 || weaponid == 36) //anti minigun and rpg
    {
        PlayerInfo[playerid][pBand] = 3;
        PlayerInfo[playerid][pPermBand] = 1;
        SendClientMessageToAll(COLOR_LIGHTRED, "{CC1100}{CC1100}AdmCmd:{FFFFFF}{FFFFFF} Another user was just banned by Leslie's Anti-Weapon hack!");
        BanEx(playerid, "Banned by Leslie, Reason: Hacked Minigun/RPG");
        return 1;
    }
}
return 1;
A logic error.
Reply
#3

Quote:
Originally Posted by Backwardsman97
Посмотреть сообщение
Try this.

pawn Код:
if(PlayerInfo[playerid][pAdmin] <= 1)
{
    new weaponid = GetPlayerWeapon(playerid);
    if(weaponid == 38 || weaponid == 35 || weaponid == 36) //anti minigun and rpg
    {
        PlayerInfo[playerid][pBand] = 3;
        PlayerInfo[playerid][pPermBand] = 1;
        SendClientMessageToAll(COLOR_LIGHTRED, "{CC1100}{CC1100}AdmCmd:{FFFFFF}{FFFFFF} Another user was just banned by Leslie's Anti-Weapon hack!");
        BanEx(playerid, "Banned by Leslie, Reason: Hacked Minigun/RPG");
        return 1;
    }
}
return 1;
A logic error.
Didn't work.
Reply
#4

Then there's a problem elsewhere.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)