SA-MP Forums Archive
Easy WeaponHack - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Easy WeaponHack (/showthread.php?tid=578780)



Easy WeaponHack - NoDi522 - 22.06.2015

Hey guys so i made this now and i get errors,and if you can tell me if this would work without errors.

Under: OnPlayerUpdate

PHP код:
    for(new player 0player MAX_PLAYERSplayer++)
    for(new 
weapon 0weapon != AlertWeaponsweapon++)
    {
        if(
GetPlayerWeapon(player) == AlertWeapons(weapon))
        {
            new 
poruka[256];
            
format(poruka,256,""COLOR_CRVENA"[ ANTICHEAT ]:{FFFFFF} %s vjerovatno koristi WeaponHack. Poduzmite mjere!",GetName(player));
            
SendAdminMessage(-1,poruka);
            
ResetPlayerWeapons(player) && SendClientMessage(playerid,-1,""COLOR_CRVENA"ANTICHEAT:{FFFFFF} Kikovani ste od strane anticheata. Razlog: WeaponHack");
            
SetTimerEx("KickPlayer",1000,false,"d",player);
        }
        else if(
GetPlayerWeapon(player) != AlertWeapons(weapon)) return 0;
    } 
AlertWeapons:

PHP код:
new AlertWeapons[] =
{
    
2,
    
16,
    
18,
    
35,
    
36,
    
37,
    
38,
    
39,
    
40
}; 
PHP код:
C:\Users\Dino Covic\Desktop\SAMP Server\gamemodes\Server_Skripta.pwn(2961) : error 033: array must be indexed (variable "AlertWeapons")
C:\Users\Dino Covic\Desktop\SAMP Server\gamemodes\Server_Skripta.pwn(2963) : error 012invalid function callnot a valid address
C
:\Users\Dino Covic\Desktop\SAMP Server\gamemodes\Server_Skripta.pwn(2963) : warning 215expression has no effect
C
:\Users\Dino Covic\Desktop\SAMP Server\gamemodes\Server_Skripta.pwn(2963) : error 001expected token";"but found ")"
C:\Users\Dino Covic\Desktop\SAMP Server\gamemodes\Server_Skripta.pwn(2963) : error 029invalid expressionassumed zero
C
:\Users\Dino Covic\Desktop\SAMP Server\gamemodes\Server_Skripta.pwn(2963) : fatal error 107too many error messages on one line 



Re: Easy WeaponHack - NoDi522 - 22.06.2015

Now i find out that instead of looping weapons i could just use GetPlayerWeapon