*** Terrible Title Removed
#3

here

pawn Код:
#include <a_samp>

#define PINK 0xE100E1FF

#define dcmd(%1,%2,%3) if (!strcmp((%3)[1], #%1, true, (%2)) && ((((%3)[(%2) + 1] == '\0') && (dcmd_%1(playerid, ""))) || (((%3)[(%2) + 1] == ' ') && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1

#define INFINITY (Float:0x7F800000)

new Text3D:DutyTag[MAX_PLAYERS];

new bool:OnDuty[MAX_PLAYERS];

public OnPlayerCommandText(playerid, cmdtext[])
{
    dcmd(aduty,5,cmdtext);
    return 1;
}
dcmd_aduty(playerid,params[])
{
    #pragma unused params
        //put admin variable here
    if(OnDuty[playerid])
    {
        OnDuty[playerid] = false;
        SetPlayerHealth(playerid,100.0);
        Delete3DTextLabel(DutyTag[playerid]);
    }
    else
    {
        OnDuty[playerid] = true;
        SetPlayerHealth(playerid,INFINITY);
        SetPlayerColor(playerid,PINK);
        DutyTag[playerid] = Create3DTextLabel("Dont Hit Admin on Duty",PINK,30.0,40.0,50.0,40.0,0);
        Attach3DTextLabelToPlayer(DutyTag[playerid], playerid, 0.0, 0.0, 1.5);
    }
    return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
    if(OnDuty[playerid]) Delete3DTextLabel(DutyTag[playerid]);
    OnDuty[playerid] = false;
    return 1;
}
Reply


Messages In This Thread
*** Terrible Title Removed - by [NMD]Chronos - 23.10.2012, 12:52
Re: i hope anyone can help Me - by McCarthy - 23.10.2012, 13:45
Re: i hope anyone can help Me - by mincer - 23.10.2012, 13:50
Re: i hope anyone can help Me - by [NMD]Chronos - 24.10.2012, 03:03

Forum Jump:


Users browsing this thread: 1 Guest(s)