SA-MP Forums Archive
Healths/armour of a clicked playerid - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Healths/armour of a clicked playerid (/showthread.php?tid=616427)



Healths/armour of a clicked playerid - bboytimix - 04.09.2016

somebody can help?
when i click on the player its shows hp:0,armour: 100
i loged with player that have 100 armour and 100 hp
and when i get damaged(losing healths only) i can see my health at armour:90 and hp stays in 0

pawn Код:
public OnPlayerClickPlayer(playerid, clickedplayerid, source)
{
    #define STATS_CLICK hp: %f - armour: %f  
    new string[400], string2[64],Float:health,Float:armour;
    GetPlayerHealth(clickedplayerid,health);
    GetPlayerArmour(clickedplayerid,armour);
    format(string2, sizeof(string2), "Stats of %s", GetPName(clickedplayerid));
    format(string, sizeof(string), "hp: %f - armour: %f" ,health,armour);
    ShowPlayerDialog(playerid,100,DIALOG_STYLE_MSGBOX, string2, string, "Cancel", "");

    return 1;
}