is the random player's health is: 153546489? LOL
#1

Hello there! i have been trying to make textdraw which it got the amount of player's health and got this :



What if that is the random player's health? LMAO

PHP код:
public OnPlayerUpdate(playerid)
{
    new 
string7[20];
    new 
FloatHealth;
    
GetPlayerHealth(playeridHealth);
    
format(string7sizeof(string7), "%d"Health);
    
TextDrawSetString(Textdraw14[playerid], string7);
    
TextDrawShowForPlayer(playeridTextdraw14[playerid]);
    new 
string8[120];
    new 
FloatArmour;
    
GetPlayerArmour(playeridArmour);
    
format(string8sizeof(string8), "%d"Armour);
    
TextDrawSetString(Textdraw15[playerid], string8);
    
TextDrawShowForPlayer(playeridTextdraw15[playerid]);
    return 
1;

Reply
#2

Quote:
Originally Posted by RyderX
Посмотреть сообщение
Hello there! i have been trying to make textdraw which it got the amount of player's health and got this :



What if that is the random player's health? LMAO

PHP код:
public OnPlayerUpdate(playerid)
{
    new 
string7[20];
    new [
B]Float[/B]: Health;
    
GetPlayerHealth(playeridHealth);
    
format(string7sizeof(string7), "%d"Health);
    
TextDrawSetString(Textdraw14[playerid], string7);
    
TextDrawShowForPlayer(playeridTextdraw14[playerid]);
    new 
string8[120];
    new [
B]Float[/B]: Armour;
    
GetPlayerArmour(playeridArmour);
    
format(string8sizeof(string8), "%d"Armour);
    
TextDrawSetString(Textdraw15[playerid], string8);
    
TextDrawShowForPlayer(playeridTextdraw15[playerid]);
    return 
1;


4char123
Reply
#3

Shouldn't you be using %f instead of %d for floats?
Reply
#4

Quote:
Originally Posted by 4D1L
Посмотреть сообщение
Shouldn't you be using %f instead of %d for floats?
Ouch! Fk this typo thanks nigger
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)