Henk
By: a guest | Feb 9th, 2010 | Syntax:
None | Size: 1.04 KB | Hits: 32 | Expires: Never
stock BanPlayerID(playerid,bannedby,reason[],unbandate)
{
if(bannedby == 255)
{
format(string, sizeof(string), "* %s is permbanned from the server by the system (reason: %s)", PlayerName[playerid],reason);
SendClientMessageToAll(COLOR_DARKORANGE,string);
}
else
{
if(unbandate == 255)
{
format(string, sizeof(string), "* %s is permbanned from the server by %s (reason: %s)", PlayerName[playerid],PlayerName[bannedby],reason);
SendClientMessageToAll(COLOR_DARKORANGE,string);
}
if(unbandate == 255)
{
format(string, sizeof(string), "* %s is banned from the server by %s (reason: %s)", PlayerName[playerid],PlayerName[bannedby],reason);
SendClientMessageToAll(COLOR_DARKORANGE,string);
}
}
new BanFile[128];
GetPlayerIp(playerid, PlayerIP, sizeof(PlayerIP));
format(BanFile, sizeof(BanFile), "/accounts/banned/%s.sav", PlayerIP);
dini_Create(BanFile);
dini_Set(BanFile, "Reason", reason);
dini_IntSet(BanFile, "BannedBy", bannedby);
dini_IntSet(BanFile, "UnBanDate", unbandate);
Kick(playerid);
}