Create3dTextlabel BUG
#2

Quote:
Originally Posted by Pearson
Посмотреть сообщение
CODE:
new textachvenebs[123];
new Floaticocxleii,Float:bronii;
GetPlayerHealth(playerid,sicocxleii);
GetPlayerArmour(playerid,bronii);
format(textachvenebs, sizeof(textachvenebs),"%s\n{6666FF}Sicocxle: %d - Broni: %d",name,sicocxleii,bronii);
axalitag[playerid] = Create3DTextLabel(textachvenebs,0xFFFFFFFF,0.0,0.0 ,0.0,8.0,GetPlayerVirtualWorld(playerid),1);
SetPlayerHealth(playerid, 100);
Attach3DTextLabelToPlayer(axalitag[playerid],playerid,0.0,0.0,0.3);
BUG:
It only show health 0 and armour 0 Help me Please its very important for me.
This line have Problem:
This isn't correct
format(textachvenebs, sizeof(textachvenebs),"%s\n{6666FF}Sicocxle: %d - Broni: %d",name,sicocxleii,bronii);


This is correct Health is in a Float and you're trying to show his health in integer that is not correct.

For Showing in Float use %0.1f
This is for Integer %d

format(textachvenebs, sizeof(textachvenebs),"%s\n{6666FF}Sicocxle: %0.1f - Broni: %0.1f",name,sicocxleii,bronii);


Use This Fixed Code:

Код:
new textachvenebs[123];
		    new Float:sicocxleii,Float:bronii;
		    GetPlayerHealth(playerid,sicocxleii);
		    GetPlayerArmour(playerid,bronii);
 format(textachvenebs, sizeof(textachvenebs),"%s\n{6666FF}Sicocxle: %0.1f - Broni: %0.1f",name,sicocxleii,bronii);
		    axalitag[playerid] = Create3DTextLabel(textachvenebs,0xFFFFFFFF,0.0,0.0,0.0,8.0,GetPlayerVirtualWorld(playerid),1);
		    SetPlayerHealth(playerid, 100);/// i don't know why u setting health here..
		    Attach3DTextLabelToPlayer(axalitag[playerid],playerid,0.0,0.0,0.3);
Reply


Messages In This Thread
Create3dTextlabel BUG - by Pearson - 16.05.2016, 02:00
Re: Create3dTextlabel BUG - by MBilal - 16.05.2016, 03:01
Re: Create3dTextlabel BUG - by Pearson - 16.05.2016, 03:17
Re: Create3dTextlabel BUG - by Pearson - 16.05.2016, 03:23
Re: Create3dTextlabel BUG - by SyS - 16.05.2016, 03:59
Re: Create3dTextlabel BUG - by MBilal - 16.05.2016, 08:01
Re: Create3dTextlabel BUG - by Pearson - 16.05.2016, 20:06
Re: Create3dTextlabel BUG - by JawsCraft - 17.05.2016, 11:41
Re: Create3dTextlabel BUG - by SyS - 17.05.2016, 11:43

Forum Jump:


Users browsing this thread: 1 Guest(s)