Admin Chat Issue
#1

Код:
	if(strcmp(cmd, "/admin", true) == 0 || strcmp(cmd, "/a", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
			GetPlayerName(playerid, sendername, sizeof(sendername));
			new length = strlen(cmdtext);
			while ((idx < length) && (cmdtext[idx] <= ' '))
			{
				idx++;
			}
			new offset = idx;
			new result[96];
			while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
			{
				result[idx - offset] = cmdtext[idx];
				idx++;
			}
			result[idx - offset] = EOS;
			if(!strlen(result))
			{
				SendClientMessage(playerid, COLOR_WHITE, "USAGE: (/a)dmin [admin chat]");
				return 1;
			}
			new atext[60];
			if(PlayerInfo[playerid][pAdmin] == 1){ atext = "Trial Admin"; }
			if(PlayerInfo[playerid][pAdmin] == 2){ atext = "Administrator"; }
			if(PlayerInfo[playerid][pAdmin] == 3){ atext = "Senior Admin"; }
			if(PlayerInfo[playerid][pAdmin] == 4){ atext = "NOT USED"; }
			if(PlayerInfo[playerid][pAdmin] == 1337){ atext = "Head Admin"; }
			if(PlayerInfo[playerid][pAdmin] == 1338){ atext = "Server Owner"; }
			if(PlayerInfo[playerid][pAdmin] == 1339){ atext = "NOT USED"; }
			if(PlayerInfo[playerid][pAdmin] == 99999) { atext = "NOT USED"; }
		    format(string, sizeof(string), "%s %s:"COL_WHITE "%s", atext, RemoveUnderScore(playerid), playerid, result);
		    SendClientMessage(playerid, COLOR_WHITE, string);
			if(PlayerInfo[playerid][pAdmin] >= 1)
			{
				SendAdminMessage(COLOR_ORANGE, string);
			}
		}
		return 1;
	}
This is my code for admin chat and whenever I speak in /a, it looks like this. Does anyone know how to resolve this?

http://prntscr.com/1wsshv
Reply


Messages In This Thread
Admin Chat Issue - by Joshswag - 12.10.2013, 09:27
Re: Admin Chat Issue - by boomerboom - 12.10.2013, 09:31
Re: Admin Chat Issue - by Joshswag - 12.10.2013, 09:39
Re: Admin Chat Issue - by boomerboom - 12.10.2013, 09:42
Re: Admin Chat Issue - by Joshswag - 13.10.2013, 08:11
Re: Admin Chat Issue - by showdown - 13.10.2013, 08:42
Re: Admin Chat Issue - by Joshswag - 13.10.2013, 09:16

Forum Jump:


Users browsing this thread: 1 Guest(s)