Duty Bug |help +rep|
#2

Set pDuty to 3 when the admin is on duty.
pawn Код:
YCMD:duty(playerid, params[], help)
{
        #pragma unused help
        #pragma unused params
        if(P_Data[playerid][pAdmin] == 3) return SCM(playerid, COLOR_RED, "You aren't an admin!");
        new
            string[128];
        if(P_Data[playerid][pDuty] == 3) {
        SetPlayerHealth(playerid,100);
        SetPlayerColor(playerid,-1);
        format(string,sizeof(string)," {FF0000} %s is now off Duty!",GetName(playerid));
        SCMToAll(-1,string); P_Data[playerid][pDuty] = 1;}
        else {
        format(string,sizeof(string)," {FF0000} %s is now on Duty!",GetName(playerid));
        SetPlayerHealth(playerid,99999);
        SetPlayerColor(playerid,0xFF000000);
        SCMToAll(-1,string); P_Data[playerid][pDuty] = 3;} // <---- This
        return 1;
}
Reply


Messages In This Thread
Duty Bug |help +rep| - by AYOUYOU - 06.11.2014, 18:28
Re: Duty Bug |help +rep| - by dominik523 - 06.11.2014, 18:34

Forum Jump:


Users browsing this thread: 3 Guest(s)