27.05.2016, 20:20
PHP код:
CMD:admins(playerid, params[])
{
new sendername[MAX_PLAYER_NAME], string[128];
SCM(pid, -1, "{FF6600}Online {FFFFFF}Admins");
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(Player[i][pAdmin] == 1338)
{
GetPlayerName(i, sendername, sizeof(sendername));
format(string, sizeof(string), "Server Founder: {FF0000}%s", sendername);
SCM(pid, COLOR_WHITE, string);
}
if(Player[i][pAdmin] == 1337)
{
GetPlayerName(i, sendername, sizeof(sendername));
format(string, sizeof(string), "Server Manager: {A31818}%s", sendername);
SCM(pid, COLOR_WHITE, string);
}
if(Player[i][pAdmin] == 5)
{
GetPlayerName(i, sendername, sizeof(sendername));
format(string, sizeof(string), "Server Mapper: {0080FF}%s", sendername);
SCM(pid, COLOR_WHITE, string);
}
if(Player[i][pAdmin] == 4)
{
GetPlayerName(i, sendername, sizeof(sendername));
format(string, sizeof(string), "Leader Coordinator: {6633CC}%s", sendername);
SCM(pid, COLOR_WHITE, string);
}
if(Player[i][pAdmin] == 3)
{
GetPlayerName(i, sendername, sizeof(sendername));
format(string, sizeof(string), "Server Guardian: {A173FF}%s", sendername);
SCM(pid, COLOR_WHITE, string);
}
if(Player[i][pAdmin] == 2)
{
GetPlayerName(i, sendername, sizeof(sendername));
format(string, sizeof(string), "Server Moderator: {5CFEADFF}%s", sendername);
SCM(pid, COLOR_WHITE, string);
}
if(Player[i][pAdmin] == 1)
{
GetPlayerName(i, sendername, sizeof(sendername));
format(string, sizeof(string), "Trial Admin: {94FEC9FF}%s", sendername);
}
}
else
{
if(!IsPlayerConnected(i))
{
format(string, sizeof(string), "{08FC9A}There are no admins online.");
SCM(pid, -1, string);
}
}
}
return 1;
}