easy afk system
#1

I know its easy, but its my first time using 3dTextLabels so plz help me


pawn Code:
if(strcmp(cmdtext, "/afk", true) == 0)
    {
        if(IsAFK[playerid] == 0)
        {
            AFKLabel[playerid] = Create3DTextLabel("This Player Is AFK!", RED, 0.0, 0.0, 1000.0, 40.0, 0, 0);
            TogglePlayerControllable(playerid, 0);
            IsAFK[playerid] = 1;
            Attach3DTextLabelToPlayer(AFKLabel[playerid], playerid, 0.0, 0.0, 0.7);
            return 1;
        }
        if(IsAFK[playerid] == 1)
        {
            SendClientMessage(playerid, RED, "You're already AFK!");
            return 1;
        }
    }
    if(strcmp(cmdtext, "/back", true) == 0)
    {
        if(IsAFK[playerid] == 1)
        {
            TogglePlayerControllable(playerid, 1);
            IsAFK[playerid] = 0;
            Delete3DTextLabel(AFKLabel[playerid]);
            return 1;
        }
        if(IsAFK[playerid] == 0)
        {
            SendClientMessage(playerid, RED, "You were here already!");
            return 1;
        }
    }


pawn Code:
C:\Users\Marino (Desktop)\Desktop\new samp\gamemodes\Zombie_Outbreak_Original_Updating.pwn(2432) : warning 213: tag mismatch
C:\Users\Marino (Desktop)\Desktop\new samp\gamemodes\Zombie_Outbreak_Original_Updating.pwn(2435) : warning 213: tag mismatch
C:\Users\Marino (Desktop)\Desktop\new samp\gamemodes\Zombie_Outbreak_Original_Updating.pwn(2450) : warning 213: tag mismatch
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


3 Warnings.
Reply
#2

pawn Code:
new Text3D:AFKLabel[MAX_PLAYERS];
Reply
#3

ohh I see, it was like this before :

pawn Code:
new PlayerText3D:AFKLabel[MAX_PLAYERS];

Thanx man
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)