[Help] what's wrong with this (3d txt label player) -
Amine_Mejrhirrou - 21.10.2012
I've tried to make this 3d txt label to evry players who spawn ! but it works only with the last player spawn! we can't see the other players txt label
Код:
new Text3D:label[MAX_PLAYERS];
public OnPlayerSpawn(playerid)
{
Delete3DTextLabel(label[playerid]);
if(team[playerid] == 1)
{
label[playerid] = Create3DTextLabel("Human", 0xB4040477, 30.0, 40.0, 50.0, 40.0, 0);
Update3DTextLabelText(label[playerid], 0xB4040477, "Human");
Attach3DTextLabelToPlayer(label[playerid], playerid, 0.0, 0.0, 0.7);
return 1;
}
if(team[playerid] == 1)
{
label[playerid] = Create3DTextLabel("Animal", 0xB4040477, 30.0, 40.0, 50.0, 40.0, 0);
Update3DTextLabelText(label[playerid], 0xB4040477, "Animal");
Attach3DTextLabelToPlayer(label[playerid], playerid, 0.0, 0.0, 0.7);
return 1;
}
Re: [Help] what's wrong with this (3d txt label player) -
ThePhenix - 21.10.2012
It will work , you placed a wrong 1 there.
PHP код:
new Text3D:label[MAX_PLAYERS];
public OnPlayerSpawn(playerid)
{
Delete3DTextLabel(label[playerid]);
if(team[playerid] == 1)
{
label[playerid] = Create3DTextLabel("Human", 0xB4040477, 30.0, 40.0, 50.0, 40.0, 0);
Update3DTextLabelText(label[playerid], 0xB4040477, "Human");
Attach3DTextLabelToPlayer(label[playerid], playerid, 0.0, 0.0, 0.7);
return 1;
}
if(team[playerid] == 2)//You have put 1 instead 2.
{
label[playerid] = Create3DTextLabel("Animal", 0xB4040477, 30.0, 40.0, 50.0, 40.0, 0);
Update3DTextLabelText(label[playerid], 0xB4040477, "Animal");
Attach3DTextLabelToPlayer(label[playerid], playerid, 0.0, 0.0, 0.7);
return 1;
}
Re : [Help] what's wrong with this (3d txt label player) -
Amine_Mejrhirrou - 21.10.2012
yea that's what i did (just make the mistake when i was copying

) ! this isn't solving my problem
Re: [Help] what's wrong with this (3d txt label player) -
ThePhenix - 21.10.2012
What's the problem you have now?
What would happen if you use gTeam:
PHP код:
if( gTeam[playerid] == YOURTEAM ) {
Re : [Help] what's wrong with this (3d txt label player) -
Amine_Mejrhirrou - 21.10.2012
the problem is the same as the bigining ! i said that the 3d txt apear on the last player spawned only
i will not use gTeam cause i'm using team[playerid]

it's exaclt the same ... well thnks for trying to help
Re : [Help] what's wrong with this (3d txt label player) -
Amine_Mejrhirrou - 22.10.2012
u maybe have an other suggestion ?