Chat Help
#1

I'm sure this is something really simple, but I was wondering if I could have some help with the script below for the vip chat.

Код:
command(v, playerid, params[])
{
	new message[128], string[128];
	if(sscanf(params, "z", message))
	{
		SendClientMessage(playerid, WHITE, "SYNTAX: /(v)ip [message]");
	}
	else
	{
	    if(Player[playerid][VipRank] >= 1)
	    {
	        if(strlen(message) < 1)
	        {
	            SendClientMessage(playerid, WHITE, "SYNTAX: /(v)ip [message]");
	        }
	        else
	        {
	            format(string, sizeof(string), "[VIP] %s says (%d): %s", GetName(playerid), Player[playerid][VipRank], message);

				for(new i = 0; i < MAX_PLAYERS; i++)
		        {
		            if(IsPlayerConnectedEx(i) && Player[i][VipRank] >= 1 && Player[i][ToggedVIP] == 0)
		            {
		                SendClientMessage(i, 0xF2C200FF, string);
		            }
		        }
	        }
	    }
	}
	return 1;
}
Now, I want to make it so for admin just their name is red, here is the defined admin thing I have for the newbie chat:
Код:
if(Player[playerid][AdminLevel] >= 1)
Although, I want it to be from levels 1 through to 6.
-Thanks in advance.
Reply


Messages In This Thread
Chat Help - by KiiD - 17.09.2012, 08:39
Re: Chat Help - by clarencecuzz - 17.09.2012, 08:51
Re: Chat Help - by [ABK]Antonio - 17.09.2012, 08:52
Re: Chat Help - by KiiD - 17.09.2012, 09:08
Re: Chat Help - by [ABK]Antonio - 17.09.2012, 09:09
Re: Chat Help - by KiiD - 17.09.2012, 09:13
Re: Chat Help - by clarencecuzz - 17.09.2012, 09:15
Re: Chat Help - by [ABK]Antonio - 17.09.2012, 09:15
Re: Chat Help - by clarencecuzz - 17.09.2012, 09:20

Forum Jump:


Users browsing this thread: 4 Guest(s)