if(strcmp(cmd, "/ban", true) == 0) {
new aname[MAX_PLAYER_NAME];
GetPlayerName(playerid, aname, MAX_PLAYER_NAME);
format(file, sizeof(file), PASTA_CONTAS, aname);
if(pAdmin[playerid] == 2 || pAdmin[playerid] == 3 || pAdmin[playerid] == 4 || pAdmin[playerid] == 5){
new tmp[256];
new plid;
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) {
SendClientMessage(playerid, Vermelho, "[ x ] Uso: /ban [id] [motivo]");
return 1;
}
plid = strval(tmp);
new pname[MAX_PLAYER_NAME];
GetPlayerName(plid, pname, MAX_PLAYER_NAME);
format(file2, sizeof(file2), PASTA_CONTAS, pname);
if(IsPlayerConnected(plid)){
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' ')) {
idx++;
}
new offset = idx;
new result[64];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1))) {
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, Vermelho, "[ x ] Uso: /banir [id] [motivo]");
}else{
new ano, mes,dia;
getdate(ano, mes, dia);
format(string, sizeof(string), "[ INFO ] O(a) Admistrador(a) %s baniu o(a) Jogador(a): %s. (Motivo: %s ) %d-%d-%d", aname, pname,result,mes,dia,ano);
BanLog(string);
SendClientMessage(playerid, amarelo, "[ > ] Jogador(a) Banido(a) com sucesso!");
format(string, sizeof(string), "[ INFO ] O(a) Administrador(a) %s baniu o(a) jogador(a): %s. (Motivo: %s.)", aname,pname,result);
SendClientMessageToAll(outraadm, string);
for(new i; i < 50; i++)
SendClientMessage(plid, branco, " ");
GameTextForPlayer(plid,"~r~Banido (a) ", 5000, 5);
SendClientMessage(plid, 0xABE7D5FF, "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
SendClientMessage(plid, 0x80FF00AA, "» Vocк foi banido(a) deve ter feito algo de errado!");
SendClientMessage(plid, 0xFFFFFFAA, "» Se foi banido(a) injustamente Tire uma Print Screen ( Apertando F8 ) e Entre no forum.");
SendClientMessage(plid, 0xABE7D5FF, "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
dini_IntSet("Banidos/banidos.ini",pname,1);
Kick(plid);
}
}else{
format(string, sizeof(string), "[ x ] ID %d nгo esta conectado!", plid);
SendClientMessage(playerid, Vermelho, string);
}
}
return 1;
}
dini_Int
dini_Get
@edite: se n me engano tem um fs feito por vinib se eu achar posto aki
https://sampforum.blast.hk/showthread.php?tid=294087 |