24.10.2011, 19:23
About "new Text:VehicleHealthText" I already hav it "new Text:VehicleHealthText;"... and still dont work, just dont show .... it can be from the X and Y text positions? look my callback :
And i use/copy your script on your last post in OnGameModeInIt public
Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger) { if(!IsPlayerInAnyVehicle(playerid) == false) { GetVehicleHealth(vehicleid, vhealth); format(str1, sizeof (str1), "Vehicle Health:%f", vhealth); TextDrawSetString(VehicleHealthText, str1); TextDrawTextSize(VehicleHealthText, 2.0, 3.6); TextDrawFont(VehicleHealthText, 1); TextDrawShowForPlayer(playerid, VehicleHealthText); if(vhealth > 0) { TextDrawColor(VehicleHealthText, 0xFF0000FF); return 1; } if(vhealth > 250) { TextDrawColor(VehicleHealthText, 0xFD7E00FF); return 1; } if(vhealth > 500) { TextDrawColor(VehicleHealthText, 0xF2FF00FF); return 1; } if(vhealth > 750) { TextDrawColor(VehicleHealthText, 0x05E600FF); return 1; } return 0; } return 1; }