[Ajuda]Comando "/b" cor diferente para admin
#1

Ola eu tenho no meu GM o comando "/b" e queria tipo quando meter-me duty ao falar em "/b" aparecer a cor de admin duty


O comando й este:

Код:
if(strcmp(cmd, "/b", true) == 0)//local ooc
	{
	  if(IsPlayerConnected(playerid))
	  {
	    if(gPlayerLogged[playerid] == 0)
	    {
	      SendClientMessage(playerid, COLOR_RED, "  You havent logged in yet !");
	      return 1;
	    }
			GetPlayerName(playerid, sendername, sizeof(sendername));
			new length = strlen(cmdtext);
			while ((idx < length) && (cmdtext[idx] <= ' '))
			{
				idx++;
			}
			new offset = idx;
			new result[64];
			while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
			{
				result[idx - offset] = cmdtext[idx];
				idx++;
			}
			result[idx - offset] = EOS;
			if(!strlen(result))
			{
				SendClientMessage(playerid, COLOR_RED, "USA: /b [local ooc chat]");
				return 1;
			}
			if(PlayerInfo[playerid][pMaskuse] == 1)
			{
			  format(string, sizeof(string), "(( %s: %s ))", result);
			}
			else
			{
				format(string, sizeof(string), "((%s: %s ))", playerid, sendername, result);
			}
			ProxDetector(20.0, playerid, string,COLOR_GREEN,COLOR_GREEN,COLOR_GREEN,COLOR_GREEN,COLOR_GREEN);
			printf("%s", string);
		}
		return 1;
	}
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)