07.02.2014, 12:41
Hello guys, i have a command that appears and disappears the fuel bar, so when some type the command to be appear it appears only 1 second and then disappears , how can i make it to appear for ever? Please someone help me i really need it.
Code:
Code:
Код:
} else if(strcmp(params, "fuel", true) == 0 && IsPlayerInAnyVehicle(playerid)) { if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 481 || GetVehicleModel(GetPlayerVehicleID(playerid)) == 509 || GetVehicleModel(GetPlayerVehicleID(playerid)) == 510) return SendClientMessageEx(playerid,COLOR_RED,"This vehicle doesn't need fuel."); if(GetPVarInt(playerid, "fuelonoff") == 0) { SendClientMessageEx(playerid, COLOR_WHITE, "You have turned on the fuel indicator (green bar)."); SetPVarInt(playerid, "fuelonoff", 1); FuelBar[playerid] = CreateProgressBar(548.00, 26.00, 57.50, 3.20, 866792447, 100.0); textdrawscount++; SetProgressBarValue(FuelBar[playerid], VehicleFuel[GetPlayerVehicleID(playerid)]); ShowProgressBarForPlayer(playerid, FuelBar[playerid]); } else { SendClientMessageEx(playerid, COLOR_WHITE, "You have turned off the fuel indicator (green bar)."); SetPVarInt(playerid, "fuelonoff", 0); DestroyProgressBar(FuelBar[playerid]); textdrawscount--; FuelBar[playerid] = INVALID_BAR_ID; } }