[HELP]Command [INI][REP] - 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: [HELP]Command [INI][REP] (
/showthread.php?tid=373370)
[HELP]Command [INI][REP] - Jarnu - 30.08.2012
pawn Код:
CMD:sban(playerid, params[])
{
new fstring[250], log[250], ban[200];
if(sscanf(params,"i",ban)) {
SendClientMessage(playerid, RED,"USAGE: /sban [IP]");
}
format(log, sizeof(log),"AVC/Logs/BanLog.txt");
if(!fexist(log)) return SendClientMessage(playerid, RED,"BanLogs.txt doesn't exist in the AVC folder!");
INI_Open(log);
INI_StripLine(ban);
INI_Close();
format(fstring, sizeof(fstring),"%s",ban);
SendClientMessage(playerid, RED,fstring);
return 1;
}
I want to make /searchban command to search ban for a particular IP.. but it doesn't works.. "above".
Can anyone help ?
I use SII
+REP for sure..
Re: [HELP]Command [INI][REP] -
rohancoolking - 30.08.2012
Replace it with
pawn Код:
CMD:sban(playerid, params[])
{
new fstring[250], log[110], ban[200];
if(sscanf(params,"i",ban)) {
SendClientMessage(playerid, RED,"USAGE: /sban [IP]");
}
format(log, sizeof(log),"AVC/Logs/BanLog.txt");
if(!fexist(log))
return SendClientMessageEx(playerid, RED,"BanLogs.txt doesn't exist in the AVC folder!");
INI_Open(log);
INI_StripLine(ban);
INI_Close();
format(fstring, sizeof(fstring),"%s",ban);
SendClientMessage(playerid, RED,fstring);
return 1;
}
Re: [HELP]Command [INI][REP] -
XtremeR - 30.08.2012
Try this maybe will work ..
pawn Код:
CMD:sban(playerid, params[])
{
new fstring[250];
new log[110];
new ban[200];
if(sscanf(params,"i",ban))
{
SendClientMessage(playerid, RED,"USAGE: /sban [IP]");
}
format(log, sizeof(log),"AVC/Logs/BanLog.txt");
if(!fexist(log))
return SendClientMessageEx(playerid, RED,"BanLogs.txt doesn't exist in the AVC folder!");
INI_Open(log);
INI_StripLine(ban);
INI_Close();
format(fstring, sizeof(fstring),"%s",ban);
SendClientMessage(playerid, RED,fstring);
return 1;
}