/aduty command
#1

Guys i am using the PRP GM, and i'v added a new /aduty command
it works. But the only problem is that, when i go on duty it changes to the skin i told it to change.
when i go off duty, it keeps the skin that on duty admin has, but i want it to return to the skin
that the player had BEFORE going on duty. here's the code
PHP код:
if(strcmp(cmd"/aduty"true) == 0)
    {
        if(
IsPlayerConnected(playerid))
        {
            new 
msgstring[150];
            if(
PlayerInfo[playerid][pAdmin] > && PlayerInfo[playerid][pAdminDuty] == 0)
            {
                
format(PlayerInfo[playerid][pNormalName], 255"%s"GetName(playerid));
                
//SetPlayerName(playerid, PlayerInfo[playerid][pAdminName]);
                
format(msgstringsizeof(string), "{01A601}** Administrator %s is now on admin duty. (/askq for assistance) **",sendername);
                
SendClientMessageToAll(COLOR_WHITEmsgstring);
                
SetPlayerSkin(playerid240);
                
PlayerInfo[playerid][pAdminDuty] = 1;
                
SetPlayerHealth(playerid9999);
                
SetPlayerArmour(playerid9999);
                
            }
            else if(
PlayerInfo[playerid][pAdmin] > && PlayerInfo[playerid][pAdminDuty] != 0)
            {
                
format(msgstringsizeof(string), "{FF0000}** Administrator %s is now off admin duty. **",sendername);
                
SendClientMessageToAll(COLOR_WHITEmsgstring);
                
//SetPlayerName(playerid, PlayerInfo[playerid][pNormalName]);
                
SetPlayerHealth(playerid100);
                
SetPlayerArmour(playerid0);
                
PlayerInfo[playerid][pAdminDuty] = 0;
            }
        }
        return 
1;
    } 
Reply


Messages In This Thread
/aduty command - by DannySnoopy - 07.08.2011, 08:18
Re: /aduty command - by MadeMan - 07.08.2011, 08:23
Re: /aduty command - by DannySnoopy - 07.08.2011, 08:30

Forum Jump:


Users browsing this thread: 2 Guest(s)