Set '!IsPlayerAdmin' To 1 With /aduty command?
#1

is that possible? can anyone do it for me on this cmd:
PHP код:
CMD:aduty(playerid)
if(
pInfo[playerid][pAdminLevel] >= 1)
        {
            if(
pInfo[playerid][pAdminDuty] == 0)
            {
            
pInfo[playerid][pAdminDuty] = 1;
            new 
adutyonstring[128];
            
format(adutyonstringsizeof(adutyonstring), "%s is now on admin duty" ,PlayerName(playerid));
            
SendClientMessageToAll(-1,adutyonstring);
            
SetPlayerColor(playerid,COLOR_WHITE);
            
SetPlayerHealth(playerid,999999.0);
            
SendClientMessage(playerid,COLOR_RED,"Remember to /aduty when you play as regular player.");
            }
            else
            {
                if(
pInfo[playerid][pAdminDuty] == 1)
                {
                
pInfo[playerid][pAdminDuty] = 0;
                new 
adutyoffstring[128];
                
format(adutyoffstringsizeof(adutyoffstring), "%s is now off admin duty" ,PlayerName(playerid));
                
SendClientMessageToAll(-1,adutyoffstring);
                if(
team[playerid] == TEAM_ZOMBIE)
                {
                    
SetPlayerColor(playerid,COLOR_ZOMBIE);
                }
                if(
team[playerid] == TEAM_HUMAN)
                {
                    
SetPlayerColor(playerid,COLOR_HUMAN);
                }
                
SetPlayerHealth(playerid,100);
                }
            }
        }
    } 
sorry for missed codes, i just removed a part from there.
Reply
#2

anyone?
Reply
#3

if(pInfo[playerid][pAdminLevel] >= 1)
Already defines whether the player is an admin or not...
Why do you want IsPlayerAdmin?
Reply
#4

Quote:
Originally Posted by JJack
Посмотреть сообщение
if(pInfo[playerid][pAdminLevel] >= 1)
Already defines whether the player is an admin or not...
Why do you want IsPlayerAdmin?
whatever.... BTW, thanks for reply. +1
Reply
#5

Quote:
Originally Posted by XGreen
Посмотреть сообщение
whatever.... BTW, thanks for reply. +1
Welcome lol, you should check your code first ;p
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)