Usage of variable
#2

PHP Code:
public wepcheat(playerid)
{
    new 
say1[MAX_PLAYERS],say2[MAX_PLAYERS];
    for(new 
ii=0ii<MAX_PLAYERS;ii++)
    {
        for(new 
i=13i++)
        {
            new 
asd[15];
            
format(asd,sizeof(asd),"[GUN%d]",i);
            if(
USER[ii]asd!=0// <- WRONG as asd is a string correct this
            
{
                
say1[ii]++;
            }
        }
        for(new 
aa=0aa<12aa++)
        {
            new 
wid,wam;
            
GetPlayerWeaponData(ii,wid,wam);
            if(
wid!=0)
            {
                
say2[ii]++;
            }
            
        }
        if(
say1[ii]!=say2[ii])
        {
            new 
rcontext[40],bantext[128];
            
format(bantext,sizeof(bantext),"ADMCMD-AUTOBAN: %s has been banned. Reason: Weapon hacks.");
            
SendClientMessageToAll(COLOR_RED,bantext);
            
format(rcontext,sizeof(rcontext),"ban %d",ii);
            
SendRconCommand(rcontext);
        }
    }

Reply


Messages In This Thread
Usage of variable - by grymtn - 25.09.2017, 22:04
Re: Usage of variable - by kAn3 - 25.09.2017, 22:16
Re: Usage of variable - by grymtn - 25.09.2017, 22:22
Re: Usage of variable - by Misiur - 25.09.2017, 22:26
Re: Usage of variable - by grymtn - 25.09.2017, 22:31
Re: Usage of variable - by CodeStyle175 - 25.09.2017, 22:33
Re: Usage of variable - by kAn3 - 25.09.2017, 22:38
Re: Usage of variable - by grymtn - 26.09.2017, 00:46

Forum Jump:


Users browsing this thread: 1 Guest(s)