fuel system problem all vehicles use same fuel(enum variables, timers)
#3

Quote:
Originally Posted by Vin Diesel
Посмотреть сообщение
I'm not sure if this gonna work or not but give it a shot.

Код:
public timer_refuel(playerid)
{
	new vid = GetPlayerVehicleID(playerid);
	if(vid==personalcar1[playerid]){
	PlayerInfo[playerid][Fuel1] = 30000;
	isrefuelling[playerid] = 0;
	TextDrawSetString(td_fuel[playerid],"Fuel:10000");
	TogglePlayerControllable(playerid,1);
	}
	else if(vid==personalcar2[playerid]){
	PlayerInfo[playerid][Fuel2] = 30000;
	isrefuelling[playerid] = 0;
	TextDrawSetString(td_fuel[playerid],"Fuel:900"); //edited
	TogglePlayerControllable(playerid,1);
	}
	else if(vid==personalcar3[playerid]){
	PlayerInfo[playerid][Fuel3] = 30000;
	isrefuelling[playerid] = 0;
	TextDrawSetString(td_fuel[playerid],"Fuel:800"); //edited
	TogglePlayerControllable(playerid,1);
	}
}
Код:
TextDrawSetString(td_fuel[playerid],"Fuel:900");
these ones show for only one second after that it returns to normal value which is using same fuel ..
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 3 Guest(s)