13.02.2017, 14:09
Example:
Edit:
Function GetName(playerid)
PHP код:
new AdminsRangos[9][30] = {
{"{23FF00}Owned Level (1)"},
{"{23C100}Owned Level (2)"},
{"{238900}Owned Level (3)"},
{"{FFDD00}Owned Level (4)"},
{"{FF9600}Owned Level (5)"},
{"{0019FF}Owned Global (6)"},
{"{FF3C00}Owned Co-Admin (7)"},
{"{FF1E00}Owned Admin (8)"},
{"{000000}Owned Leader "}
};
YCMD:staff(playerid, params[], help)
{
new MsgAdminsOn[100], FoundAdmin;
foreach(new i : Player)
{
if (PlayerDataOnline[i][IsLoggedIn] == true && PlayerInfo[i][Admin])
{
if ( !FoundAdmin )
{
SendClientMessage(playerid, 0x505050FF, "{505050}»»»»»»»»»»»»»»»»»» {008228}S{00B428}taff {008228}O{00B428}nline {505050}««««««««««««««««««");
FoundAdmin++;
}
format(MsgAdminsOn, sizeof(MsgAdminsOn), "{0037FF}* %s %s[%i]", AdminsRangos[PlayerInfo[i][Admin] - 1], GetName(i), i);
SendClientMessage(playerid, 0x505050FF, MsgAdminsOn);
}
}
if ( !FoundAdmin )
{
SendClientMessage(playerid, 0x505050FF, "{910000}»»»»»»»»»»»»» {E10000}No Member Staff Online {910000}«««««««««««««");
}
return 1;
}
Function GetName(playerid)
PHP код:
GetName(playerid)
{
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
return name
}