23.02.2011, 18:23
There goes my code.
But the label does not update, it mixes with the previous label.
I can't figure out what am I doing wrong, can you?
Any help will be highly appreciated, thank you in advance!
pawn Код:
command(setlabel,playerid,params[])
{
new text[32];
if(sscanf(params,"s[32]",text))
return ShowInfo(playerid,"~r~USAGE: ~p~/sml [text]~n~~b~Will set a text above your head!");
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
format(string,sizeof(string),"%s",text);
label=Create3DTextLabel(string,0xC8C8C8FF,x,y,z,40.0,0,1);
Attach3DTextLabelToPlayer(label, playerid, 0.0, 0.0, 0.4);
UpdatePlayer3DTextLabelText(playerid,PlayerText3D:label,0xC8C8C8FF,text);
format(string,sizeof(string),"Label set to ~b~%s~w~!",text);
ShowInfo(playerid,string);
return 1;
}
I can't figure out what am I doing wrong, can you?
Any help will be highly appreciated, thank you in advance!