3D Text Label Issue
#1

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...
Reply
#2

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?
Reply
#3

No. OnPlayerSpawn().
Reply
#4

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


Forum Jump:


Users browsing this thread: 2 Guest(s)