[Ajuda] Ajuda
#1

alguem mim ajuda tenho esse comando aki

Код:
if(strcmp(cmd, "/aviso", true) == 0)
	{
		if(pAdmin[playerid] > 0 || Helper[playerid] == 1)
		{
			new plid, motivo[256];

			if(sscanf(cmdtext, "s[7]us[256]", cmd, plid, motivo))
			{
				SendClientMessage(playerid, Vermelho, "Digite: /aviso [id] [motivo]");
				return 1;
			}
			if(IsPlayerConnected(plid))
			{
				aviso[plid] += 1;
				if(aviso[plid] >= 3)
				{
					format(string, sizeof(string), "O(A) jogador(a) %s foi kickado(a) por [New]System. Motivo: 3/3 Avisos", GetPlayerNameEx(plid));
     				SendClientMessageToAll(Amarelo, string);
					KickLog(string);
					Kick(plid);
				}
				else
				{
					format(string, sizeof(string), "O(A) jogador(a) %s levou um aviso por %s. Motivo: %s (%d/3)", GetPlayerNameEx(plid), GetPlayerNameEx(playerid), motivo, aviso[plid]);
					SendClientMessageToAll(tcadm, string);
				}
			}
			else
			{
				format(string, sizeof(string), " ID invбlido!");
				SendClientMessage(playerid, Vermelho, string);
			}
		}
		return 1;
	}
de dar aviso queria fazer um pra tira de 1 em 1 aviso alguem ajuda?
Reply
#2

Nгo entendi.
Reply
#3

exp

Код:
if(strcmp(cmd, "/taviso", true) == 0)
	{
		if(pAdmin[playerid] > 1 || pAdmin[playerid] > 2 || pAdmin[playerid] > 3 || pAdmin[playerid] > 4 || pAdmin[playerid] > 5 || Helper[playerid] == 1)
		{
			new plid;

			if(sscanf(cmdtext, "s[14]u", cmd, plid))
			{
				SendClientMessage(playerid, Vermelho, "Digite: /taviso [id]");
				return 1;
			}
			if(IsPlayerConnected(plid))
			{
				FloodAlert[plid] = 0;

				format(string, sizeof(string), "O(A) Administador (a) %s Tirou um aviso de  (%s/3). Motivo: %s ",GetPlayerNameEx(playerid), playerid);
    			SendClientMessage(plid, tcadm, string);
    			SendClientMessage(playerid, Verde, "Comando efetuado com sucesso!");
			}
			else
			{
				SendClientMessage(playerid, Vermelho, "Valor invбlido, tente novamente!");
			}
		}
		return 1;
	}
Reply
#4

LOOL, mas eu nгo percebi o que vocк pertende fazer !
Reply
#5

Quote:
Originally Posted by VeNuZ_
Посмотреть сообщение
LOOL, mas eu nгo percebi o que vocк pertende fazer !
tipo o primeiro que eu mandei /aviso id Motivo pra punir um player chega em 3 aviso ele toma kick

ai eu to tentando fazer um /tiraraviso id motivo pq to tirando o aviso ai nesse /tirar aviso queria que fosse tirando -1 ate chega no 0 entendeu?
Reply
#6

Execute a mesma funзгo, apenas verifica se o player tem mais de 0 avisos, e retiro o aviso.. Aviso--;
Reply
#7

o venoz sabe dizer algun cod que salve log dos player que troca de nick?
Reply
#8

Nгo lol, crie um seu...
Reply
#9

to tentando mais nao geta o nome fica em branco '-'

Код:
public NickLog(string[])
{
 	new entry[256];
	format(entry, sizeof(entry), "%s\r\n", string);
	new File:hFile;
	hFile = fopen("Logs/Trocarnick.log", io_append);
	fwrite(hFile, entry);
	fclose(hFile);
	return 1;
}
Reply
#10

Porque public e nгo stock ?
Mode de uso:
NickLog(GetPlayerNameEx(playerid));
... Pensando que vocк tem a stock GetPlayerNameEx declarada vendo seu cуdigo acima...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)