Anti ammo hack [REP++++]
#1

I made this anti ammo hack
PHP код:
public OnPlayerKeyStateChange(playeridnewkeysoldkeys)
{
    if(
HOLDING(KEY_FIRE))
    {
        
bAmmo[playerid] = GetPlayerAmmo(playerid);
        
bWeapon[playerid] = GetPlayerWeapon(playerid);
        if(
GetPlayerWeapon(playerid) < 16 || GetPlayerWeapon(playerid) == 19 || GetPlayerWeapon(playerid) == 20 || GetPlayerWeapon(playerid) == 21 || GetPlayerWeapon(playerid) > 38) return 0;
        for(new 
07;i++)
        {
            
nAmmo[playerid] = GetPlayerAmmo(playerid);
            
nWeapon[playerid] = GetPlayerWeapon(playerid);
        }
        if(
bAmmo[playerid] == nAmmo[playerid] && bWeapon[playerid] == nWeapon[playerid])
        {
            new 
string[128];
            new 
name[MAX_PLAYER_NAME], string1[24+MAX_PLAYER_NAME];
            
format(string,sizeof(string),"%s has banned for ammo hack",name);
            
SendClientMessageToAll(0xAA3333AA,string);
            
SetTimerEx("ban",500,false,"i",playerid);
            
SendClientMessage(playerid0xAA3333AA,"You have banned from the server ");
            
printf("Cheat Detect");
            
#pragma unused string1
        
}
    }
    return 
1;
}
forward ban(playerid);
public 
ban(playerid)
{
    
BanEx(playerid"Ammo Hack");
    return 
1;

It didn't work and didn't print the word.
Please Help
REP+++++
Reply
#2

I'm placing my bets on your very first if-statement. Do you know what "holding" means? It means holding one key and then pressing another key so the callback gets called again. Try changing that into PRESSED or RELEASED.

Also: debug, debug, debug.
Reply
#3

Nothing i tried the realse and the pressed nothing happend..
Please this is very important because this isn't for me
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)