/b command revamp
#1

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;
}
Reply


Messages In This Thread
/b command revamp - by DrakeBell - 09.07.2017, 12:15
Re: /b command revamp - by aoky - 09.07.2017, 12:19
Re: /b command revamp - by DrakeBell - 09.07.2017, 15:26
Re: /b command revamp - by DrakeBell - 09.07.2017, 16:41
Re: /b command revamp - by Arthur Kane - 09.07.2017, 16:53
Re: /b command revamp - by aoky - 09.07.2017, 17:23
Re: /b command revamp - by DrakeBell - 09.07.2017, 18:04
Re: /b command revamp - by DrakeBell - 09.07.2017, 18:54
Re: /b command revamp - by DrakeBell - 09.07.2017, 19:03
Re: /b command revamp - by Arthur Kane - 09.07.2017, 19:19
Re: /b command revamp - by aoky - 09.07.2017, 19:29
Re: /b command revamp - by DrakeBell - 09.07.2017, 20:16
Re: /b command revamp - by Arthur Kane - 09.07.2017, 20:23
Re: /b command revamp - by DrakeBell - 09.07.2017, 21:04
Re: /b command revamp - by Arthur Kane - 09.07.2017, 21:09
Re: /b command revamp - by DrakeBell - 11.07.2017, 04:08
Re: /b command revamp - by Arthur Kane - 11.07.2017, 04:29
Re: /b command revamp - by Sew_Sumi - 11.07.2017, 04:37
Re: /b command revamp - by aoky - 11.07.2017, 05:30
Re: /b command revamp - by Sew_Sumi - 11.07.2017, 07:44
Re: /b command revamp - by DrakeBell - 11.07.2017, 08:09
Re: /b command revamp - by Arthur Kane - 11.07.2017, 08:34
Re: /b command revamp - by aoky - 11.07.2017, 15:50
Re: /b command revamp - by Sew_Sumi - 11.07.2017, 18:16
Re: /b command revamp - by DrakeBell - 12.07.2017, 09:48
Re: /b command revamp - by DrakeBell - 16.07.2017, 19:43
Re: /b command revamp - by aoky - 16.07.2017, 19:52
Re: /b command revamp - by DrakeBell - 16.07.2017, 20:13
Re: /b command revamp - by aoky - 16.07.2017, 20:23
Re: /b command revamp - by DrakeBell - 16.07.2017, 21:18
Re: /b command revamp - by Sew_Sumi - 16.07.2017, 21:50
Re: /b command revamp - by Daymen - 16.07.2017, 22:59
Re: /b command revamp - by DrakeBell - 17.07.2017, 05:57
Re: /b command revamp - by Sew_Sumi - 17.07.2017, 06:32
Re: /b command revamp - by DrakeBell - 17.07.2017, 07:00
Re: /b command revamp - by Sew_Sumi - 17.07.2017, 07:31
Re: /b command revamp - by DrakeBell - 17.07.2017, 07:39
Re: /b command revamp - by DrakeBell - 17.07.2017, 11:13
Re: /b command revamp - by aoky - 17.07.2017, 11:21

Forum Jump:


Users browsing this thread: 3 Guest(s)