AFK system [HELP]
#1

hey guys , Is it possible to make a AFK Systemm based on ZCMD?

Such as The player Types /AFK and he goes afk together with other players will see a textlabel on top of that player saying The player is currently AFK .

IF yes could you help with with it ?

Help would be appriciated
Reply
#2

of course it is possible Read my signature and you can create that by using
pawn Код:
new 3dText:Label [MAX_PLAYERS];
Reply
#3

Here is full afk system with 3d text...

pawn Код:
#define YELLOW 0xFFFF00AA
#define COLOR_YELLOW 0xFFFF00AA
new IsAFK[MAX_PLAYERS];

new Text3D:label[MAX_PLAYERS];


public OnPlayerConnect(playerid)
{
    IsAFK[playerid] = 0;
    return 1;
}


CMD:afk(playerid, params[])
{
    if(IsAFK[playerid] == 0)
    {
        SendClientMessage(playerid, COLOR_YELLOW, "You are now AFK, type /back to move again!");
        TogglePlayerControllable(playerid,0);
        label[playerid] = Create3DTextLabel("AFK",YELLOW,30.0,40.0,50.0,40.0,0);
        Attach3DTextLabelToPlayer(label[playerid], playerid, 0.0, 0.0, 0.7);
        IsAFK[playerid] = 1;
    }
    else
    {
        SendClientMessage(playerid, COLOR_YELLOW, "You are Already AFK!");
    }
    return 1;
}

CMD:back(playerid, params[])
{
    if(IsAFK[playerid] == 1)
    {
        SendClientMessage(playerid, COLOR_YELLOW, "You are now back!");
        TogglePlayerControllable(playerid,1);
        Delete3DTextLabel(Text3D:label[playerid]);
        IsAFK[playerid] = 0;
    }
    else
    {
        SendClientMessage(playerid, COLOR_YELLOW, "You are not AFK!");
    }
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)