Need help
#1

PHP код:
CMD:admins(playerid,params[])
{
    new 
Count 0;
    new 
n[MAX_PLAYER_NAME];
    new 
string[1000];
//    SendClientMessage(playerid, 0x00FF00FF, "__________|Admins|__________");
    
for(new 0MAX_PLAYERSi++)
    {
        if(!
IsPlayerConnected(i)) continue;
        if(
PlayerInfo[i][Level] < 1) continue;
        
GetPlayerName(i,n,sizeof(n));
        
format(string,sizeof(string),"%sLevel %d: %s (ID: %d) - %s\n"stringPlayerInfo[i][Level], niGetRankFromLevel(i));
        
Count++;
    }
    if(
Count == 0)
    {
        
ShowPlayerDialog(playerid2,DIALOG_STYLE_MSGBOX"Online Admins""No Admins Online""OK""");
        return 
1;
    }
    
ShowPlayerDialog(playerid2,DIALOG_STYLE_MSGBOX"Online Admins"string"OK""");
    return 
1;
}
stock GetRankFromLevel(playerid)
{
    new 
Rank[40];
    switch(
PlayerInfo[playerid][Level])
    {
        case 
0:
        {
            
Rank "Regular Player";
        }
        case 
1:
        {
            
Rank "Level 1";
        }
        case 
2:
        {
            
Rank "Level 2";
        }
        case 
3:
        {
            
Rank "Level 3";
        }
        case 
4:
        {
            
Rank "Level 4";
        }
        case 
5:
        {
            
Rank "Level 5";
        }
        case 
6:
        {
            
Rank "Level 6";
        }
    }
    return 
Rank;

i want to add rcon admin also after level 6
Reply


Messages In This Thread
Need help - by ScripteRNaBEEL - 29.06.2014, 12:35
Re: Need help - by iOxide - 29.06.2014, 12:49
Re: Need help - by GeekSiMo - 29.06.2014, 15:43

Forum Jump:


Users browsing this thread: 1 Guest(s)