Help with the command /aod
#8

Код:
CMD:aod(playerid, params[])
{
    new string[128];
    if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
    if(PlayerInfo[playerid][pAdmin] < 1) return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
    if(!aDuty[playerid])
    {
        format(string, sizeof(string), "AdmWarn: %s has went on admin duty.", RPN(playerid));
        SendAdminMessage(COLOR_DARKRED, 1, string);
        aDuty[playerid] = 1;
        for(new i = 0; i < MAX_PLAYERS; i++)
		{
	 		ShowPlayerNameTagForPlayer(i, playerid, false);
		}
        format(string, sizeof(string), "{FF6347}ARP Administartor\n{FFFFFF}%s\n{2641FE}%s", RPN(playerid), RPALN(playerid));
        if(IsValidDynamic3DTextLabel(aDutyText[playerid]))  DestroyDynamic3DTextLabel(aDutyText[playerid]);
        if(PlayerInfo[playerid][pAdmin] == 1) aDutyText[playerid] = CreateDynamic3DTextLabel(string, COLOR_LIGHTGREEN, 0, 0, -20, 25, playerid);
        if(PlayerInfo[playerid][pAdmin] == 2) aDutyText[playerid] = CreateDynamic3DTextLabel(string, COLOR_LIME, 0, 0, -20, 25, playerid);
        if(PlayerInfo[playerid][pAdmin] == 3) aDutyText[playerid] = CreateDynamic3DTextLabel(string, COLOR_YELLOW, 0, 0, -20, 25, playerid);
        if(PlayerInfo[playerid][pAdmin] == 4) aDutyText[playerid] = CreateDynamic3DTextLabel(string, COLOR_ORANGE, 0, 0, -20, 25, playerid);
        if(PlayerInfo[playerid][pAdmin] == 1337) aDutyText[playerid] = CreateDynamic3DTextLabel(string, COLOR_RED, 0, 0, -20, 25, playerid);
        if(PlayerInfo[playerid][pAdmin] == 1338) aDutyText[playerid] = CreateDynamic3DTextLabel(string, COLOR_DARKRED, 0, 0, -20, 25, playerid);
        Streamer_SetFloatData(STREAMER_TYPE_3D_TEXT_LABEL, aDutyText[playerid] , E_STREAMER_ATTACH_OFFSET_Z, 0.25);
        PlayerInfo[playerid][pModel] = GetPlayerSkin(playerid);
        GiveDodWeapon(playerid, 38, 11999);
        SetPlayerArmour(playerid, 1000000000.0);
        SetPlayerHealth(playerid, 1000000000.0);
        //SetPlayerSkin(playerid, 294);
    }
    else
    {
        if(Spec[playerid]) return SendClientMessage(playerid, COLOR_GREY, "You can't go off admin duty while spectating someone.");
        aDuty[playerid] = 0;
        for(new i = 0; i < MAX_PLAYERS; i++)
		{
			ShowPlayerNameTagForPlayer(i, playerid, true);
		}
        format(string, sizeof(string), "AdmWarn: %s has went off admin duty.", RPN(playerid));
        SendAdminMessage(COLOR_DARKRED, 1, string);
        DestroyDynamic3DTextLabel(aDutyText[playerid]);
        //new oldskinsss;
        //oldskinsss = PlayerInfo[playerid][pModel];
        //SetPlayerSkin(playerid, oldskinsss);
        SetPlayerArmour(playerid, 100.0);
        SetPlayerHealth(playerid, 100.0);
        ResetPlayerWeapons(playerid);
        ResetDodWeapons(playerid);
    }
    return 1;
}
Reply


Messages In This Thread
Help with the command /aod - by MichaelWharton101 - 05.11.2013, 01:35
Re: Help with the command /aod - by MichaelWharton101 - 05.11.2013, 14:25
Re: Help with the command /aod - by zT KiNgKoNg - 05.11.2013, 14:44
Respuesta: Re: Help with the command /aod - by MichaelWharton101 - 05.11.2013, 14:49
Respuesta: Help with the command /aod - by MichaelWharton101 - 05.11.2013, 16:32
Re: Help with the command /aod - by ikbenremco - 05.11.2013, 16:45
Respuesta: Re: Help with the command /aod - by MichaelWharton101 - 05.11.2013, 17:12
Re: Help with the command /aod - by Brandon_More - 05.11.2013, 17:27

Forum Jump:


Users browsing this thread: 3 Guest(s)