Bom peguei do game mod que estou editando, Pegue de exemplo e tente adapitar para seu game mod!
pawn Код:
CMD:ban(playerid, params[])
{
if(IsPlayerAdmin(playerid)) {
new id = strval(params);
new PID;
new reason[64];
new str[128];
if(sscanf(params, "us[64]", PID,reason)) return SendClientMessage(playerid, COLOR_ERRO, "- ERRO - /Ban |[ID] [Motivo]");
new aname[MAX_PLAYER_NAME];
GetPlayerName(playerid, aname, MAX_PLAYER_NAME);
new pname[MAX_PLAYER_NAME];
GetPlayerName(PID, pname, MAX_PLAYER_NAME);
if(!IsPlayerConnected(PID))
return SendClientMessage(playerid,COLOR_ERRO, "- ERRO - Player nгo conectado!");
new year, month,day;
getdate(year, month, day);
new string[200];
format(string, sizeof(string), "[Server] O Administrador %s baniu o jogador %s motivo: %s [Data: %d/%d/%d]", aname, pname,reason,day,month,year);
BanLog(string);
format(str, sizeof(str), "[Server] O administrador %s baniu o jogador %s (Motivo: %s) ", aname,pname, reason);
SendClientMessageToAll(COLOR_ADM, str);
format(str, sizeof(str), "[Server] Banido Motivo: %s", reason);
SendClientMessage(id,-1, str);
SendClientMessage(id,-1,"* Se vocк acha que foi banido injustamente, Vб atй nosso fуrum e se justifique-se!");
SendClientMessage(id,-1,"* Fуrum://Link do seu fуrum <<");
Ban(PID);
dini_IntSet("banidos.ini",pname,1);
}
else
{
SendClientMessage(playerid, COLOR_ERRO, "- ERRO - Vocк nгo й um administrador!");
}
return 1;
}