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 ) + 1 , tocolor ( 0 , 0 , 0 , 255 ), 1.3 , wFont , "center" , "center" , false , false , false , false , false )
dxDrawText ( "Zdrowie: " .. getElementHealth ( localPlayer ).. "%" , screenW * 0.7420 , screenH * 0.2000 , screenW * 0.8477 , screenH * 0.0898 , tocolor ( 220 , 0 , 0 , 255 ), 1.3 , wFont , "center" , "center" , false , false , false , false , false )