AFK system [HELP]
#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


Messages In This Thread
AFK system [HELP] - by Desi_Dude - 01.10.2012, 06:19
Re: AFK system [HELP] - by M3mPHi$_S3 - 01.10.2012, 06:21
Re: AFK system [HELP] - by Danyal - 01.10.2012, 06:32

Forum Jump:


Users browsing this thread: 2 Guest(s)