Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.
GTAONLINE.PL
Tematy otagowane jako: zycia
1. Sprawdzanie stanku kamizelki oraz zycia
Cze?c mam taki problem nie potrafie pobra? stanu zdrowia oraz kamizelki od specowanego gracza


Kod:

new Float: zycie;
new Float: Armour;
TogglePlayerSpectating(playerid, 1);
PlayerSpectatePlayer(playerid, pid);
GetPlayerHealth(pid, zycie);
format(string, sizeof string, "{ffffff}Stan HP: %3d",zycie);
GetPlayerArmour(playerid, armour);
SendClientMessage(playerid, -1, string);
format(string, sizeof string, "{ffffff}Stan Kamizelki: %3d",Armor);
SendClientMessage(playerid, -1, string);
format(string, sizeof string, "{ffffff}Zezwolenie na u?ywane s0beita: %i",Sob);
SendClientMessage(playerid, -1, string);
format(string, sizeof string, "{ffffff}Aby wy??czy? podgl?d Gracza %s wpisz {009900}/specoff",NazwaGracza(pid));
SendClientMessage(playerid, -1, string);



ss jak to wygl?da:
https://imgur.com/FF76YMP[/code]
2. Procent zycia dxDrawText
Siema, mam problem gdy? napisa?em sobie napis z aktualnym stanem hp lecz po utraceniu hp pokazuje dok?adny stan czyli np. 98.9999827181.
Jak zrobi? aby pokazywa?o tylko 98% a nie takie dok?adne liczby.

m?j kod:

    dxDrawText
("Zdrowie: "..getElementHealth(localPlayer).."%", (screenW 0.7420) + 1, (screenH 0.2000) + 1, (screenW 0.8477) + 1, (screenH 0.0898) + 1tocolor(000255), 1.3wFont"center""center"falsefalsefalsefalsefalse)
    
dxDrawText("Zdrowie: "..getElementHealth(localPlayer).."%"screenW 0.7420screenH 0.2000screenW 0.8477screenH 0.0898tocolor(22000255), 1.3wFont"center""center"falsefalsefalsefalsefalse)