SA-MP Forums Archive
3D Text Label Issue - 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: 3D Text Label Issue (/showthread.php?tid=211307)



3D Text Label Issue - BlackWolf120 - 15.01.2011

hi,

i want to attach textlabels to players. There are 2 teams and the players of the 2 team shall have different labels.
But there's just no label appearing over the players head. Why??
Ive also tried this without the gTeam switch, it worked but i want to attach different labels to different teams.
I hope u can help me once again

pawn Код:
new Text3D:ranklabelTEAM1[MAX_PLAYERS];
new Text3D:ranklabelTEAM2[MAX_PLAYERS];

public OnPlayerConnect(playerid)
{

//Labels
ranklabelTEAM1[playerid] = Create3DTextLabel("{1464F4}TEAM1",0xF97804FF,30.0,40.0,50.0,40.0,0);
ranklabelTEAM2[playerid] = Create3DTextLabel("{CC3232}TEAM2",0xF97804FF,30.0,40.0,50.0,40.0,0);

{
switch (gTeam[playerid])
{
case 1: //team1
{
Attach3DTextLabelToPlayer(ranklabelTEAM1[playerid], playerid, 0.0, 0.0, 0.5);
}

case 2: //team2
{
Attach3DTextLabelToPlayer(ranklabelTEAM1[playerid], playerid, 0.0, 0.0, 0.5);
}
}

}

regards...


Re: 3D Text Label Issue - BlackWolf120 - 15.01.2011

teams are set in public OnPlayerRequestClass(playerid, classid);
And i tested it with some friends.
So do i have to attach the labels in Onplayerrequestclass too?


Re: 3D Text Label Issue - hanzen - 15.01.2011

No. OnPlayerSpawn().


Re: 3D Text Label Issue - BlackWolf120 - 15.01.2011

i dont have the possibility to test it now, but i trust u with onplayerspawn
Lets see tomorrow
thx.