15.12.2011, 10:46
i just want this command to show the admins (VIP Level 2's) that are online:
top of script:
command:
it compilies fine, but in game it just shows ||Online Administrators||
even if none are online, also doesnt show if they are...
top of script:
PHP код:
enum PLAYER_INFO
{
PLAYER_MONEY,
PLAYER_SKIN,
LOCATION,
DEATHS,
INTERIOR,
VIRTUALWORLD,
Float:HEALTH,
LOGGED,
ACTIVEREPORT,
REPORTED,
CHOUSEID,
VIP,
}
new PlayerInfo[MAX_PLAYERS][PLAYER_INFO];
PHP код:
CMD:admins( playerid, params[ ] )
{
SendClientMessage(playerid, COLOR_GREEN,"||Online Administrators||");
for(new i=0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i) && PlayerInfo[i][VIP] >= 2)
{
new name[MAX_PLAYER_NAME], string[180 + MAX_PLAYER_NAME];
GetPlayerName(i, name, sizeof(name));
new level = PlayerInfo[i][VIP];
format(string, sizeof(string), ""BLUE"%s"ORANGE"(%d)"WHITE" Admin Level: "ORANGE"%d",name,i,level);
SendClientMessage(playerid, 0x1E90FFAA, string);
}
else if(!IsPlayerConnected(i) && PlayerInfo[i][VIP] >= 2)
{
SendClientMessage(i,COLOR_RED,"No Online Admins");
}
}
return 1;
}
even if none are online, also doesnt show if they are...