please help i cant format my /admins format and the text colors i want the format to be:
Код HTML:
CMD:admins(playerid, params[])
{
new online, string[128], file[32];
if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
if(PlayerInfo[playerid][pAdmin] < 1)
{
foreach(Player, i)
{
if(PlayerInfo[i][pAdmin] && aDuty[i])
{
online ++;
}
}
format(string, sizeof(string), "On-Duty Admins: %d", online);
SendClientMessage(playerid, COLOR_ORANGE, string);
foreach(Player, i)
{
if(PlayerInfo[i][pAdmin] && aDuty[i])
{
format(string, sizeof(string), "- [Level: %d] %s", PlayerInfo[i][pAdmin], NORPN(i));
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
}
}
}
else
{
foreach(Player, i)
{
if(PlayerInfo[i][pAdmin])
{
online ++;
}
}
format(string, sizeof(string), "|____Admins Online:____| %d", online);
SendClientMessage(playerid, COLOR_LIGHTGREEN, string);
foreach(Player, i)
{
if(PlayerInfo[i][pAdmin])
{
if(!aDuty[i])
{
format(file, sizeof(file), "users/%s.ini",RPNU(i));
format(string, sizeof(string), "- [Level: %d] %s [Admin Name: %s]", PlayerInfo[i][pAdmin], NORPN(i), dini_Get(file, "AdminName"));
}
else
{
format(file, sizeof(file), "users/%s.ini",RPNU(i));
format(string, sizeof(string), "- [Level: %d] %s [RP Name: %s]", PlayerInfo[i][pAdmin], NORPN(i), dini_Get(file, "OldName"));
}
if(PlayerInfo[i][pGangMod]) strcat(string, " [Gang Mod]");
if(PlayerInfo[i][pFacMod]) strcat(string, " [Fac Mod]");
if(PlayerInfo[i][pDoorMod]) strcat(string, " [Door Mod]");
if(PlayerInfo[i][pBizMod]) strcat(string, " [Biz Mod]");
if(PlayerInfo[i][pHouseMod]) strcat(string, " [House Mod]");
if(PlayerInfo[i][pGameAffairs]) strcat(string, " [Game Affairs]");
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
}
}
}
return 1;
}
Send me a PM, I don't quite understand what you're struggling with, but I would like to help