SA-MP Forums Archive
help cmd - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: help cmd (/showthread.php?tid=567448)



help cmd - s3ek - 14.03.2015

iwant to change color chat always like
level 1 - level 3 = green
level 4 -level 5 = red
level 6 level 7= blue

not MessageToAdmins(blue,string); its only 1 color


Re : help cmd - Golimad - 14.03.2015

Код:
CMD:a(playerid,params[]) 
{ 
    if(PlayerInfo[playerid][Level] >= 1) 
    { 
        new string[128]; format(string, sizeof(string), "[ADMIN-CHAT] %s: %s", PlayerName2(playerid), params[0] );
        switch(PlayerInfo[playerid][Level])
        {
                case 1, 2, 3:MessageToAdmins(green,string); 
                case 4, 5   :MessageToAdmins(red,string); 
                case 6, 7   :MessageToAdmins(blue,string); 
        } 

         #if ADM_CHAT_LOG == true 
        SaveToFile("AdmChatLog",string); 
        #endif 
    } 
    else return SendClientMessage(playerid,red,"ERROR: You need to be admin to use this command"); 
    return 1; 
}



Re: help cmd - s3ek - 14.03.2015

thx Golimad

+1