18.06.2012, 19:28
Okay, what I have is this..
^^ That was used to TRY and change the colour of a part of a string, this is the string code
pawn Код:
stock AdminStatusToName(playerid)
{
new status[128];
switch(astatus[playerid])
{
case 0:
{
status = "{0xCC333333}Roleplaying";
}
case 1:
{
status = "{0x33663333}Administrating";
}
case 2:
{
status = "{0xFFCC9999}Away from Keyboard";
}
}
return status;
}
pawn Код:
command(admins, playerid, params[])
{
new str[128], found = 0;
if(loggedin[playerid] == 0) return SendClientMessage(playerid, 0x66666666, "You must be logged in perform commands");
SendClientMessage(playerid, 0xFFFFFFFF, "-------- Admins Online -------");
for(new i = 0; i != MAX_PLAYERS; i++)
{
if(PVar[i][alevel] > 0)
{
format(str, sizeof(str), "%s, %s (ID %d) - %s.", AdminLevelToName(i), RemoveUnderScore(i), i, AdminStatusToName(i));
SendClientMessage(playerid, 0xFFFFFFFF, str);
found = 1;
}
}
if(found == 0)
{
SendClientMessage(playerid, 0xFFFFFFFF, "There are no admins online");
}
SendClientMessage(playerid, 0xFFFFFFFF, "-----------------------------------");
return 1;
}