Help with anti armour hack! -
paul988 - 27.02.2013
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;
}
Re: Help with anti armour hack! -
Infinity90 - 27.02.2013
Possibly because:
http://gyazo.com/a666c4aeb261cdeff72b8a0f7d4582bb
You need to change it too a "{" Opening brace
Re: Help with anti armour hack! -
paul988 - 27.02.2013
Quote:
Originally Posted by Infinity90
|
oops i were changing the code before posting it, didnt notice that but it still dosnt work with "{"
Re: Help with anti armour hack! -
zxc1 - 27.02.2013
EDIT: Nevermind too late.
Re: Help with anti armour hack! -
paul988 - 27.02.2013
Quote:
Originally Posted by zxc1
EDIT: Nevermind too late.
|
Edit: xD
Re: Help with anti armour hack! -
Vince - 27.02.2013
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.
Re: Help with anti armour hack! -
Glad2BeHere - 27.02.2013
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
Re: Help with anti armour hack! -
paul988 - 27.02.2013
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);
}
Re: Help with anti armour hack! -
paul988 - 27.02.2013
It works for health but not armour, i dont understand why its not working for armour
Re: Help with anti armour hack! -
Vince - 27.02.2013
Did you just ignore my post?