Help Heatl+Armour Digi
#1



healt + armor it's remain silent 100.
PHP код:
forward mauvagiap(playerid);
public 
mauvagiap(playerid)
{
new 
string[15];
new 
Float:pmau//Float:pgiap;
GetPlayerHealth(playerid,pmau);
format(stringsizeof(string), "%.0f%"pmau);
TextDrawSetString(mau1[playerid], string);
TextDrawShowForPlayer(playeridmau1[playerid]);
new 
Float:pgiap;
new 
giap[15];
GetPlayerArmour(playerid,pgiap);
format(giapsizeof(giap), "%.0f%"pgiap);
TextDrawSetString(giap1[playerid], giap);
TextDrawShowForPlayer(playeridgiap1[playerid]); 
Reply
#2

What's the problem
Reply
#3

armor and health not diminished under TextDraw
Reply
#4

Where is the function being called at?
Reply
#5

Use a timer for update the function public mauvagiap.
Reply
#6

although was settime but still not be.

PHP код:
forward mauvagiap(playerid);
public 
mauvagiap(playerid)
{
        new 
string[5];
        new 
Float:HPFloat:Giap;
        
GetPlayerHealth(playerid,HP);
        
GetPlayerArmour(playerid,Giap);
        
        
format(stringsizeof(string), "%.0f%"HP);
        
TextDrawSetString(mau1[playerid], string);
        
        
format(stringsizeof(string), "%.0f%"Giap);
        
TextDrawSetString(giap1[playerid], string);
        
SetTimer("mauvagiap",1000,1);
    }

PHP код:
public OnPlayerUpdate(playerid)
{    
    new 
Float:pgiap;
    
GetPlayerArmour(playeridpgiap);
    if(
pgiap == 0){
    
TextDrawHideForPlayer(playeridgiap1[playerid]);
    } else {
    
TextDrawShowForPlayer(playeridgiap1[playerid]);
    } 
PHP код:
public OnPlayerSpawn(playerid)
{
    
TextDrawShowForPlayer(playeridmau1[playerid]); 
Reply
#7

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)