19.04.2018, 16:14
PHP код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
fueltimer[vehicleid] = SetTimerEx("DecreaseFuel", 1000, 1, "ii", playerid, vehicleid);
VehicleMeter[playerid] = CreatePlayerTextDraw(playerid, 498.000000, 140.000000, " ");
PlayerTextDrawBackgroundColor(playerid, VehicleMeter[playerid], 255);
PlayerTextDrawFont(playerid, VehicleMeter[playerid], 1);
PlayerTextDrawLetterSize(playerid, VehicleMeter[playerid], 0.389999, 1.299999);
PlayerTextDrawColor(playerid, VehicleMeter[playerid], 0xFFFFFFFF);
PlayerTextDrawSetOutline(playerid, VehicleMeter[playerid], 1);
PlayerTextDrawSetProportional(playerid, VehicleMeter[playerid], 1);
return 1;
}
PHP код:
public OnPlayerExitVehicle(playerid, vehicleid)
{
KillTimer(fueltimer[vehicleid]);
PlayerTextDrawDestroy(playerid, VehicleMeter[playerid]);
return 1;
}