01.06.2014, 23:06
there is a code:
pls can help me?
Код:
COMMAND:ban(playerid, params[])
{
new pid;
new string[900];
if(sscanf(params, "us", pid, params[2])) return SendClientMessage(playerid, 0xFF0000AA, "Utilizzo corretto: /banna [id] [motivo/specifica l'uso]");
if(level[playerid] >= 3)
{
if(level[playerid] < level[pid]) return SendClientMessage(playerid, red, "You can't use this command on a higher level Admin!");
if(!IsPlayerConnected(pid)) return SendClientMessage(playerid, red, "ERROR: That player is not online.");
new adminname[MAX_PLAYER_NAME], paramname[MAX_PLAYER_NAME], string[180];
new playerfile[100], pname[MAX_PLAYER_NAME];
GetPlayerName(pid, pname, sizeof(pname));
format(playerfile, sizeof(playerfile), "admin/Users/%s.ini",pname);
if(dini_Exists(playerfile))
{
dini_IntSet(playerfile, "Banned", 1);
}
SendClientMessage(playerid, red, "================================================================================================");
SendClientMessage(playerid, red, "You have been banned in this server, if you think this is an error, post a ban appeal to www.impulsive-gaming.forumfree.net severance or contact me on skype severance98!");
SendClientMessage(playerid, red, "================================================================================================");
GetPlayerName(pid, paramname, sizeof(paramname));
GetPlayerName(playerid, adminname, sizeof(adminname));
format(string, sizeof(string), "*** Admin %s has banned %s reason: %s ", adminname, paramname, params[2]);
SendClientMessageToAll(red, string);
adminlog(string);
BanEx(pid,"string");
} else SendClientMessage(playerid, red, "*** we need higher admin to use this command ! ***");
return 1;
}


