Switch - 3Dtextlabels
#1

Code:
ReturnAdminName(playerid)
{
    new
        string[64]
    ;
    switch (PlayerInfo[playerid][pAdmin])
    {
        case 1: Create3DTextLabel("Moderator", 0xFFA500FF, 30.0, 40.0, 50.0, 40.0, 0);
        case 2: Create3DTextLabel("Game Administrator", 0xFFA500FF, 30.0, 40.0, 50.0, 40.0, 0);
        case 3: Create3DTextLabel("Lead Administrator", 0xFFA500FF, 30.0, 40.0, 50.0, 40.0, 0);
        case 4: Create3DTextLabel("Server Manager", 0xFFA500FF, 30.0, 40.0, 50.0, 40.0, 0);
        default: string = "Undefined";
    }
    return string;
}
CMD:aduty(playerid, params[])
{
    new Text3D:LabelAdmin[MAX_PLAYERS] = {TEXT3D:INVALID_3DTEXT_ID, ...};

    if(IsAdmin(playerid))
    {
        if(IsOnAdminDuty(playerid))
        {
            PlayerInfo[playerid][pAdminDuty] = 0;
            SendClientMessage(playerid, COLOR_YELLOW, "You are now off duty.");
            Delete3DTextLabel(LabelAdmin[playerid]);
            LabelAdmin[playerid] = INVALID_3DTEXT_ID;
        }
        else
        {
            new adminName[24];
            format(adminName, sizeof(adminName), "%s", ReturnAdminName(playerid));
            LabelAdmin[playerid] = Create3DTextLabel(adminName, 0xFFA500FF, 30.0, 40.0, 50.0, 40.0, 0);
            Attach3DTextLabelToPlayer(LabelAdmin[playerid], playerid, 0.0, 0.0, 0.7);
            SendClientMessageEx(playerid, COLOR_YELLOW, "You are now on duty as a %s", ReturnAdminLevel(playerid));
            PlayerInfo[playerid][pAdminDuty] = 1;
        }
    }
    else
        return SendClientMessage(playerid, COLOR_RED, "ERROR: You are not an Administrator!");
    
    return 1;
}
Any reason why this shouldn't work? No 3Dtextlabel pops up when I use /aduty
Reply


Messages In This Thread
Switch - 3Dtextlabels - by Mo123 - 30.10.2018, 03:04
Re: Switch - 3Dtextlabels - by ProfessorX - 30.10.2018, 03:38
Re: Switch - 3Dtextlabels - by TheToretto - 30.10.2018, 07:02
Re: Switch - 3Dtextlabels - by Mo123 - 30.10.2018, 18:26
Re: Switch - 3Dtextlabels - by UFF - 30.10.2018, 18:30
Re: Switch - 3Dtextlabels - by TheToretto - 30.10.2018, 19:20
Re: Switch - 3Dtextlabels - by KinderClans - 30.10.2018, 20:27
Re: Switch - 3Dtextlabels - by J0sh... - 30.10.2018, 20:31
Re: Switch - 3Dtextlabels - by TheToretto - 30.10.2018, 20:34
Re: Switch - 3Dtextlabels - by Mo123 - 31.10.2018, 02:54
Re: Switch - 3Dtextlabels - by UFF - 31.10.2018, 03:55
Re: Switch - 3Dtextlabels - by Mo123 - 31.10.2018, 04:11
Re: Switch - 3Dtextlabels - by TheToretto - 31.10.2018, 07:37
Re: Switch - 3Dtextlabels - by Mo123 - 31.10.2018, 16:13
Re: Switch - 3Dtextlabels - by TheToretto - 31.10.2018, 16:32
Re: Switch - 3Dtextlabels - by v1k1nG - 31.10.2018, 16:37
Re: Switch - 3Dtextlabels - by J0sh... - 31.10.2018, 16:40
Re: Switch - 3Dtextlabels - by v1k1nG - 31.10.2018, 16:43
Re: Switch - 3Dtextlabels - by TheToretto - 31.10.2018, 16:52
Re: Switch - 3Dtextlabels - by Mo123 - 31.10.2018, 17:14
Re: Switch - 3Dtextlabels - by TheToretto - 31.10.2018, 17:16
Re: Switch - 3Dtextlabels - by Mo123 - 31.10.2018, 17:18
Re: Switch - 3Dtextlabels - by TheToretto - 31.10.2018, 17:19
Re: Switch - 3Dtextlabels - by Mo123 - 31.10.2018, 17:38
Re: Switch - 3Dtextlabels - by UFF - 31.10.2018, 17:52
Re: Switch - 3Dtextlabels - by Mo123 - 31.10.2018, 18:08
Re: Switch - 3Dtextlabels - by TheToretto - 31.10.2018, 18:16
Re: Switch - 3Dtextlabels - by Mo123 - 31.10.2018, 18:42
Re: Switch - 3Dtextlabels - by TheToretto - 31.10.2018, 18:52

Forum Jump:


Users browsing this thread: 4 Guest(s)