hello all today i wrote a simple anti weapon hack sctript that fits my servers variables but i have a simple problem that my mind cant accept.
this is my script and apparently i cant use asd in it becuase its a string and tell me that i need to index it:
any help is appreciated
this is my script and apparently i cant use asd in it becuase its a string and tell me that i need to index it:
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)
{
say1[ii]++;
}
}
for(new aa=0; aa<12; aa++)
{
new wid,wam;
GetPlayerWeaponData(ii,aa,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);
}
}
}