Attach3dTEXT problem
#1

Having trouble attaching 3D TEXT to a player.

Quote:

new Text3Dlayertextid[MAX_PLAYERS];

Quote:

command(playerlabel, playerid, params[])
{
#pragma unused params

new Float:X, Float:Y, Float:Z;
if(Player[playerid][AdminLevel] >= 4)
{
GetPlayerPos(playerid, X, Y, Z);
playertextid[playerid] = CreatePlayer3DTextLabel(playerid, "a", WHITE, X, Y, Z, 40.0); // problem here
Attach3DTextLabelToPlayer(playertextid[playerid], playerid, 0.0, 0.0, 0.7);
}
return 1;
}

Quote:

(18264) : warning 213: tag mismatch

Reply
#2

pawn Код:
command(playerlabel, playerid, params[])
{
#pragma unused params

new PlayerText3D:playertextid;
new Float:X, Float:Y, Float:Z;

if(Player[playerid][AdminLevel] >= 4)
{
     GetPlayerPos(playerid, X, Y, Z);
     playertextid = CreatePlayer3DTextLabel(playerid, "a", WHITE, X, Y, Z, 40.0);
     Attach3DTextLabelToPlayer(playertextid[playerid], playerid, 0.0, 0.0, 0.7);
}
Reply
#3

Not working mate.

I get

Quote:

C:\Users\ant\Desktop\sampsmallproject\gamemodes\Vo rtexRoleplay.pwn(18267) : error 028: invalid subscript (not an array or too many subscripts): "playertextid"
C:\Users\ant\Desktop\sampsmallproject\gamemodes\Vo rtexRoleplay.pwn(18267) : warning 215: expression has no effect
C:\Users\ant\Desktop\sampsmallproject\gamemodes\Vo rtexRoleplay.pwn(18267) : error 001: expected token: ";", but found "]"
C:\Users\ant\Desktop\sampsmallproject\gamemodes\Vo rtexRoleplay.pwn(18267) : error 029: invalid expression, assumed zero
C:\Users\ant\Desktop\sampsmallproject\gamemodes\Vo rtexRoleplay.pwn(18267) : fatal error 107: too many error messages on one line
that's all on

Attach3DTextLabelToPlayer(playertextid[playerid], playerid, 0.0, 0.0, 0.7);

I'd probably be able to figure this out on my own however my house is hectic right now and I can't think straight. :S
Reply
#4

pawn Код:
Attach3DTextLabelToPlayer(playertextid, playerid, 0.0, 0.0, 0.7);
Reply
#5

No now I get "TAG MISMATCH" on Attach3DTextLabelToPlayer

Sorry.

The only

Quote:

new PlayerText3Dlayertextid;
All I should have is that right? Non at the top of my script or anything?
Reply
#6

bump
Reply
#7

delete this
new Text3Dlayertextid[MAX_PLAYERS];
Reply
#8

okei try this
pawn Код:
command(playerlabel, playerid, params[])
{

new Text3D:label[MAX_PLAYERS];
new Float:X, Float:Y, Float:Z;

if(Player[playerid][AdminLevel] >= 4)
{
     GetPlayerPos(playerid, X, Y, Z);
     label[playerid] = Create3DTextLabel(playerid, "a", WHITE, X, Y, Z, 40.0);
     Attach3DTextLabelToPlayer(label[playerid], playerid, 0.0, 0.0, 0.7);
     return 1;
}
Reply
#9

pawn Код:
command(playerlabel, playerid, params[])
{
    new Text3D:label[MAX_PLAYERS], Float:X, Float:Y, Float:Z;
    if(Player[playerid][AdminLevel] >= 4) return 0;
    GetPlayerPos(playerid, X, Y, Z);
    label[playerid] = Create3DTextLabel("a",WHITE,X, Y, Z,40.0,0);
    Attach3DTextLabelToPlayer(label[playerid], playerid, 0.0, 0.0, 0.7);
    return 1;
}
@Elviss you missed up something.
Reply
#10

Just change Text3D to PlayerText3D

pawn Код:
new PlayerText3D:playertextid[MAX_PLAYERS];
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)