Attach3d text Lebal To Player Problem
#1

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 "0xFF9900AA27.040.050.040.00);
        
Attach3DTextLabelToPlayer(label[playerid], playerid0.00.00.7);
        return 
1;
    } 
Reply
#2

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;
    }
Reply
#3

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
Reply
#4

anyone help ?
Reply
#5

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);
		}
	}
Reply
#6

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 !!
Reply
#7

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);
        }
    }
Reply
#8

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

pawn Код:
if(AccInfo[playerid][Level] >= 5)
Are you sure this is your admin level define?
Reply
#10

yes you can see here

http://pastebin.com/ug1UP3zF
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)