Anti-WeaponHack - Problem
#1

Sometimes when people connect to server.weapon hack kicks them(kicks innocent people).




Quote:

OnGamemodeinit

Quote:

SetTimer("WeaponHack", 1000, 1);

Quote:

forward WeaponHack(playerid);
public WeaponHack(playerid)
{
for(new i; i < MAX_PLAYERS; i++)
{
new sendername[MAX_PLAYER_NAME];
GetPlayerName(i, sendername, sizeof(sendername));
new string[256];
if(GetPlayerWeapon(i) == 35 || GetPlayerWeapon(i) == 37 || GetPlayerWeapon(i) == 38 || GetPlayerWeapon(i) == 17)
{
format(string, sizeof(string), "%s a primit Kick de la BOT, Motiv: Weapon Hack",sendername);
SendClientMessageToAll(COLOR_RED, string);
Kick(i);
return 1;
}
}
return 1;
}

Reply
#2

Make a timer and don't use OPU callback. Check if they're spawned, if they're not return 1 to the timer's callback for not checking, after they spawn (first time), check if they have the x, y etc. weapons and kick them.
Reply
#3

The best way to make anti weapon hacks without using any timer is by using OnPlayerKeyStateChange callback
pawn Код:
if(newkeys & KEY_FIRE && GetPlayerWeapon(playerid) == 35)
{
    Kick(playerid);
}
They can have the weapons, but they can't shoot. If they shoot, they will get kicked.
Reply
#4

Hello!
I don't know lots of that script but 100% THIS guy will help you! He is AWESOME scripter + mapper...
TRUST ME
Here is my scripter's skype: savaldivieso

IF I help you,please +REP me to advertise my RP server
Reward,
SupermanV
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)