Attach3d text Lebal To Player Problem -
Saleem - 18.07.2013
i want to attach 3d text label on player spawn if he is admin
i tryed it so much :/ but it's not working
what's wrong on this code
PHP код:
if(AccInfo[playerid][Level] >= 5)
{
label[playerid] = Create3DTextLabel("Admin Level 5 ", 0xFF9900AA, 27.0, 40.0, 50.0, 40.0, 0);
Attach3DTextLabelToPlayer(label[playerid], playerid, 0.0, 0.0, 0.7);
return 1;
}
Re: Attach3d text Lebal To Player Problem -
SsHady - 18.07.2013
try this
pawn Код:
if(AccInfo[playerid][Level] >= 5)
{
new Text3D:label = Create3DTextLabel("Admin Level 5", 0x008080FF, 27.0, 40.0, 50.0, 40.0, 0);
Attach3DTextLabelToPlayer(label, playerid, 0.0, 0.0, 0.7);
return 1;
}
Re: Attach3d text Lebal To Player Problem -
Saleem - 18.07.2013
Quote:
Originally Posted by SsHady
try this
pawn Код:
if(AccInfo[playerid][Level] >= 5) { new Text3D:label = Create3DTextLabel("Admin Level 5", 0x008080FF, 27.0, 40.0, 50.0, 40.0, 0); Attach3DTextLabelToPlayer(label, playerid, 0.0, 0.0, 0.7); return 1; }
|
nope not working
Re: Attach3d text Lebal To Player Problem -
Saleem - 18.07.2013
anyone help ?
Re: Attach3d text Lebal To Player Problem -
Calvingreen17 - 18.07.2013
Add this at the top of your GM:
Код:
new Text3D:label[MAX_PLAYERS];
For your 3dtextlabel:
Код:
new string[128],name[MAX_PLAYER_NAME];
{
if(AccInfo[playerid][Level] >= 5)
{
GetPlayerName(i,name,sizeof(name));
format(string,sizeof(string),"%s\nAdmin Level 5",name);
label[playerid] = Create3DTextLabel(string,0x008080FF,27.0,40.0,50.0,40.0,0);
Attach3DTextLabelToPlayer(label[playerid],playerid,0.0,0.0,0.0);
}
}
Re: Attach3d text Lebal To Player Problem -
Saleem - 18.07.2013
Quote:
D:\Others\101SSCAM\samp03x_svr_R1-2_win32\filterscripts\spsa.pwn(851) : error 017: undefined symbol "i"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
1 Error.
|
error !!
Re: Attach3d text Lebal To Player Problem -
faff - 18.07.2013
Code fix from CalvinGreen17.
Add this on the top:
pawn Код:
new Text3D:label[MAX_PLAYERS];
For your 3Dtextlabel.
pawn Код:
new string[128],name[MAX_PLAYER_NAME];
{
if(AccInfo[playerid][Level] >= 5)
{
GetPlayerName(playerid,name,sizeof(name));
format(string,sizeof(string),"%s\nAdmin Level 5",name);
label[playerid] = Create3DTextLabel(string,0x008080FF,27.0,40.0,50.0,40.0,0);
Attach3DTextLabelToPlayer(label[playerid],playerid,0.0,0.0,0.0);
}
}
Re: Attach3d text Lebal To Player Problem -
Saleem - 18.07.2013
Quote:
Originally Posted by faff
Code fix from CalvinGreen17.
Add this on the top:
pawn Код:
new Text3D:label[MAX_PLAYERS];
For your 3Dtextlabel.
pawn Код:
new string[128],name[MAX_PLAYER_NAME]; { if(AccInfo[playerid][Level] >= 5) { GetPlayerName(playerid,name,sizeof(name)); format(string,sizeof(string),"%s\nAdmin Level 5",name); label[playerid] = Create3DTextLabel(string,0x008080FF,27.0,40.0,50.0,40.0,0); Attach3DTextLabelToPlayer(label[playerid],playerid,0.0,0.0,0.0); } }
|
code is fixed but still lebal not showing ?
Re: Attach3d text Lebal To Player Problem -
faff - 18.07.2013
pawn Код:
if(AccInfo[playerid][Level] >= 5)
Are you sure this is your admin level define?
Re: Attach3d text Lebal To Player Problem -
Saleem - 18.07.2013
yes you can see here
http://pastebin.com/ug1UP3zF