01.12.2013, 21:56
bom galera, estou querendo um sistema de ban por dia tipo esse cmd, /ban [Parte/Nick][Dias], quem min arrumasse, ficaria muito grato
CMD:banip(playerid, params[]) { // Setup local variables new PlayerToBan, Reason[128], Msg[9000], Name[24], AdminName[24]; // Check if the player has logged in if (APlayerData[playerid][LoggedIn] == true) { // Check if the player's admin-level is at least 3 if(IsPlayerAdmin(playerid)) { if (sscanf(params, "us[128]", PlayerToBan, Reason)) SendClientMessage(playerid, -1, "» {E0C060}Uso: /banip [id] [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}Vocк teve o IP banido permanentemente por {FFFFFF}%s", AdminName); SendClientMessage(PlayerToBan, 0xFFFFFFFF, Msg); format(Msg, 128, "» {808080}Motivo: {FFFFFF}%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, 9000, "{B3A792}O Administrador {FFFFFF}%s {B3A792}baniu o IP de {FFFFFF}%s{B3A792}!", AdminName, Name); SendClientMessageToAll(0xFFFFFFFF, Msg); EscreverLog("Ban", Msg); } } } else SendClientMessage(playerid, 0xFFFFFFFF, "{FFFF00}[ERRO] {009D4F}Vocк nгo tem permissгo para usar este comando!"); } else return false; return true; }