05.09.2012, 14:21
Is there anyway to search for PART OF NICK.. from the logs..
like i have a folder where my bans get saved.. i want to search for a ban with in-game command..
i have created it and it works perfect
the CMD:
but the problem is.. it search for a PROPER NAME: .. ex: "/sban Jarnu", it only search like that..
it doesn't works "/sban Ja"
So, i just want to know is there anyway to make it like that??
like i have a folder where my bans get saved.. i want to search for a ban with in-game command..
i have created it and it works perfect
the CMD:
pawn Код:
CMD:sban(playerid, params[])
{
if(PlayerInfo[playerid][pLevel] >= 2) {
new file[256], name[256], aname[256], pname[256], reason[256], string[256];
new count = 0;
if(sscanf(params,"s[256]",name)) {
SendClientMessage(playerid, RED,"USAGE: /sban [name]");
} else {
format(file,sizeof(file),"AVC/Bans/%s.ini",name);
if(INI_Exist(file))
{
count++;
INI_Open(file);
INI_ReadString(aname,"Admin",256);
INI_ReadString(pname,"Player",256);
INI_ReadString(reason,"Reason",256);
format(string, sizeof(string),""cred"PlayerName: %s | Admin Name: %s | Reason: %s",pname, aname, reason);
SendClientMessage(playerid, RED,string);
CMDMessageToAdmins(playerid,"SBAN");
}
else if(count == 0) {
SendClientMessage(playerid, RED,"No ban on this name");
}
}
}
else return SendClientMessage(playerid, RED,"ERROR: You are not high enough level to use this command!");
return 1;
}
it doesn't works "/sban Ja"
So, i just want to know is there anyway to make it like that??