[Pedido] /ban
#1

bom galera, estou querendo um sistema de ban por dia tipo esse cmd, /ban [Parte/Nick][Dias], quem min arrumasse, ficaria muito grato
Reply
#2

usa o search
Reply
#3

Desculpe - sem resultados. Por favor, tente alguns termos diferentes.
Reply
#4

pega uma base desse gm:https://sampforum.blast.hk/showthread.php?tid=386806
Reply
#5

https://sampwiki.blast.hk/wiki/Ban
https://sampwiki.blast.hk/wiki/Strtok
Reply
#6

Existe esse feito por cj101:
https://sampforum.blast.hk/showthread.php?tid=164359
Reply
#7

Код:
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;
}
Reply
#8

vlw deu certo
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)