About Weapon Hack
#1

Hi, guys !
About an issue, i'd like to ask your permission:
How can i do anti weapon hack (detect)
- So for example:
/weapon command: minigun weapon > Not Hack.
Cleo weapon hack: minigun weapon > Hack Detect and Kick !
Reply
#2

Up !
Reply
#3

To check:
SetTimer/Ex
or
CallBack OnPlayerUpdate

To permission:
IsPlayerAdmin
or
Your admin variable

To weapons:
Weapons
Reply
#4

Create a server sided weapon giving function. Assign a variable (true/1) to the given weapon ID to indicate that it is server sided. And inside a timer function, check if a player has some weapons but the variable is still (false/0) which means the weapons are not server sided, then ban the player.

I am using this method for a quiet while and it's effective.
Reply
#5

Working, thanks solved.

- For SetTimer performance loss:
Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
        if((newkeys & KEY_FIRE) && !(oldkeys & KEY_FIRE)){
        new weap = GetPlayerWeapon(playerid);
        if(weap > 1 && weap != 46 && Weapon[playerid][weap] == false)
        {
        /*     Kick or Ban and message.     */
        }}
        return 1;
}
Reply
#6

Quote:
Originally Posted by ProRakNet
Посмотреть сообщение
Working, thanks solved.

- For SetTimer performance loss:
Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
        if((newkeys & KEY_FIRE) && !(oldkeys & KEY_FIRE)){
        new weap = GetPlayerWeapon(playerid);
        if(weap > 1 && weap != 46 && Weapon[playerid][weap] == false)
        {
        /*     Kick or Ban and message.     */
        }}
        return 1;
}
Why you color the code? xD
use [php] instead if you want some colors lol :P
Reply
#7

Quote:
Originally Posted by oMa37
Посмотреть сообщение
Why you color the code? xD
use [php] instead if you want some colors lol :P
yes, big fail.. but this is more sexy
Reply
#8

Код:
public GivePlayerWeaponEx(playerid,weaponid,ammo)
{
    Weapon[playerid][weaponid] = true;
    return GivePlayerWeapon(playerid,weaponid,ammo);
}
Kindly Explain but to use that You need to change all GivePlayerWeapon in game to GivePlayerWeaponEx
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)