[AJUDA]Admins Em Dialog
#4

zcmd:

PHP код:
COMMAND:admins(playeridparams[])
{
    new 
AdminList[500], Name[24];
    if (
APlayerData[playerid][LoggedIn] == true)
    {
        for (new 
iMAX_PLAYERSi++)
        {
            if (
IsPlayerConnected(i))
            {
                
GetPlayerName(iNamesizeof(Name));
                if (
IsPlayerAdmin(i))
                {
                    
format(AdminList500"%s%s: %s (id: %i), admin-level: %i (RCON admin)\n"AdminListAdminLevelName[APlayerData[i][PlayerLevel]], NameiAPlayerData[i][PlayerLevel]); 
                    continue;
                }
                if (
APlayerData[i][PlayerLevel] > 0)
                {
                    
format(AdminList500"%s%s: %s (id: %i), admin-level: %i\n"AdminListAdminLevelName[APlayerData[i][PlayerLevel]], NameiAPlayerData[i][PlayerLevel]); // Add the name of the admin-player to the list
                
}
            }
        }
        if (
strlen(AdminList) > 0)
            
ShowPlayerDialog(playeridDialogNoResponseDIALOG_STYLE_LIST"Online admins:"AdminList"OK""Cancel");
        else
            
SendClientMessage(playerid0xFF0000FF"No admin online"); // No admins are online
    
}
    else
        return 
0;
    return 
1;

PS: testado no meu server mas talvez nao podera trabalhar no seu.se nao der,adicione isto:

PHP код:
new AdminLevelName[6][24] =
{
    {
"Player"}, // Admin-level 0
    
{"Moderator"}, // Admin-level 1
    
{"Helper-admin"}, // Admin-level 2
    
{"Admin"}, // Admin-level 3
    
{"Head-admin"}, // Admin-level 4
    
{"Owner-admin"// Admin-level 5
}; 
Reply


Messages In This Thread
[AJUDA]Admins Em Dialog - by ReDKiiL - 31.08.2011, 11:31
Re: [AJUDA]Admins Em Dialog - by array13 - 31.08.2011, 11:38
Respuesta: [AJUDA]Admins Em Dialog - by ReDKiiL - 31.08.2011, 11:45
Re: [AJUDA]Admins Em Dialog - by array13 - 31.08.2011, 13:15
Respuesta: [AJUDA]Admins Em Dialog - by ReDKiiL - 31.08.2011, 16:30
Re: [AJUDA]Admins Em Dialog - by RockFire - 31.08.2011, 16:38
Re: [AJUDA]Admins Em Dialog - by davidjnio - 01.09.2011, 13:05

Forum Jump:


Users browsing this thread: 3 Guest(s)