Quote:
Originally Posted by [HiC]TheKiller
Post the section of the code that bans someone.
|
sure, but what does that have to do with the admin chat and stuff?
pawn Код:
CMD:ban(playerid, params[])
{
new id;
new reason2[128];
if(PlayerInfo[playerid][AdminLevel] >= 3)
{
if(!sscanf(params, "uS(no Reason given)[128]", id, reason2))
{
if(isspawned[playerid] == 0) return Kick(playerid);
new year2, month2,day2;
new hour2,minuite2,second2;
getdate(year2, month2, day2);
gettime(hour2,minuite2,second2);
new string[256];
new name[MAX_PLAYER_NAME], PlayerName[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
GetPlayerName(id, PlayerName, sizeof(PlayerName));
format(string, sizeof(string), "Administrator %s has just banned %s for reason %s", name, PlayerName, reason2);
ProxDetector(10000000000.0, playerid, string, 0xFF0000FF, 0xFF0000FF, 0xFF0000FF, 0xFF0000FF, 0xFF0000FF);
printf("[%d:%d][%d/%d/%d] [ ADMIN BAN ] %s banned %s for %s", hour2 + 1, minuite2, day2, month2, year2, name, PlayerName, reason2);
format(file,sizeof(file),"realityrp/users/%s.ini", PlayerName);
dini_IntSet(file, "Banned",PlayerInfo[id][Banned] = 1);
Ban(id);
return 1;
}
else return SendClientMessage(playerid, 0xD8D8D8FF, "USAGE: /ban [PlayerId/PartOfName] (Reason)");
}
else return SendClientMessage(playerid, 0xD8D8D8FF, "You are not allowed to use this command.");
}