Attach3DTextLabelToPlayer bug.
#1

I posted this in scripting discussion incase i did something wrong. I bumped the topic and got no reply.
Anyway i want to attach 3dtext to a player but whenever i use "Attach3DTextLabelToPlayer" the text disappears. Maybe someone can shed some light for me here. Is this a bug? Or a silly mistake by me?? I have the following code,

pawn Код:
new Text3D:ij_viptitles[MAX_PLAYERS];//global
new ij_hastitle[MAX_PLAYERS];// "   "

COMMAND:viptitle(playerid, params[])
{
    if(ij_vipdata[playerid][ij_viplogged])
    {
        if(isnull(params))return SendClientMessage(playerid,LRED,"ERROR: Usage /viptitle [title/name]");
        else if(strlen(params) > 25)return SendClientMessage(playerid,LRED,"ERROR: That title is too long max length is 25");
        else
        {
            SendClientMessage(playerid, GREEN, "Use /titleoff to remove your title");
            if(ij_hastitle[playerid] == 1)
                return Update3DTextLabelText(ij_viptitles[playerid], ORANGE, params);
            else
            {
                new
                    Float:x,
                    Float:y,
                    Float:z;
                GetPlayerPos(playerid, x, y, z);
                ij_viptitles[playerid] = Create3DTextLabel(params,ORANGE, x, y, z, 50.0, GetPlayerVirtualWorld(playerid), 0);
                Attach3DTextLabelToPlayer(ij_viptitles[playerid], playerid, 0.0, 0.0, 0.5);//if i comment this line the 3d text is created
                ij_hastitle[playerid] = 1;                                                 //at the players location. (static)
                return 1;
            }
        }
    }
    else SendClientMessage(playerid,LRED,"You Don't Have Permission To Use That Command");
    return 1;
}
AFAIK theres nothing wrong with that code.
Reply


Messages In This Thread
Attach3DTextLabelToPlayer bug. - by iggy1 - 06.01.2011, 15:10
Re: Attach3DTextLabelToPlayer bug. - by Rac3r - 07.01.2011, 13:03
Re: Attach3DTextLabelToPlayer bug. - by iggy1 - 07.01.2011, 13:40
Re: Attach3DTextLabelToPlayer bug. - by MadeMan - 19.05.2011, 20:27
Re: Attach3DTextLabelToPlayer bug. - by iggy1 - 19.05.2011, 20:33
Re: Attach3DTextLabelToPlayer bug. - by MadeMan - 19.05.2011, 20:39
Re: Attach3DTextLabelToPlayer bug. - by iggy1 - 19.05.2011, 20:44
Re: Attach3DTextLabelToPlayer bug. - by MadeMan - 19.05.2011, 20:49

Forum Jump:


Users browsing this thread: 2 Guest(s)