01.02.2013, 22:06
I thought this.
if a player is not an admin he won't see the admin list, unless they are ON-DUTY
If the player is an admin he'll see all admins online as he's an admin.
Code as how i thought it has to be.
^ 12203
^ 12207
if a player is not an admin he won't see the admin list, unless they are ON-DUTY
If the player is an admin he'll see all admins online as he's an admin.
Code as how i thought it has to be.
pawn Code:
CMD:admins(playerid,params[])
{
#pragma unused params
new count = 0;
new string[128];
SendClientMessage(playerid, blue, "Current admins on-duty:");
for(new i = 0; i < MAX_PLAYERS; i++)
{
if (IsPlayerConnected(i))
{
if(PlayerInfo[i][Level] >= 1 && Admin[i] == 1)
{
new nameee[128];
GetPlayerName(i, nameee, 16);
format(string, 128, "Admin %s[%i] Level: %d ",GetName(i),i,PlayerInfo[i][Level],i);
SendClientMessage(playerid, blue, string);
count++;
}
else if(Playerinfo[i][Level] >= 1)
{
new namee[128];
GetPlayerName(i, namee, 16);
format(string, 128, "Admin %s[%i] Level: %d ", GetName(i),i,PlayerInfo[i][Level],i);
SendClientMessage(playerid,blue, string);
count++;
}
}
}
}
if(count == 0)
{
SP blue,"None");
}
return 1;
}
pawn Code:
C:\Users\Guille\Desktop\Samp scripting\Server23\Server\gamemodes\WD.pwn(12203) : error 010: invalid function or declaration
C:\Users\Guille\Desktop\Samp scripting\Server23\Server\gamemodes\WD.pwn(12207) : error 010: invalid function or declaration
pawn Code:
if(count == 0)
pawn Code:
return 1;