Newbie Chat Help
#1

Below is my /n chat taken from my gamemode script. So, as you can see it shows once you reach for example 300 hours you achieve a new rank which is displayed infront of your name. Now, what I want to do is have it so, you can have a selection of the ranks you have unlocked via buying VIP, playing hours etc. Is there a way to make some sort of command for this like /nrank and show up in a dialogue box?
-Thanks in advance

Код:
command(newbie, playerid, params[])
{
	new
		string[128];

	if(isnull(params))
	{
		SendClientMessage(playerid, WHITE, "SYNTAX: /n(ewbie) [message]");
	}
	else
	{
	    if(NewbieEnabled == 1)
	    {
	        if(Player[playerid][CanUseNewbie] == 1 && Player[playerid][Authenticated] >= 1)
	        {
	            if(Player[playerid][nMuted] >= 1)
	            {
	                SendClientMessage(playerid, WHITE, "You have been muted from this channel by an admin.");
	            }
	            else
	            {
		            if(Player[playerid][AdminDuty] == 0)
		            {
		                if(Player[playerid][VipRank] >= 1)
		                {
					        format(string, sizeof(string), "[N] VIP %s says: %s", GetName(playerid), params);
					    	SendClientMessageToAll(0x04BF9DFF, string);
					    	OOCChatLog(string);
		                }
		                else
						{
			                if(Player[playerid][PlayingHours] < 1)
			                {
					            format(string, sizeof(string), "[N] %s %s: %s", OOCRanks[Rank1], GetName(playerid), params);
					            SendClientMessageToAll(0x04BF9DFF, string);
				            	Player[playerid][CanUseNewbie] = 0;
				            	SetTimerEx("RefreshNewbieChatForPlayer", 30000, false, "d", playerid);
			            	}
			            	else if(Player[playerid][PlayingHours] >= 1 && Player[playerid][PlayingHours] < 25)
			                {
					            format(string, sizeof(string), "[N] %s %s: %s", OOCRanks[Rank2], GetName(playerid), params);
					            SendClientMessageToAll(0x04BF9DFF, string);
				            	Player[playerid][CanUseNewbie] = 0;
				            	SetTimerEx("RefreshNewbieChatForPlayer", 30000, false, "d", playerid);
			            	}
			            	else if(Player[playerid][PlayingHours] >= 25 && Player[playerid][PlayingHours] < 100)
			                {
					            format(string, sizeof(string), "[N] %s %s: %s", OOCRanks[Rank3], GetName(playerid), params);
					            SendClientMessageToAll(0x04BF9DFF, string);
				            	Player[playerid][CanUseNewbie] = 0;
				            	SetTimerEx("RefreshNewbieChatForPlayer", 30000, false, "d", playerid);
			            	}
			            	else if(Player[playerid][PlayingHours] >= 100 && Player[playerid][PlayingHours] < 300)
			                {
					            format(string, sizeof(string), "[N] %s %s: %s", OOCRanks[Rank4], GetName(playerid), params);
					            SendClientMessageToAll(0x04BF9DFF, string);
				            	Player[playerid][CanUseNewbie] = 0;
				            	SetTimerEx("RefreshNewbieChatForPlayer", 30000, false, "d", playerid);
			            	}
			            	else if(Player[playerid][PlayingHours] >= 300)
			                {
					            format(string, sizeof(string), "[N] %s %s: %s", OOCRanks[Rank5], GetName(playerid), params);
					            SendClientMessageToAll(0x04BF9DFF, string);
				            	Player[playerid][CanUseNewbie] = 0;
				            	SetTimerEx("RefreshNewbieChatForPlayer", 30000, false, "d", playerid);
			            	}

			            	OOCChatLog(string);
						}
		            }
		            else
		            {
			            format(string, sizeof(string), "[N] Server Admin %s: %s", Player[playerid][AdminName], params);
			            SendClientMessageToAll(0x04BF9DFF, string);
		            }
		    	}
	        }
	        else
	        {
	            SendClientMessage(playerid, WHITE, "Please wait 30 seconds before submitting another message.");
	        }
	    }
	    else
	    {
	        SendClientMessage(playerid, WHITE, "Newbie Chat is currently unavailable.");
	    }
	}
	return 1;
}
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)