25.09.2017, 22:16
PHP Code:
public wepcheat(playerid)
{
new say1[MAX_PLAYERS],say2[MAX_PLAYERS];
for(new ii=0; ii<MAX_PLAYERS;ii++)
{
for(new i=1; i < 3; i++)
{
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=0; aa<12; aa++)
{
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);
}
}
}