Quantcast
Channel: SA-MP Forums
Viewing all articles
Browse latest Browse all 18226

/b command revamp

$
0
0
Below is the basic code for the /b commad, I want to add something to it so that whenever an admin goes on duty via /aduty, his name within the /b chat turns dark green, and as soon as he goes off duty, the name color changes back to normal.


Code:

CMD:b(playerid, params[])
{
        if(gPlayerLogged{playerid} == 0)
        {
                SendClientMessageEx(playerid, COLOR_GREY, "You're not logged in.");
                return 1;
        }
        if(isnull(params)) return SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /b [local ooc chat]");
    new string[128];
    if (PlayerInfo[playerid][pMask] == 0) {
        format(string, sizeof(string), "%s: (( %s ))", GetPlayerNameEx(playerid), params);
        ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
    }
    else if (PlayerInfo[playerid][pMask] == 1) {
        format(string, sizeof(string), "Stranger: (( %s ))",  params);
        ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
       
                }

      foreach(Player, i)
        {
            if(PlayerInfo[i][pAdmin] > 1 && BigEar[i] == 2)
            {
                        new szAntiprivacy[128];
                        format(szAntiprivacy, sizeof(szAntiprivacy), "(BE) %s: %s", GetPlayerNameEx(playerid), params);
                        SendClientMessageEx(i, COLOR_FADE1, szAntiprivacy);
                }
        }
        return 1;
}


Viewing all articles
Browse latest Browse all 18226

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>