if(strcmp(cmd, "/banirip", true) == 0) {
if(GetPlayerLevel(playerid) < 4) return SendClientMessage(playerid,0xDEEE20FF,"Admin: Vocк nгo tem Nivel Necessбrio para usar este comando");
new Hours,Minutes,Seconds,Days,Months,Years;
gettime(Hours, Minutes, Seconds);getdate(Years, Months, Days);
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) {
SendClientMessage(playerid, 0x007FFFAA, "USE: /banirip [playerid] [motivo]");
return 1;
}
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' ')) {
idx++;
}
new offset = idx;
new reason[64];
while ((idx < length) && ((idx - offset) < (sizeof(reason) - 1))) {
reason[idx - offset] = cmdtext[idx];
idx++;
}
reason[idx - offset] = EOS;
new playa = strval(tmp);
GetPlayerName(playa, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, NomePlayer, sizeof(NomePlayer));
format(string, sizeof(string), "*Admin: %s foi Banido pelo %s. Motivo: %s",giveplayer ,NomePlayer, reason);
SendClientMessageToAll(0x007FFFAA, string);
SendClientMessage(playa,COLOR_GREEN,"____________________________________________________");
format(string, sizeof(string), "Vocк foi pego.O admin baniu vocк: %s", NomePlayer);
SendClientMessage(playa,0x007FFFAA, string);
format(string, sizeof(string),"Motivo: %s ", reason);
SendClientMessage(playa,0x007FFFAA, string);
format(string, sizeof(string), "Data: %d/%d/%d", Days,Months,Years);
SendClientMessage(playa,0x007FFFAA,string);
format(string, sizeof(string), "Hora %d:%d:%d",Hours,Minutes,Seconds);
SendClientMessage(playa,0x007FFFAA,string);
SendClientMessage(playa,COLOR_GREEN,"____________________________________________________");
Ban(playa);
return 1;
}
Ban(playa);
BanEx(playa, reason);
native BanEx(playerid, const reason[]);
Ban(playa);
BanEx(playa, reason);
native BanEx(playerid, const reason[]);
if(strcmp(cmd, "/ban", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USE: /ban [id] [motivo]");
return 1;
}
giveplayerid = ReturnUser(tmp);
if (PlayerInfo[playerid][pAdmin] >= 3)
{
if(admtrampando[playerid] < 1 && PlayerInfo[playerid][pAdmin] != 1342 && PlayerInfo[playerid][pAdmin] != 1341)
{
SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo estб trabalhando! (/trabalhar)");
return 1;
}
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
if(PlayerInfo[giveplayerid][pAdmin] >= 1340)
{
SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo pode banir um Admin Dono !");
return 1;
}
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
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, COLOR_GRAD2, "USE: /ban [id] [motivo]");
return 1;
}
getdate(year, month, day);
if(admtrampando[playerid] == 1 && admhide[playerid] == 1)
{
format(string, sizeof(string), "AdmCmd: %s foi banido por Chuck(Modo Cia), Motivo: %s (%d-%d-%d)", giveplayer,(result),day,month,year);
//BanLog(string);
format(string, sizeof(string), "AdmCmd: %s foi banido por Chuck, Motivo: %s", giveplayer,(result));
SendClientMessageToAll(COLOR_LIGHTRED, string);
}
else
{
format(string, sizeof(string), "AdmCmd: %s foi banido por %s, Motivo: %s (%d-%d-%d)", giveplayer, sendername, (result),day,month,year);
BanLog(string);
format(string, sizeof(string), "AdmCmd: %s foi banido por %s, Motivo: %s", giveplayer, sendername, (result));
SendClientMessageToAll(COLOR_LIGHTRED, string);
}
SendClientMessage(giveplayerid, COLOR_WHITE, "{FFFFFF}__ Instruзхes para revisгo de Ban __");
SendClientMessage(giveplayerid, COLOR_YELLOW2, "Tire uma SS da tela apertando F8 imediatamente apуs ser banido");
SendClientMessage(giveplayerid, COLOR_YELLOW2, "E acesse o nosso forum: www.brasilmegavirtual.forumeiros.com"); // Aqui coloque o seu forum *-*
SendClientMessage(giveplayerid, COLOR_LIGHTRED, "Atenзгo: Vocк sу serб desbanido caso for inocente");
//Ban(giveplayerid);
SBan(giveplayerid, result, sendername);
return 1;
}
}//not connected
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " Esse nгo й um jogador ativo.");
}
}
manow vc qr um comando q da ban sу o ip ? ou da ban a acc eo ip ... vo te passa o cod de ban q ta em meu gm
PHP код:
|