Easy WeaponHack
#1

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 
Reply
#2

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


Forum Jump:


Users browsing this thread: 1 Guest(s)