Very Important
#1

i made this to check for anti ammo hack but it didn't work please very important
PHP код:
public OnPlayerKeyStateChange(playeridnewkeysoldkeys)
{
    if ((
oldkeys KEY_FIRE) && !(newkeys 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;
        
SetTimerEx("check",1000,false,"i",playerid);
    }
        return 
1;
}
forward check(playerid);
public 
check(playerid)
{
            
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];
                
GetPlayerName(playeridnamesizeof(name));
                if(
pm[playerid] == false && sm[playerid] == false)
                {
                    
format(string,sizeof(string),"%s has banned for ammo hack",name);
                    
SendClientMessageToAll(0xAA3333AA,string);
                    
SendClientMessage(playerid0xAA3333AA,"You have banned from the server ");
                }
                
printf("Cheat Detect");
                
SetTimerEx("ban",500,false,"i",playerid);
                
pm[playerid] = true;
                
sm[playerid] = true;
                
#pragma unused string1
            
}
            return 
1;

Reply
#2

https://sampforum.blast.hk/showthread.php?tid=507416
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)