string doesn't get called
#1

PHP код:
            new str2[228]; 
            new 
Float:armour
            new 
Float:health
            
GetPlayerArmour(damagedidarmour); 
            
GetPlayerHealth(damagedidhealth); 
            
format(str2,sizeof(str2),"~n~~n~~n~~n~~n~~n~~b~~h~~h~%s~n~~w~ARMOUR:%0.2f ~r~Health:%0.2f "pName[damagedid], armourhealth); 
            
GameTextForPlayer(playeridstr210003); 
if i shoot someone it should show the playername,health and also the armour of the damaged id
but in this case,it's only showing player's name
Reply
#2

because u have only created pName[damagedid] which shows the player's name itself
Reply
#3

you don't understand at all.
damagedid is the player who get damaged
https://sampwiki.blast.hk/wiki/OnPlayerGiveDamage
Reply
#4

Sorry.Didn't read the code properly , try:
PHP код:
            new str2[128];  
            new 
Float:armour;  
            new 
Float:health;  
            
GetPlayerArmour(damagedidarmour);  
            
GetPlayerHealth(damagedidhealth);  
            
format(str2,sizeof(str2),"~n~~n~~n~~n~~n~~n~~b~~h~~h~%s~n~~w~ARMOUR:%f~r~Health:%f"pName[damagedid], armourhealth);  
            
GameTextForPlayer(playeridstr210003); 
Reply
#5

Have you noticed how many lines you made? (~n~).
Try removing some of them.
Also set health/armour as %.0f in the string.
Reply
#6

I want to make it like this

is there any other way?
Reply
#7

I think it's textdraw, not gametext.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)