20.10.2013, 17:07
Hello, I wanna change TextDrawColor if vehicle health ....
I create global variable:
and :
And why text always be red? [0xFF0000FF]
P.S. Sorry for bad english
Код:
// code in OnGameModeInit callback new Float:vehHealth; GetVehicleHealth(maskesID, vehHealth); Textdraw18 = TextDrawCreate(373.000000, 412.000000, "100%"); TextDrawBackgroundColor(Textdraw18, 255); TextDrawFont(Textdraw18, 3); TextDrawLetterSize(Textdraw18, 0.259999, 0.899999); TextDrawSetOutline(Textdraw18, 0); TextDrawSetProportional(Textdraw18, 1); if(vehHealth >= 500) TextDrawColor(Textdraw18, 0x00FF00FF); if(vehHealth < 500) TextDrawColor(Textdraw18, 0xFF0000FF); TextDrawSetShadow(Textdraw18, 1);
Код:
new maskesID;
Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger) { maskesID = vehicleid; return 1; }
P.S. Sorry for bad english