09.11.2015, 22:07
so i decided not to use sa-mp's player nametags and make my own ones using 3dtexts.
i've made a stock called UpdatePlayerLabel which updates players health & armour and puts them on the 3dtext.
now, the problem is, the 3dtext isn't updating correctly. for example if i shot my friend (he had 100 health pts) one time, with weapon that makes 10 dmg, he still had 100 hp on 3dtext even he really had 90 hp, and when i did it again, his 3dtext shows he now has 90hp when real amount is 80. how do i get rid of this update lag?
i've made a stock called UpdatePlayerLabel which updates players health & armour and puts them on the 3dtext.
now, the problem is, the 3dtext isn't updating correctly. for example if i shot my friend (he had 100 health pts) one time, with weapon that makes 10 dmg, he still had 100 hp on 3dtext even he really had 90 hp, and when i did it again, his 3dtext shows he now has 90hp when real amount is 80. how do i get rid of this update lag?
Код:
stock UpdatePlayerLabel(playerid) { new Float:pHealth; new Float:pArmour; GetPlayerHealth(playerid, pHealth); GetPlayerArmour(playerid, pArmour); new naem[MAX_PLAYER_NAME]; GetPlayerName(playerid, naem, sizeof(naem)); format(stc,sizeof(stc),"\n\n\n{FFFFFF}%s\n{FF4040}%.0f/{9698FE}%.0f", naem, pHealth, pArmour); Update3DTextLabelText(PlayerLabel[playerid], 0xFFFFFFFF, stc); return 1; }