Attach3DText problem. - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Attach3DText problem. (
/showthread.php?tid=652573)
Attach3DText problem. -
lolya93 - 14.04.2018
this code gives me that error.
That is error:
PHP код:
error 035: argument type mismatch (argument 2)1 Error.
That is code:
PHP код:
new Float:health;
GetPlayerHealth(playerid,Float:health);
format(health,sizeof(health),"%f",health);
new Text3D:PlayerLabel2 = Create3DTextLabel(health, -1, 0.0, 0.0, 40.0, 20.0, 0, 1);
Attach3DTextLabelToPlayer(PlayerLabel2, playerid, 0.0, 0.0, 0.1);
Re: Attach3DText problem. -
Lokii - 14.04.2018
PHP код:
new str[4], Float:health;
GetPlayerHealth(playerid,Float:health);
format(str,sizeof(str),"%f",health);
new Text3D:PlayerLabel2 = Create3DTextLabel(str, -1, 0.0, 0.0, 40.0, 20.0, 0, 1);
Attach3DTextLabelToPlayer(PlayerLabel2, playerid, 0.0, 0.0, 0.1);
Re: Attach3DText problem. -
lolya93 - 14.04.2018
Quote:
Originally Posted by Lokii
PHP код:
new str[4], Float:health;
GetPlayerHealth(playerid,Float:health);
format(str,sizeof(str),"%f",health);
new Text3D:PlayerLabel2 = Create3DTextLabel(str, -1, 0.0, 0.0, 40.0, 20.0, 0, 1);
Attach3DTextLabelToPlayer(PlayerLabel2, playerid, 0.0, 0.0, 0.1);
|
thanks a lot but, what did you change? can you explain me please?
Re: Attach3DText problem. -
Lokii - 14.04.2018
you format Float:health
yours:
PHP код:
format(health,sizeof(health),"%f",health);
while you should have done like this something[cells]
mine
PHP код:
format(str,sizeof(str),"%f",health);
Re: Attach3DText problem. -
lolya93 - 14.04.2018
Quote:
Originally Posted by Lokii
you format Float:health
yours:
PHP код:
format(health,sizeof(health),"%f",health);
while you should have done like this something[cells]
mine
PHP код:
format(str,sizeof(str),"%f",health);
|
I get it thanks a lot again.