Colored Player in Map / Chat
#3

Quote:
Originally Posted by BiG_Sm0k3
what this doesnt work?
pawn Код:
if (!strcmp("/checkadmin", cmdtext))
    {
          if(IsPlayerAdmin(playerid)) == 1)
                {
                SendClientMessage (playerid, COLOR_YELLOW, "-You are a Admin!!-");
                }
            else SendClientMessage(playerid, COLOR_YELLOW, "You are Nothing!!");
  return 1;}
anyway it should look like this
pawn Код:
if (!strcmp("/checkadmin", cmdtext))
    {
          if(IsPlayerAdmin(playerid)) == 1)
                {
                SendClientMessage (playerid, COLOR_YELLOW, "-You are a Admin!!-");
                }
 if(IsPlayerAdmin(playerid)) == 0)
            {SendClientMessage(playerid, COLOR_YELLOW, "You are Nothing!!");
              }
  return 1;}
Actually his example would work fine.. If you wanted to make it shorter you can do:

pawn Код:
if (!strcmp("/checkadmin", cmdtext))
{
    if(IsPlayerAdmin(playerid)) == 1)
      SendClientMessage (playerid, COLOR_YELLOW, "-You are a Admin!!-");
    else
      SendClientMessage(playerid, COLOR_YELLOW, "You are Nothing!!");
  return 1;
}
But to change colors, Replace COLOR_YELLOW with a Hex+Alpha code. For Example, #FF0000FF is red.
Reply


Messages In This Thread
Colored Player in Map / Chat - by Teyhouse - 13.06.2009, 01:17
Re: Colored Player in Map / Chat - by HuRRiCaNe - 13.06.2009, 02:26
Re: Colored Player in Map / Chat - by Pghpunkid - 13.06.2009, 04:12
Re: Colored Player in Map / Chat - by Teyhouse - 13.06.2009, 10:11
Re: Colored Player in Map / Chat - by Pghpunkid - 14.06.2009, 01:01
Re: Colored Player in Map / Chat - by Teyhouse - 14.06.2009, 08:34
Re: Colored Player in Map / Chat - by Grim_ - 14.06.2009, 09:00
Re: Colored Player in Map / Chat - by Teyhouse - 14.06.2009, 09:15
Re: Colored Player in Map / Chat - by dice7 - 14.06.2009, 09:17
Re: Colored Player in Map / Chat - by Gappy - 14.06.2009, 09:18

Forum Jump:


Users browsing this thread: 3 Guest(s)