18.03.2013, 12:21
Ok, let me see if i can help.
I've cut and edited a bit from my script, it's fully made. No bugs as far as i know. You can use this or try and learn from it.
The basic format is
Example
Romas3110 - Level 7
If no admins are connected.
No Admins are connected in the server.
I've cut and edited a bit from my script, it's fully made. No bugs as far as i know. You can use this or try and learn from it.
The basic format is
Example
Romas3110 - Level 7
If no admins are connected.
No Admins are connected in the server.
pawn Код:
CMD:admins(playerid, params[])
{
new str[128];
new OnAdmins = 0;
SendClientMessage(playerid,-1,"-----------------------------------Admins Online-----------------------------------");
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(PlayerInfo[i][pAdmin] != 0)
{
GetPlayerName(i,Nam,MAX_PLAYER_NAME);
if(PlayerInfo[i][pAdmin] == 7)
{
format(str, sizeof(str), "{0074D9}%s {FFFFFF}Level 7",Nam);
SendClientMessage(playerid,-1,str);
}
if(PlayerInfo[i][pAdmin] == 6)
{
format(str, sizeof(str), "{0074D9}%s {FFFFFF}Level 6",Nam);
SendClientMessage(playerid,-1,str);
}
if(PlayerInfo[i][pAdmin] == 5)
{
format(str, sizeof(str), "{0074D9}%s {FFFFFF}Level 5",Nam);
SendClientMessage(playerid,-1,str);
}
if(PlayerInfo[i][pAdmin] == 4)
{
format(str, sizeof(str), "{0074D9}%s {FFFFFF}Level 4",Nam);
SendClientMessage(playerid,-1,str);
}
if(PlayerInfo[i][pAdmin] == 3)
{
format(str, sizeof(str), "{0074D9}%s {FFFFFF}Level 3",Nam);
SendClientMessage(playerid,-1,str);
}
if(PlayerInfo[i][pAdmin] == 2)
{
format(str, sizeof(str), "{0074D9}%s {FFFFFF}Level 2",Nam);
SendClientMessage(playerid,-1,str);
}
if(PlayerInfo[i][pAdmin] == 1)
{
format(str, sizeof(str), "{0074D9}%s {FFFFFF}Level 1",Nam);
SendClientMessage(playerid,-1,str);
}
OnAdmins ++;
}
}
}
if(OnAdmins == 0)
{
SendClientMessage(playerid,0xFF0000FF,"No Admins are connected in the server.");
}
return 1;
}