31.01.2013, 15:13
I have a problem on a command / admins
When I do / admins or / ad
If I'm not admin chat is showing me that I'm Admin Level 0
It shows I'm Super Admin and High Management
Same, even if I'm Level 1 to Level 9 it says I'm
Super Admin and High Management.
From level 10 to 14 that means I'm High Management,
And level 15 to 18 it does not seem anything chat,
At 19 it seemed the right thing and at 20 is also what it takes!
Now I want it fixed and shall, only if I'm Level 1 to Level 9
Admin
If I'm Level 10 to 14
Super Admin
Level 15 to 18
High Management
And Level 19 and Level 20 will remain as they are!
And who is not an admin so it will not register a chat his name
Even if you do not have registered it Admin Admin not connected, if there is it written the admins connected.
When I do / admins or / ad
If I'm not admin chat is showing me that I'm Admin Level 0
It shows I'm Super Admin and High Management
Same, even if I'm Level 1 to Level 9 it says I'm
Super Admin and High Management.
From level 10 to 14 that means I'm High Management,
And level 15 to 18 it does not seem anything chat,
At 19 it seemed the right thing and at 20 is also what it takes!
Now I want it fixed and shall, only if I'm Level 1 to Level 9
Admin
If I'm Level 10 to 14
Super Admin
Level 15 to 18
High Management
And Level 19 and Level 20 will remain as they are!
And who is not an admin so it will not register a chat his name
Even if you do not have registered it Admin Admin not connected, if there is it written the admins connected.
PHP код:
if(strcmp("/Admins",cmdtext,true) == 0 || strcmp("/Ad",cmdtext,true) == 0)
{
new string[128];
for(new i = 0; i<MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(Ad[i][Level] < 1 && Ad[i][Level] < 9)
{
format(string,sizeof(string),"Admin %s[id:%d] [Level: %d]",GetName(i),playerid,Ad[i][Level]);
SendClientMessage(playerid,0xff9900ff,string);
}
if(Ad[i][Level] < 10 && Ad[i][Level] < 14)
{
format(string,sizeof(string),"Super Admin %s[id:%d] [Level: %d]",GetName(i),playerid,Ad[i][Level]);
SendClientMessage(playerid,0x00ff00ff,string);
}
if(Ad[i][Level] < 15 && Ad[i][Level] < 18)
{
format(string,sizeof(string),"High Management %s[id:%d] [Level: %d]",GetName(i),playerid,Ad[i][Level]);
SendClientMessage(playerid,0xff6600ff,string);
}
if(Ad[i][Level] == 19)
{
format(string,sizeof(string),"Sub Manager %s[id:%d] [Level: %d]",GetName(i),playerid,Ad[i][Level]);
SendClientMessage(playerid,0xff0000ff,string);
}
if(Ad[i][Level] == 20)
{
format(string,sizeof(string),"Server Manager %s[id:%d] [Level: %d]",GetName(i),playerid,Ad[i][Level]);
SendClientMessage(playerid,0xff0000ff,string);
}
}
}
return 1;
}