Well, Is there anyway? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Well, Is there anyway? (
/showthread.php?tid=375132)
Well, Is there anyway? - Jarnu - 05.09.2012
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:
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;
}
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??
Re: Well, Is there anyway? -
Faisal_khan - 05.09.2012
[Include] [INC]EasyNames
This may help you.