08.02.2016, 20:42
Can someone tell me please how to change the chats so instead of Level 4 admin it says head admin?
if (strcmp("/admins", cmdtext, true, 10) == 0)
{
new count, bool:online, string[128], AdminRank[70], name[24];
for(new i,g=GetMaxPlayers(); i < g; i++)
{
if(IsPlayerConnected(i))
{
if(1 <= pAdminLevel[i]/*<<<Change this var to yours*/ <= 99999)
{
online = true;
switch(pAdminLevel[i]) /*Change this var to yours*/
{
case 1: AdminRank = "Moderator";
case 2: AdminRank = "Junior Admin";
case 3: AdminRank = "General Admin";
case 4: AdminRank = "Senior Admin";
case 1337: AdminRank = "Head Admin";
case 1338: AdminRank = "Scripter";
case 1339: AdminRank = "Head Scripter";
case 99998: AdminRank = "Co-Owner";
case 99999: AdminRank = "Owner";
}
GetPlayerName(i, name, sizeof(name));
format(string,sizeof(string), "%s %s [%s],",string, name, AdminRank);
count++;
if(count == 4)
{
format(string,sizeof(string),"Admins: %s",string);
SendClientMessage(playerid, -1, string);
string = "";
count = 0;
}
}
}
}
if(count)
{
format(string,sizeof(string),"Admins: %s",string);
SendClientMessage(playerid, -1, string);
}
if(!online) SendClientMessage(playerid, -1,"No Admin online in the list.");
return 1;
}
if (strcmp(cmd, "/admins", true) ==0 )
{
new count = 0;
SendClientMessage(playerid, COLOR_BLUE, "----------[Online Staff Team]-----------");
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(PlayerInfo[i][pAdmin] >= 1 && AdminDuty[i] == 0)
{
format(string, 256, "Admin %s (id: %d) - Off duty.", GetPlayerNameEx(i), i, PlayerInfo[i][pAdmin]);
SendClientMessage(playerid, COLOR_WHITE, string);
count++;
}
if(PlayerInfo[i][pAdmin] >= 1 && AdminDuty[i] == 1)
{
format(string, 256, "Admin %s (id: %d) - On duty.", GetPlayerNameEx(i), i, PlayerInfo[i][pAdmin]);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
count++;
}
if(PlayerInfo[i][pModerator] >= 1 && AdminDuty[i] == 0)
{
format(string, 256, "Moderator %s (id: %d) - Off duty.", GetPlayerNameEx(i), i);
SendClientMessage(playerid, COLOR_WHITE, string);
count++;
}
if(PlayerInfo[i][pModerator] >= 1 && AdminDuty[i] == 1)
{
format(string, 256, "Moderator %s (id: %d) - On duty.", GetPlayerNameEx(i), i);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
count++;
}
}
}
if(count == 0)
{
SendClientMessage(playerid,COLOR_WHITE,"They're not staff members online.");
}
SendClientMessage(playerid, COLOR_BLUE, "----------------------------------------");
return 1;
}