SA-MP Forums Archive
Fuel 0 bugg player dont remove from vehicle :S - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Fuel 0 bugg player dont remove from vehicle :S (/showthread.php?tid=139450)



Fuel 0 bugg player dont remove from vehicle :S - sjvt - 05.04.2010

Hi, my fuel system when my fuel is on fuel:0 it don't remove my from the vehicle!? can you help me? ? :S

Код:
public OnVehicleFuelEmpty(playerid, vehicleid)
{
  if(VehicleFuel[vehicleid] <= 0)
  {
	  RemovePlayerFromVehicleEx(playerid);
	  TogglePlayerControllable(playerid, true);
	  SetTimerEx("SendVehicleToRespawn", 3500, false, "d", vehicleid);
  }
	return 1;
}



Re: Fuel 0 bugg player dont remove from vehicle :S - pmk1 - 05.04.2010

shouldn't there be somehting like:
GetPlayerFuel[playerid] ?


Re: Fuel 0 bugg player dont remove from vehicle :S - Joe Staff - 05.04.2010

No, player's don't have fuel, vehicles do.





Re: Fuel 0 bugg player dont remove from vehicle :S - j500 - 05.04.2010

Код:
 public OnVehicleFuelEmpty(playerid, vehicleid)
{
  if(VehicleFuel[vehicleid] = 0)
  {
	  RemovePlayerFromVehicleEx(playerid);
	  TogglePlayerControllable(playerid, true);
	  SendVehicleToRespawn (vehicleid, true);
  }
	return 1;
}
could be something like this just took a shot in the dark
why u needed timer to hold vehicle there

or u may have it right just try removing the < from the less than 0
if(VehicleFuel[vehicleid] = 0


Re: Fuel 0 bugg player dont remove from vehicle :S - Jakku - 05.04.2010

pawn Код:
for (new i = 0; i < MAX_PLAYERS; i++)
{
//Code here
}