Help with anti armour hack!
#1

Anti Armour Hack


When i connect to the server i get instantly banned when im spawning for armout hack and i dont see why!

My Anti Armour Hack:
pawn Код:
new pArmour[MAX_PLAYERS];

public OnPlayerSpawn(playerid)
{
    AntiCheat_SetPlayerArmour(playerid, 0);
    return 1;
}

public OnPlayerUpdate(playerid)
{
    new Float:Armour;
    if(GetPlayerArmour(playerid, Armour) > pArmour[playerid])
    }
        SendClientMessage(playerid, -1, ""Red"AntiCheat: You've got banned for armour cheating! ");
        format(string, sizeof(string), ""Red"AntiCheat: %s Banned | Reason: Armour Cheats! ", GetName(playerid));
        SendClientMessageToAll(-1, string);
        BanEx(playerid, "Banned By: SERVER | Reason: Armour Cheats! ");
    }
    else if(GetPlayerArmour(playerid, Armour) < pArmour[playerid])
    {
         pArmour[playerid] = GetPlayerArmour(playerid, Armour);
    }
    return 1;
}

stock AntiCheat_SetPlayerArmour(playerid, amount)
{
    pArmour[playerid] = amount;
    SetPlayerArmour(playerid, amount);
}
Do anyone know why im getting instant banned on spawn?

Forgot the GetName stock!
Edit:
pawn Код:
stock GetName(playerid)
{
    new pName[24];
    GetPlayerName(playerid, pName, 24);
    return pName;
}
Reply
#2

Possibly because:
http://gyazo.com/a666c4aeb261cdeff72b8a0f7d4582bb
You need to change it too a "{" Opening brace
Reply
#3

Quote:
Originally Posted by Infinity90
Посмотреть сообщение
Possibly because:
http://gyazo.com/a666c4aeb261cdeff72b8a0f7d4582bb
You need to change it too a "{" Opening brace
oops i were changing the code before posting it, didnt notice that but it still dosnt work with "{"
Reply
#4

EDIT: Nevermind too late.
Reply
#5

Quote:
Originally Posted by zxc1
Посмотреть сообщение
EDIT: Nevermind too late.
Edit: xD
Reply
#6

pawn Код:
if(GetPlayerArmour(playerid, Armour) > pArmour[playerid])
That's not how it works! If it were that easy, then why would we still need that variable? Read the wiki.
Reply
#7

if i may recommend https://sampforum.blast.hk/showthread.php?tid=419034

stock AntiCheat_SetPlayerArmour(playerid, amount)
{
pArmour[playerid] = amount;
SetPlayerArmour(playerid, amount);
}

pawn Код:
new Float:pArmour[MAX_PLAYERS];

stock AntiCheat_SetPlayerArmour(playerid, Float:amount)
{
    pArmour[playerid] = amount;
    SetPlayerArmour(playerid, amount);
}
Also What about if the player is shot does the system Accommodate that
Reply
#8

Quote:
Originally Posted by Glad2BeHere
Посмотреть сообщение
if i may recommend https://sampforum.blast.hk/showthread.php?tid=419034

stock AntiCheat_SetPlayerArmour(playerid, amount)
{
pArmour[playerid] = amount;
SetPlayerArmour(playerid, amount);
}

pawn Код:
new Float:pArmour[MAX_PLAYERS];

stock AntiCheat_SetPlayerArmour(playerid, Float:amount)
{
    pArmour[playerid] = amount;
    SetPlayerArmour(playerid, amount);
}
Also What about if the player is shot does the system Accommodate that
1. Didnt work

2. Dosnt this work if the player gets shot?
pawn Код:
else if(GetPlayerArmour(playerid, Armour) < pArmour[playerid])
    {
         pArmour[playerid] = GetPlayerArmour(playerid, Armour);
    }
Reply
#9

It works for health but not armour, i dont understand why its not working for armour
Reply
#10

Did you just ignore my post?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)