SA-MP Forums Archive
Time problem. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Time problem. (/showthread.php?tid=493077)



Time problem. - TheSnaKe - 06.02.2014

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?

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;
		}
	}



Re: Time problem. - TheSnaKe - 07.02.2014

Any one can help me with this please? i really need it.


Re: Time problem. - TheSnaKe - 07.02.2014

Bumb, guys please anyone?