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 
Float: Health;
    
GetPlayerHealth(playerid, Health);
    
format(string7, sizeof(string7), "%d", Health);
    
TextDrawSetString(Textdraw14[playerid], string7);
    
TextDrawShowForPlayer(playerid, Textdraw14[playerid]);
    new 
string8[120];
    new 
Float: Armour;
    
GetPlayerArmour(playerid, Armour);
    
format(string8, sizeof(string8), "%d", Armour);
    
TextDrawSetString(Textdraw15[playerid], string8);
    
TextDrawShowForPlayer(playerid, Textdraw15[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(playerid, Health);
    
format(string7, sizeof(string7), "%d", Health);
    
TextDrawSetString(Textdraw14[playerid], string7);
    
TextDrawShowForPlayer(playerid, Textdraw14[playerid]);
    new 
string8[120];
    new [
B]Float[/B]: Armour;
    
GetPlayerArmour(playerid, Armour);
    
format(string8, sizeof(string8), "%d", Armour);
    
TextDrawSetString(Textdraw15[playerid], string8);
    
TextDrawShowForPlayer(playerid, Textdraw15[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)