[Pedido] Ler report's
#1

Queria pedir um sistema que quando o player desse olhar em alguma pessoa que foi reportada (APENAS QUEM FOI REPORTADA) Aparecerб no /admins e quero que salvasse quando o player desconectar pois breve irei fazer um rank contendo essa informaзгo

Ex: Admin: %s | [%s] | [Status: %s] | [Reports Lidos: %s]

comando /reports
Код:
dcmd_reports(playerid,params[])
{
    #pragma unused params
	if(Player[playerid][pAdmin] >= 1)
	{
		SCM(playerid, COR_BARRAS,"* Ъltimos reports efetuados *");
		new string[128], acount;
		for(new i = 0; i < sizeof(Reports); i ++)
		{
			if(IsPlayerConnected(Reports[i]))
			{
		    	acount ++;
		    	format(string,128,"%d. %s (id: %d) | Motivo: %s", acount, getPName(Reports[i]), Reports[i], ReportsReasons[i]);
		    	SCM(playerid, TEXTO, string);
			}
		}
		if(acount == 0)
		{
			SCM(playerid, TEXTO, "Nenhum report encontrado.");
		}
	}
	return 1;
}
comando /admins
Код:
dcmd_admins(playerid, params[])
{
    #pragma unused params

    if(Player[playerid][pLogged] == false)
	    return SCM(playerid, COR_ERRO, "[ERRO] Vocк nгo estб logado!");

    SCM(playerid, COR_BARRAS, "* Administradores Online *");
	new AdmLevel[64], StatusAdmin[64];
	new count=0;
	new sztring[15000];

	for(new i=0; i<MAX_PLAYERS; i++)
	{
		if(IsPlayerConnected(i))
		{
		    if(Player[i][pLogged] == true)
			{
				if(Player[i][pAdmin] >= 1)
				{
                    if(Player[i][pAdmin] == 7) { AdmLevel = "Dono do Servidor"; }
                    if(Player[i][pAdmin] == 6) { AdmLevel = "Lнder Geral"; }
				    if(Player[i][pAdmin] == 5) { AdmLevel = "Game Master"; }
				    if(Player[i][pAdmin] == 4) { AdmLevel = "Sub Game Master"; }
				    if(Player[i][pAdmin] == 3) { AdmLevel = "Administrador Fixo"; }
				    if(Player[i][pAdmin] == 2) { AdmLevel = "Administrador Ajudante"; }
				    if(Player[i][pAdmin] == 1) { AdmLevel = "Administrador Teste"; }
				    
				    if(Trabalhando[i] == 1) { StatusAdmin = "Trabalhando"; }
				    if(Trabalhando[i] == 0) { StatusAdmin = "Jogando"; }


                    format(sztring, sizeof(sztring), CONTAS, getPName(i));

					if(Player[i][pAdmin] >= 1)
					{
					SendFormattedMessage(playerid, COLOR_WHITE, "Admin: %s | [%s] | [Status: %s]", getPName(i), AdmLevel, StatusAdmins);
					count++;
					}
				}
			}
		}
	}

	if(count == 0)
	   	SCM(playerid, TEXTO, "Nenhum Administrador Online!");



	return 1;
}
comando /olhar
Код:
dcmd_olhar(playerid, params[])
{
	if(Player[playerid][pAdmin] < 1)
		return 0;
	else
	{

	  	new tmp[256], idx, specid;
		tmp = strtok(params, idx);

		if(!strlen(tmp)) {
			SCM(playerid, COR_USOCORRETO, "[SERVER] [USO] /olhar [id/off]");
			return 1;
		}

		if(strcmp(tmp, "off", true)==0)
		{
		 	if(GetPlayerState(playerid) == PLAYER_STATE_SPECTATING )
		 	{
		 	    StopSpectate(playerid);
				return 1;
			}
			else
			{
			    return SCM(playerid, COR_USOCORRETO, "[SERVER] Erro: Vocк nгo estб espectando ninguйm.");
			}
		}
		if(!IsNumeric(params))
			specid = ReturnPlayerID(params);
		else
			specid = strval(params);

		if(!IsPlayerConnected(specid)) {
			SCM(playerid, COR_GREY, "[ERRO] Jogador nгo encontrado.");
			return 1;
		}
		else if(specid == playerid) {
	  		SCM(playerid, COR_GREY, "[SERVER] Erro: ID Invбlido.");
			return 1;
		}
		else if(GetPlayerState(specid) == PLAYER_STATE_SPECTATING && Player[specid][gSpectateID] != INVALID_PLAYER_ID) {
			SCM(playerid, COR_GREY, "[SERVER] Erro: Jogador escolhido jб estб espectando alguйm.");
			return 1;
		}
		else if(GetPlayerState(specid) != 1 && GetPlayerState(specid) != 2 && GetPlayerState(specid) != 3) {
	 		SCM(playerid, COR_GREY, "[SERVER] Erro: O jogador nгo estб jogando.");
			return 1;
		}

		if(GetPlayerState(playerid) != PLAYER_STATE_SPECTATING)
	    {
	       	SaveVariables(playerid);
			SCM(playerid, COR_RED, "[SERVER] Vocк entrou no modo espectador, para sair digite /olhar off.");
		}

		StartSpectate(playerid, specid);
	}
	return 1;
}
Reply


Messages In This Thread
Ler report's - by LukasMartins - 20.05.2016, 18:41
Re: [Pedido] Ler report's - by F1N4L - 20.05.2016, 19:28
Re: [Pedido] Ler report's - by LukasMartins - 20.05.2016, 21:10
Re: [Pedido] Ler report's - by ZEDD666 - 20.05.2016, 21:40
Re: [Pedido] Ler report's - by LukasMartins - 20.05.2016, 22:07
Re: [Pedido] Ler report's - by ZEDD666 - 20.05.2016, 22:30
Re: [Pedido] Ler report's - by LukasMartins - 20.05.2016, 23:34
Re: [Pedido] Ler report's - by ZEDD666 - 20.05.2016, 23:38
Re: [Pedido] Ler report's - by Whoo - 20.05.2016, 23:40

Forum Jump:


Users browsing this thread: 1 Guest(s)