/asay color change
#1

Hello, here I want help with /asay color. I want different colors for different admin level /asay's . There are 6 admin levels in my script, I want their /asay to be changed according to the colors I put.

My /asay command :
PHP код:
CMD:asay(playeridparams[])
{
 new 
tmp[256], playername[25], string[256], string2[256], moneys=0moneys1=0;
 if (
adlvl[playerid] < 1) return 0;
 if (
sscanf(params"s[128]"tmp)) return SendClientMessage2(playeridCOLOR_WHITE"Usage: /asay [message]");
 
GetPlayerName(playeridplayernameMAX_PLAYER_NAME);
 
format(stringsizeof(string), "* Admin: %s (%s)"tmpplayername);
 
format(string2sizeof(string2), "* Admin: %s"tmp);
 for(new 
i=0PLAYERSi++)
 {
  if(
== playerid)
  {
      if(
adlvl[i] >= && adminuc[i] == 0)
      {
          
moneys++;
      }
      if(
adlvl[i] >= && adminuc[i] != 0)
      {
          
moneys1++;
      }
   }
 }
 if(
moneys != 0)
 {
    if(
adlvl[playerid] ==|| adlvl[playerid]==2)
    {
      
SendMessageToAdmins(COLOR_ADMIN_1string);
      
SendMessageToNormal(COLOR_ADMIN_1string2);
    }
       if(
adlvl[playerid] ==3)
    {
      
SendMessageToAdmins(COLOR_ADMIN_2string);
      
SendMessageToNormal(COLOR_ADMIN_2string2);
    }
       if(
adlvl[playerid] >=4)
    {
      
SendMessageToAdmins(COLOR_ADMIN_3string);
      
SendMessageToNormal(COLOR_ADMIN_3string2);
    }
 }
 if(
moneys1 != 0)
 {
    if(
adlvl[playerid] ==|| adlvl[playerid]==2)
    {
      
SendMessageToAdmins(COLOR_ADMIN_1string2);
      
SendMessageToNormal(COLOR_ADMIN_1string2);
    }
       if(
adlvl[playerid] ==3)
    {
      
SendMessageToAdmins(COLOR_ADMIN_2string2);
      
SendMessageToNormal(COLOR_ADMIN_2string2);
    }
       if(
adlvl[playerid] >=4)
    {
      
SendMessageToAdmins(COLOR_ADMIN_3string2);
      
SendMessageToNormal(COLOR_ADMIN_3string2);
    }
 }
 return 
1;

Reply


Messages In This Thread
/asay color change - by RomaNScripteR - 19.07.2017, 11:01
Re: /asay color change - by Kaperstone - 19.07.2017, 11:13
Re: /asay color change - by RomaNScripteR - 19.07.2017, 11:59
Re: /asay color change - by saffierr - 19.07.2017, 15:58
Re: /asay color change - by Daymen - 19.07.2017, 19:35
Re: /asay color change - by Daymen - 19.07.2017, 20:41
Re: /asay color change - by RomaNScripteR - 20.07.2017, 07:10
Re: /asay color change - by Daymen - 20.07.2017, 19:57
Re: /asay color change - by silverms - 21.07.2017, 20:36
Re: /asay color change - by RomaNScripteR - 22.07.2017, 07:57

Forum Jump:


Users browsing this thread: 3 Guest(s)