14.04.2012, 15:59
I seen /o has been coloured on some servers it looks nice but How do i do so
Moderator = 0x800080AA
Junior Admin = 0x33AA33AA
General Admin = 0x008000AA
Senior Admin = 0xFF8000FF
Head Admin = 0xFF8000F0
Server Manager = 0xFF8000FF
Executive & Co-Executive Admin = 0xFF0606FF
Community Advisor = 0x33CCFFAA
Code I did but disdnt work
Didnt Work..
It just show the {Color-Code} Not the colour
pawn Код:
CMD:o(playerid, params[])
{
if(gPlayerLogged{playerid} == 0)
{
SendClientMessageEx(playerid, COLOR_GREY, "You're not logged in.");
return 1;
}
if ((noooc) && (PlayerInfo[playerid][pAdmin] < 2 && EventKernel[EventCreator] != playerid && PlayerInfo[playerid][pDonateRank] < 6 && !OOCPower[playerid] && PlayerInfo[playerid][pHelper] < 4))
{
SendClientMessageEx(playerid, COLOR_GRAD2, " The OOC channel has been disabled by an Admin!");
return 1;
}
if(gOoc[playerid])
{
SendClientMessageEx(playerid, TEAM_CYAN_COLOR, " You have disabled OOC Chat, re-enable with /togooc!");
return 1;
}
if(isnull(params)) return SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: (/o)oc [ooc chat]");
if(PlayerInfo[playerid][pAdmin] == 1)
{
new string[128];
format(string, sizeof(string), "(( Moderator %s: %s ))", GetPlayerNameEx(playerid), params);
OOCOff(COLOR_OOC,string);
}
else if(PlayerInfo[playerid][pAdmin] == 2)
{
new string[128];
format(string, sizeof(string), "(( Junior Administrator %s: %s ))", GetPlayerNameEx(playerid), params);
OOCOff(COLOR_OOC,string);
}
else if(PlayerInfo[playerid][pAdmin] == 3)
{
new string[128];
format(string, sizeof(string), "(( General Administrator %s: %s ))", GetPlayerNameEx(playerid), params);
OOCOff(COLOR_OOC,string);
}
else if(PlayerInfo[playerid][pAdmin] == 4)
{
new string[128];
format(string, sizeof(string), "(( Senior Administrator %s: %s ))", GetPlayerNameEx(playerid), params);
OOCOff(COLOR_OOC,string);
}
else if(PlayerInfo[playerid][pAdmin] == 1337)
{
new string[128];
format(string, sizeof(string), "(( Head Administrator %s: %s ))", GetPlayerNameEx(playerid), params);
OOCOff(COLOR_OOC,string);
}
else if(PlayerInfo[playerid][pAdmin] == 1338)
{
new string[128];
format(string, sizeof(string), "(( Server Manager Administrator %s: %s ))", GetPlayerNameEx(playerid), params);
OOCOff(COLOR_OOC,string);
}
else if(PlayerInfo[playerid][pAdmin] == 99998)
{
new string[128];
format(string, sizeof(string), "(( Co-Executive Administrator %s: %s ))", GetPlayerNameEx(playerid), params);
OOCOff(COLOR_OOC,string);
}
else if(PlayerInfo[playerid][pAdmin] == 99999)
{
new string[128];
format(string, sizeof(string), "(( Executive Administrator %s: %s ))", GetPlayerNameEx(playerid), params);
OOCOff(COLOR_OOC,string);
}
else if(PlayerInfo[playerid][pHelper] >= 2)
{
new string[128];
format(string, sizeof(string), "(( Community Advisor %s: %s ))", GetPlayerNameEx(playerid), params);
OOCOff(COLOR_OOC,string);
return 1;
}
else if(PlayerInfo[playerid][pDonateRank] == 6)
{
new string[128];
format(string, sizeof(string), "(( Special Moderator %s: %s ))", GetPlayerNameEx(playerid), params);
OOCOff(COLOR_OOC,string);
return 1;
}
else if(PlayerInfo[playerid][pAdmin] < 1 && PlayerInfo[playerid][pHelper] <= 2)
{
new string[128];
format(string, sizeof(string), "(( Player %s: %s ))", GetPlayerNameEx(playerid), params);
OOCOff(COLOR_OOC,string);
return 1;
}
return 1;
}
Junior Admin = 0x33AA33AA
General Admin = 0x008000AA
Senior Admin = 0xFF8000FF
Head Admin = 0xFF8000F0
Server Manager = 0xFF8000FF
Executive & Co-Executive Admin = 0xFF0606FF
Community Advisor = 0x33CCFFAA
Code I did but disdnt work
pawn Код:
CMD:o(playerid, params[])
{
if(gPlayerLogged{playerid} == 0)
{
SendClientMessageEx(playerid, COLOR_GREY, "You're not logged in.");
return 1;
}
if ((noooc) && (PlayerInfo[playerid][pAdmin] < 2 && EventKernel[EventCreator] != playerid && PlayerInfo[playerid][pDonateRank] < 6 && !OOCPower[playerid] && PlayerInfo[playerid][pHelper] < 4))
{
SendClientMessageEx(playerid, COLOR_GRAD2, " The OOC channel has been disabled by an Admin!");
return 1;
}
if(gOoc[playerid])
{
SendClientMessageEx(playerid, TEAM_CYAN_COLOR, " You have disabled OOC Chat, re-enable with /togooc!");
return 1;
}
if(isnull(params)) return SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: (/o)oc [ooc chat]");
if(PlayerInfo[playerid][pAdmin] == 1)
{
new string[128];
format(string, sizeof(string), "(( {800080AA}Moderator {E0FFFFAA}%s: %s ))", GetPlayerNameEx(playerid), params);
OOCOff(COLOR_OOC,string);
}
else if(PlayerInfo[playerid][pAdmin] == 2)
{
new string[128];
format(string, sizeof(string), "(( {33AA33AA}Junior Administrator {E0FFFFAA}%s: %s ))", GetPlayerNameEx(playerid), params);
OOCOff(COLOR_OOC,string);
}
else if(PlayerInfo[playerid][pAdmin] == 3)
{
new string[128];
format(string, sizeof(string), "(( {008000AA}General Administrator {E0FFFFAA}%s: %s ))", GetPlayerNameEx(playerid), params);
OOCOff(COLOR_OOC,string);
}
else if(PlayerInfo[playerid][pAdmin] == 4)
{
new string[128];
format(string, sizeof(string), "(( {FF8000FF}Senior Administrator {E0FFFFAA}%s: %s ))", GetPlayerNameEx(playerid), params);
OOCOff(COLOR_OOC,string);
}
else if(PlayerInfo[playerid][pAdmin] == 1337)
{
new string[128];
format(string, sizeof(string), "(( {FF8000F0}Head Administrator {E0FFFFAA}%s: %s ))", GetPlayerNameEx(playerid), params);
OOCOff(COLOR_OOC,string);
}
else if(PlayerInfo[playerid][pAdmin] == 1338)
{
new string[128];
format(string, sizeof(string), "(( {FF8000FF}Server Manager {E0FFFFAA}%s: %s ))", GetPlayerNameEx(playerid), params);
OOCOff(COLOR_OOC,string);
}
else if(PlayerInfo[playerid][pAdmin] == 99998)
{
new string[128];
format(string, sizeof(string), "(( {FF0606FF}Co-Executive Administrator {E0FFFFAA}%s: %s ))", GetPlayerNameEx(playerid), params);
OOCOff(COLOR_OOC,string);
}
else if(PlayerInfo[playerid][pAdmin] == 99999)
{
new string[128];
format(string, sizeof(string), "(( {FF0606FF}Executive Administrator {E0FFFFAA}%s: %s ))", GetPlayerNameEx(playerid), params);
OOCOff(COLOR_OOC,string);
}
else if(PlayerInfo[playerid][pHelper] >= 2)
{
new string[128];
format(string, sizeof(string), "(( {33CCFFAA}Community Advisor {E0FFFFAA}%s: %s ))", GetPlayerNameEx(playerid), params);
OOCOff(COLOR_OOC,string);
return 1;
}
else if(PlayerInfo[playerid][pDonateRank] == 6)
{
new string[128];
format(string, sizeof(string), "(( Special Moderator %s: %s ))", GetPlayerNameEx(playerid), params);
OOCOff(COLOR_OOC,string);
return 1;
}
else if(PlayerInfo[playerid][pAdmin] < 1 && PlayerInfo[playerid][pHelper] <= 2)
{
new string[128];
format(string, sizeof(string), "(( Player %s: %s ))", GetPlayerNameEx(playerid), params);
OOCOff(COLOR_OOC,string);
return 1;
}
return 1;
}
It just show the {Color-Code} Not the colour