armour hack anti cheat ain't working. - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: armour hack anti cheat ain't working. (
/showthread.php?tid=372217)
armour hack anti cheat ain't working. -
jueix - 25.08.2012
Ok so i havn't scripted in a while and encountered a new problem in my server when coding.
Here is my code.
pawn Код:
forward ahack1(playerid);
public ahack1(playerid)
{
new Float:armour;
armour = GetPlayerArmour(playerid, armour);
if(armour > 1 && PlayerInfo[playerid][pAllowedArmour] < 1)
{
new string[200];
format(string,sizeof(string),"You appear to be armour hacking reseting armour");
new string1[200];
new pname[MAX_PLAYER_NAME]; //the name of player two (the reported)
GetPlayerName(playerid,pname,sizeof(pname)); //get (receive) the player's name for the first
format(string1,sizeof(string1),"%s appear's to be armour hacking [Dosn't have armour rights]",pname);
GameTextForPlayer(playerid, string, 1000, 0);
SendMessageToAdmins(COLOR_WHITE,string1); //we'll talk about that later
SetPlayerArmour(playerid, 0);
}
return 1;
}
Ok so if a player has more than 1 armour and if not allowed is less than 1 its ment to do that script but it isn't. If i chane the line from this if(armour > 1 && PlayerInfo[playerid][pAllowedArmour] < 1) //and his level gotta be at least 1 (or higher) to this if(armour > 0 && PlayerInfo[playerid][pAllowedArmour] < 1) //and his level gotta be at least 1 (or higher) it spams the server. But if its the first one it dosn't do what its ment to.
Re: armour hack anti cheat ain't working. -
ikkentim - 26.08.2012
When are you modifying PlayerInfo[playerid][pAllowedArmour] ?
Also,
Try this
if(armour > PlayerInfo[playerid][pAllowedArmour] +5) //+5 is optional for lag compensation
Re: armour hack anti cheat ain't working. -
Dragony92 - 26.08.2012
Check this out...
https://sampforum.blast.hk/showthread.php?tid=220089