*** Terrible Title Removed
#1

any one can give me

dcmd_aduty

With text at his head color pink, Dont Hit Admin on Duty
Reply
#2

https://sampforum.blast.hk/showthread.php?tid=187229
Reply
#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
#4

how to add admin level on that command ? only lvl 2 can use it
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)