Little coding help
#6

pawn Код:
CMD:aduty(playerid, params[])
{
    if(PlayerInfo[playerid][pAdmin] >= 0) return SendClientMessage(playerid, -1, "This is an admin only command!");
    if(PlayerInfo[playerid][pAdminDuty] == 0)
    {

        SendClientMessageEx(playerid, COLOR_YELLOW, "You are now on administrative duty! Remember to check /reports!");
        //SetPlayerName(playerid, PlayerInfo[playerid][pAdminName]);
        PlayerInfo[playerid][pAdminDuty] = 1;
        SetPlayerHealth(playerid, 100000);
        SetPlayerArmour(playerid, 100000);
        SetPlayerColor(playerid, 0xFF550000);
        new string[128];
        PlayerInfo[playerid][pTogReports] = 0;
        format(string, sizeof(string), "Administrator %s is now on Admin Duty! (Is Now OOC)",              
        GetPlayerNameEx(playerid));
        ABroadCast(COLOR_LIGHTRED, string, 1);

        if PlayerInfo[playerid][pAdminDuty] == 1*then
        SetPlayerColor(playerid,0xFF66FF00),
        format(string, sizeof(string),"[ADMIN]: %s is now on Admin Duty", GetPlayerNameEx(playerid)),
        ABroadCast(COLOR_LIGHTRED, string, 1),
        new Text3D:DutyLabel = Create3DTextLabel("Admin On Duty \n Do NOT Attack",0xFF000099,0,0,0,50,-1,1);
        Attach3DTextLabelToPlayer(DutyLabel, playerid, 0,0,0);
    }
    else
    {
        SendClientMessageEx(playerid, COLOR_RED, "You are now off admin duty!");
        new string[128];
        format(string, sizeof(string), "Administrator %s is now off Admin Duty!", GetPlayerNameEx(playerid));
        ABroadCast(COLOR_LIGHTRED, string, 1);
        PlayerInfo[playerid][pTogReports] = 1;
        //SetPlayerName(playerid, PlayerInfo[playerid][pNormalName]);
        SetPlayerHealth(playerid, 100);
        SetPlayerArmour(playerid, 0);
        PlayerInfo[playerid][pAdminDuty] = 0;
    }
    return 1;
}
Reply


Messages In This Thread
Little coding help - by Casper001 - 04.04.2012, 18:08
Re: Little coding help - by aRoach - 04.04.2012, 18:25
Re: Little coding help - by Casper001 - 04.04.2012, 18:37
Re: Little coding help - by aRoach - 04.04.2012, 18:42
Re: Little coding help - by Casper001 - 04.04.2012, 20:21
Re: Little coding help - by TzAkS. - 04.04.2012, 20:46
Re: Little coding help - by Casper001 - 04.04.2012, 21:11
Re: Little coding help - by TzAkS. - 04.04.2012, 21:14
Re: Little coding help - by Casper001 - 04.04.2012, 21:21
Re: Little coding help - by TzAkS. - 04.04.2012, 21:27

Forum Jump:


Users browsing this thread: 1 Guest(s)