3dText Problems still. - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: 3dText Problems still. (
/showthread.php?tid=256058)
3dText Problems still. -
Skylar Paul - 18.05.2011
I've been having the same problem for days now, it refuses to work.
OnPlayerSpawn:
pawn Код:
new
Float:MyPos[4],
string[128];
GetPlayerPos(playerid, MyPos[0], MyPos[1], MyPos[2]);
format(string, sizeof(string), "%s (ID: %d)", GetTheirName(playerid), playerid);
NameTag[playerid] = CreateDynamic3DTextLabel(string, 0xFFFFFFF, 30.0, 40.0, 50.0, 40.0, 0);
Attach3DTextLabelToPlayer(NameTag[playerid], playerid, MyPos[0], MyPos[1], MyPos[2]+0.2);
Why does this not work properly? It's beginning to piss me off.
Re: 3dText Problems still. -
Skylar Paul - 19.05.2011
Bump... Once again...
Re: 3dText Problems still. -
sansko - 19.05.2011
i'll look to it tomorrow
Re: 3dText Problems still. -
MadeMan - 19.05.2011
It probably doesn't work because native functions don't work with streamer label id's.
Use normal Create3DTextLabel
Re: 3dText Problems still. -
iggy1 - 19.05.2011
That probably wont work either check my post.
https://sampforum.blast.hk/showthread.php?tid=207599
code in the link:
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;
}
Nothing wrong with that that i can see but it doesnt work. (the vip check works ok its nothing to do with that)
Still waiting for an answer...
Re: 3dText Problems still. -
Skylar Paul - 19.05.2011
Quote:
Originally Posted by iggy1
That probably wont work either check my post. https://sampforum.blast.hk/showthread.php?tid=207599
code in the link:
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; }
Nothing wrong with that that i can see but it doesnt work. (the vip check works ok its nothing to do with that)
Still waiting for an answer...
|
More bugs. *sigh*
Re: 3dText Problems still. -
PotH3Ad - 20.05.2011
Try replacing this line
pawn Код:
NameTag[playerid] = CreateDynamic3DTextLabel(string, 0xFFFFFFF, 30.0, 40.0, 50.0, 40.0, playerid);
Re: 3dText Problems still. -
Skylar Paul - 20.05.2011
Quote:
Originally Posted by PotH3Ad
Try replacing this line
pawn Код:
NameTag[playerid] = CreateDynamic3DTextLabel(string, 0xFFFFFFF, 30.0, 40.0, 50.0, 40.0, playerid);
|
Nothing.