format(cmdstring, sizeof(cmdstring), "unbanip %s", pIP(playerid));
format(cmdstring, sizeof(cmdstring), "unbanip %s", pIP[playerid]);
pIP[22] |
format(cmdstring, sizeof(cmdstring), "unbanip %s", pIP);
CMD:unban(playerid, params[]) { new string[128],tname[24]; if(sscanf(params, "s[24]", tname)) return SendClientMessage(playerid,-1,""chat" Usage: /unban [playerid]"); new filestring[79]; format(filestring, sizeof(filestring), "/Users/%s.ini", tname); if(!fexist(filestring)) return SendClientMessage(playerid,-1,""chat""COL_RED" This player does not exist!"); else { new INI:File = INI_Open(filestring); INI_SetTag(File, "data"); INI_WriteInt(File, "pBanned",0); INI_Close(File); INI_ParseFile(filestring, "LoadIP_%s", .bExtra = true , .extra = playerid); new cmdstring[44]; format(cmdstring, sizeof(cmdstring), "unbanip %s", pIP); SendRconCommand(cmdstring); SendRconCommand("reloadbans"); } return 1; }
CMD:unban(playerid, params[])
{
new tname[24];
if(sscanf(params, "s[24]", tname)) return SendClientMessage(playerid,-1, ""chat""Usage: /unban [playerid]");
new filestring[79];
format(filestring, sizeof(filestring), "/Users/%s.ini", tname);
if(!fexist(filestring)) return SendClientMessage(playerid,-1,""chat""COL_RED" This player does not exist!");
else
{
new INI:File = INI_Open(filestring);
INI_SetTag(File, "data");
INI_WriteInt(File, "pBanned",0);
INI_Close(File);
INI_ParseFile(filestring, "LoadIP_%s", .bExtra = true , .extra = playerid);
new cmdstring[44];
format(cmdstring, sizeof(cmdstring), "unbanip %s", pIP);
SendRconCommand(cmdstring);
SendRconCommand("reloadbans");
}
return 1;
}
The warning should be fixed now.
pawn Код:
|
CMD:unban(playerid, params[])
{
new cmdstring[128],tname[24],filestring[79];
if(sscanf(params, "s[24]", tname)) return SendClientMessage(playerid,-1, ""chat""Usage: /unban [playerid]");
format(filestring, sizeof(filestring), "/Users/%s.ini", tname);
if(!fexist(filestring)) return SendClientMessage(playerid,-1,""chat""COL_RED" This player does not exist!");
else
{
new INI:File = INI_Open(filestring);
INI_SetTag(File, "data");
INI_WriteInt(File, "pBanned",0);
INI_Close(File);
INI_ParseFile(filestring, "LoadIP_%s", .bExtra = true , .extra = playerid);
format(cmdstring, sizeof(cmdstring), "unbanip %s", pIP);
SendRconCommand(cmdstring);
SendRconCommand("reloadbans");
}
return 1;
}
new cmdstring[44]
new cmdstring[128], tname[24];