HelpMe Bad Bug /admins
#1

removed
Reply
#2

Quote:
Originally Posted by Tween73
Посмотреть сообщение
HelpMe Bad Bug /admins

Код:
CMD:admins(playerid, params[])
{
       //1
	SendClientMessage(playerid, COLOR_GREEN, "Administrators online 1");
	foreach(Player, i)
	{
	    new Rank1[128],Rank2[128], string[128];
	    if(PlayerInfo[playerid][pAdmin] > 0)
		{
		    switch(PlayerInfo[i][pAdmin])
		    {
		        case 9: Rank1 = "Owner";
			}
			new pName1[MAX_PLAYER_NAME];
	        GetPlayerName(i, pName1, sizeof(pName1));
			format(string, sizeof(string), "%s %s [Id:%d] %s",Rank1,pName1,i,PlayerInfo[i][pAdmin]);
			SendClientMessage(playerid, COLOR_RED, string);
		}
               //2
		if(PlayerInfo[playerid][pAdmin] > 0)
        SendClientMessage(playerid, COLOR_GREEN, "Administrators online 2");
		{
      		switch(PlayerInfo[i][pAdmin])
		    {
                 case 1: Rank2 = "Moderator";
	             case 2: Rank2 = "Master Moderator";
	             case 3: Rank2 = "Admin";
			     case 4: Rank2 = "Master Admin";
			     case 5: Rank2 = "Developer";
			     case 6: Rank2 = "Web Developer";
			     case 7: Rank2 = "Leader";
			     case 8: Rank2 = "Co-Leader";
			}
			new pName2[MAX_PLAYER_NAME];
	        GetPlayerName(i, pName2, sizeof(pName2));
			format(string, sizeof(string), "%s %s [Id:%d] %s",Rank2,pName2,i,PlayerInfo[i][pAdmin]);
			SendClientMessage(playerid, COLOR_RED, string);
		 }
    }
	return 1;
}
PHP код:
CMD:admins(playerid,params[])
{
    
#pragma unused params
        
new count 0;
        new 
string[128];
        new 
ChangeColor;
          
SendClientMessage(playerid, -1" ");
        
SendClientMessage(playerid, -1"Online Administator");
        
SendClientMessage(playerid, -1" ");
        for(new 
0MAX_PLAYERSi++)
        {
             if (
IsPlayerConnected(i))
             {
                if(
PlayerInfo[i][pAdmin] >= 1)
                 {
                    if(
PlayerInfo[i][pAdmin] > 9)
                    {
                        
Rank "Owner";
                        }
                     if(
IsPlayerAdmin(i))
                      {
                          
Rank "RCON Administrator";
                      }
                    else
                    {
                         switch(
PlayerInfo[i][pAdmin])
                        {
                        case 
1:{ Rank "Moderator"; }
                        case 
2:{ Rank "Master Moderator"; }
                        case 
3:{ Rank "Admin"; }
                        case 
4:{ Rank "Master Admin"; }
                        case 
5:{ Rank "Developer"; }
                        case 
6:{ Rank "Web Developer"; }
                        case 
7:{ Rank "Leader"; }
                        case 
8:{ Rank "Co-Leader"; }
                        }
                    }
                    
format(string128"Level: %d - %s(%i) | %s |",PlayerInfo[i][pAdmin], Names(i),i,Rank);
                    
SendClientMessage(playerid, -1string);
                    
count++;
                }
            }
        }
        if (
count == 0)
        
SendClientMessage(playerid,-1,"No Administrator Online");
        
SendClientMessage(playerid, -1" _______________________________________");
        return 
1;

PHP код:
stock Names(playerid)
{
    new 
name[MAX_PLAYER_NAME];
    
GetPlayerName(playeridnamesizeof(name));
    return 
name;

Reply
#3

removed
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)