Help with command
#1

How can I fix this? look at screenshot for detail on the problem.

Код:
CMD:g2(playerid, params[])
{
    new string[256], text[100];
    if(sscanf(params, "s[100]", text)) return SendClientMessage(playerid, -1, "{6a696a}[cmd]: /g(lobalchat) {9c9a9c}[msg]");
    for(new i = 0; i < MAX_PLAYERS; i ++)
    {
	    if(IsPlayerConnected(i))
	    {
	    
	    	if(pInfo[i][VIPlevel] == 0)
		    {
			    format(string, sizeof string, "{A9C4E4}[Global Chat] {EAEAEA}%s: %s", GetName(playerid), text);
			    SendClientMessageToAll(COLOR_SERVER, string);
		    }
	    	if(pInfo[i][VIPlevel] == 1)
		    {
			    format(string, sizeof string, "{A9C4E4}[Global Chat] {EAEAEA}VIP %s: %s", GetName(playerid), text);
			    SendClientMessageToAll(COLOR_SERVER, string);
		    }
		    if(pInfo[i][Adminlevel] == 1)
		    {
			    format(string, sizeof string, "{A9C4E4}[Global Chat] {EAEAEA}Trial Admin%s: %s", GetName(playerid), text);
			    SendClientMessageToAll(COLOR_SERVER, string);
		    }
		    if(pInfo[i][Adminlevel] == 2)
		    {
			    format(string, sizeof string, "{A9C4E4}[Global Chat] {EAEAEA}Basic Admin %s: %s", GetName(playerid), text);
			    SendClientMessageToAll(COLOR_SERVER, string);
		    }
		    if(pInfo[i][Adminlevel] == 3)
		    {
			    format(string, sizeof string, "{A9C4E4}[Global Chat] {EAEAEA}Senior Admin %s: %s", GetName(playerid), text);
			    SendClientMessageToAll(COLOR_SERVER, string);
		    }
		    if(pInfo[i][Adminlevel] == 4)
		    {
			    format(string, sizeof string, "{A9C4E4}[Global Chat] {EAEAEA}Anon: %s", text);
			    SendClientMessageToAll(COLOR_SERVER, string);
		    }
		    if(pInfo[i][Adminlevel] == 5)
		    {
			    format(string, sizeof string, "{A9C4E4}[Global Chat] {EAEAEA}Head Admin %s: %s", GetName(playerid), text);
			    SendClientMessageToAll(COLOR_SERVER, string);
		    }
		    if(pInfo[i][Adminlevel] == 6)
		    {
			    format(string, sizeof string, "{A9C4E4}[Global Chat] {EAEAEA}Anon: %s", text);
			    SendClientMessageToAll(COLOR_SERVER, string);
		    }
		    if(pInfo[i][Adminlevel] == 7)
		    {
			    format(string, sizeof string, "{A9C4E4}[Global Chat] {EAEAEA}Owner %s: %s", GetName(playerid), text);
			    SendClientMessageToAll(COLOR_SERVER, string);
		    }
	    }
    }
    return 1;
}
Reply


Messages In This Thread
Help with command - by Zmith - 18.03.2017, 04:44
Re: Help with command - by Toroi - 18.03.2017, 05:27
Re: Help with command - by jlalt - 18.03.2017, 05:31
Re: Help with command - by SyS - 18.03.2017, 05:54
Re: Help with command - by Toroi - 18.03.2017, 05:56
Re: Help with command - by Mic_H - 18.03.2017, 06:55
Re: Help with command - by Zmith - 18.03.2017, 13:47
Re: Help with command - by coool - 18.03.2017, 13:48
Re: Help with command - by Bolex_ - 18.03.2017, 13:57
Re: Help with command - by Zmith - 18.03.2017, 14:30

Forum Jump:


Users browsing this thread: 1 Guest(s)