[Ajuda] Comando Restrito
#5

aqui comando de ban ip
Quote:

COMMAND:ipban(playerid, params[])
{
// Setup local variables
new PlayerToBan, Reason[128], Msg[128], Name[24], AdminName[24];

// Send the command to all admins so they can see it
SendAdminText(playerid, "/ipban", params);

// Check if the player has logged in
if (APlayerData[playerid][LoggedIn] == true)
{
// Check if the player's admin-level is at least 3
if (APlayerData[playerid][PlayerLevel] >= 3)
{
if (sscanf(params, "us[128]", PlayerToBan, Reason))
SendClientMessage(playerid, 0xFF0000AA, "Digite: \"/ipban <Player> <Motivo>\"");
else
{
if (IsPlayerConnected(PlayerToBan))
{
// Get the names of the player and the admin who executed the ban
GetPlayerName(playerid, AdminName, sizeof(AdminName));
GetPlayerName(PlayerToBan, Name, sizeof(Name));

// Inform the player about his ban
format(Msg, 128, "{808080}O Seu Ip Foi Banido Permanente por {FFFFFF}%s", AdminName);
SendClientMessage(PlayerToBan, 0xFFFFFFFF, Msg);
format(Msg, 128, "{FF0000}Motivo: {FFFF00}%s", Reason);
SendClientMessage(PlayerToBan, 0xFFFFFFFF, Msg);

// Ban the player with a reason
BanEx(PlayerToBan, Reason);

// Inform everybody else which player was ip-banned
format(Msg, 128, "{FF0000}-|%s %s Baniu o Ip de {FFFFFF}%s{FF0000}|-", AdminLevelName[APlayerData[playerid][PlayerLevel]], AdminName, Name);
SendClientMessageToAll(0xFFFFFFFF, Msg);
}
}
}
else
return 0;
}
else
return 0;

return 1;
}

Reply


Messages In This Thread
Comando Restrito - by Luucass - 13.07.2013, 19:17
Re: Comando Restrito - by Gii - 13.07.2013, 19:20
Re: Comando Restrito - by Luucass - 13.07.2013, 19:24
Re: Comando Restrito - by Gii - 13.07.2013, 19:26
Re: Comando Restrito - by Luucass - 13.07.2013, 19:34
Re: Comando Restrito - by Gii - 13.07.2013, 19:39
Re: Comando Restrito - by Luucass - 13.07.2013, 19:47
Re: Comando Restrito - by Gii - 13.07.2013, 19:50
Re: Comando Restrito - by Luucass - 13.07.2013, 19:55

Forum Jump:


Users browsing this thread: 1 Guest(s)