PDA

View Full Version : /b command


ArianGubetini
05/05/2016, 04:18 PM
Hello there.I want to ask if you guys can tell me how to modify this command so when an admin on duty use /b his text will show with a different color from normal players.
EX, normal player /b "white text"
admin on duty /b "red text"

Here is my command:

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];
format(string, sizeof(string), "%s: (( %s ))", GetPlayerNameEx(playerid), params);
ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_F ADE4,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;
}

Sew_Sumi
05/05/2016, 04:30 PM
If you need a scripter, there's a thread for that.

All I'm seeing is a godfather edit command being put up and you wanting it to be made for you.

new string[128];
format(string, sizeof(string), "%s: (( %s ))", GetPlayerNameEx(playerid), params);
ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_F ADE4,COLOR_FADE5);

This is where the change needs to be so you can look at it more.

You need an if statement in there, based on the admin level.

You could go for real improvement by simply changing the player name rather than the entire line, by using embedded colors.

The wiki has a lot of information.