Detecting weapon hack
#1

Any suggestion on how to detect when players are hacking weapons inside a vehicle?
Reply
#2

OnPlayerUpdate > If get player weapon > ID > Forbidden? > BAN!
Reply
#3

pawn Код:
new gunid = GetPlayerWeapon(playerid); //  defining the weapon ID spawned by the hacker
new str[128], pname[MAX_PLAYER_NAME]; // creates an array to define the amount of letters in a the line, and defines the player name, so we can format and send the ban text.


if(gunid == 38) // Checks the type of the weapon ID
{
GetPlayerName(playerid, pname, sizeof(pname)); // Gets the player name

format(str,sizeof(str), "%s has been banned by the anti-cheat for weapon hacks.", pname); formats the size of the string and sends it in form a text


SendClientMessageToAll(0xFF0000AA, str); // Sends a public text
Ban(playerid); // bans the player spawning the weapon
}
return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)