/admins
#4

PHP код:
stock GetPlayerAdmin(adminid) {
    new 
        
adm_level[10];
    switch(
adminid) {
        case 
0adm_level "User";
        case 
1adm_level "Test";
        case 
2adm_level "Moderator";
        case 
3adm_level "Administrator";
        case 
4adm_level "Owner"
    }
    return 
adm_level;

Example:
PHP код:
CMD:admins(playerid) {
    new 
        
big_str[512],
        
tiny_str[255],
        
adm_idx 0;
    for(new 
i<= GetMaxPlayers(); i++) {
        if(
Pinfo[i][pLevel] > 0) {
            
adm_idx++;
            
format(tiny_str,sizeof(tiny_str),"%s(%d) - Level: %s",pName(playerid),i,GetPlayerAdmin(Pinfo[i][pLevel]));
            
strcat(big_str,tiny_str);
        }
    }
    if(
adm_idx == 0strcat(big_str"No admins online");
    return 
ShowPlayerDialog(playerid,YOU_DIALOG_ID,0,"Admins",big_str,"OK","");

Reply


Messages In This Thread
/admins - by Artix - 22.12.2011, 15:17
Re: /admins - by [ABK]Antonio - 22.12.2011, 16:25
Re: /admins - by wildcookie007 - 22.12.2011, 16:25
Re: /admins - by Moras - 22.12.2011, 17:07

Forum Jump:


Users browsing this thread: 1 Guest(s)