16.05.2016, 03:01
Quote:
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 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);