Create3dTextlabel BUG
#1

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.
Reply
#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
#3

Тhanks i will try
Reply
#4

It Doesnt Work((((
Reply
#5

edit your code like this and tell what is showing on the server log
PHP код:
new textachvenebs[123];
new 
Float:sicocxleii,Float:bronii;
GetPlayerHealth(playerid,sicocxleii);
GetPlayerArmour(playerid,bronii);
printf("Sicocxle: %0.1f - Broni: %0.1f",sicocxleii,bronii);//debugging
format(textachvenebssizeof(textachvenebs),"%s\n{6666FF}Sicocxle: %0.1f - Broni: %0.1f",name,sicocxleii,bronii);
printf("text : %s",textachvenebs);//debugging           
axalitag[playerid] = Create3DTextLabel(textachvenebs,0xFFFFFFFF,0.0,0.0,0.0,8.0,GetPlayerVirtualWorld(playerid),1);
SetPlayerHealth(playerid100);
Attach3DTextLabelToPlayer(axalitag[playerid],playerid,0.0,0.0,0.3); 
Reply
#6

What is the problem you getting Create3dtext not showing or
Health not showing?
Explain it.
Reply
#7

Example i want to it shows armour 0.0 health 0.0 Not Player Health
Reply
#8

Try this
Haven't try but i think it will help you!
Код:
public OnPlayerUpdate(playerid)
{
    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);
    Update3DTextLabelText(axalitag[playerid], 0xFFFFFFFF, textachvenebs);
}
Reply
#9

Quote:
Originally Posted by Pearson
Посмотреть сообщение
Example i want to it shows armour 0.0 health 0.0 Not Player Health
did u even try what i posted?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)