16.09.2009, 22:55
Quote:
Originally Posted by [VLV
Cross - (Venomous-VLV.com) ]
Quote:
|
pawn Код:
dcmd_unban(playerid, params[])
{
new name[MAX_PLAYER_NAME], string[128], string2[256];
if (sscanf(params, "s", name))
{
SendClientMessage(playerid, COLOR_WHITE, "SYNTAX - /unban [name]");
SendClientMessage(playerid, COLOR_GREY, "Full name, this includes underscores. Also CaSe sEnSiTiVe.");
}
else
{
if(pStats[playerid][pAdmin] < 5)
{
SendClientMessage(playerid, COLOR_WHITE, BAD_ADMIN_MESSAGE);
return 1;
}
else
{
format(string, sizeof(string), "CRP_Scriptfiles/Accounts/%s.ini", name);
if(fexist(string))
{
string2 = dini_Get(string, "IP");
format(string, sizeof(string), "unbanip %s", string2);
SendRconCommand(string);
format(string, sizeof(string), "You have successfully unbanned %s (IP: %s).", name, string2);
SendClientMessage(playerid, COLOR_WHITE, string);
SendRconCommand("reloadbans");
SendClientMessage(playerid, COLOR_WHITE, "The bans list has been reloaded.");
}
else
{
SendClientMessage(playerid, COLOR_WHITE, "Invalid name, the name was not recognized.");
}
}
}
return 1;
}