SA-MP Forums Archive
Fuel, HELP - 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, HELP (/showthread.php?tid=202146)



Fuel, HELP - Kardanas - 23.12.2010

Hello, at my GRP mod is Fuel system, so i decited to add few bikes in my server.

So, then player is getting on the bike its says 0Fuel.

how to make fuel inactive at bikes?


Re: Fuel, HELP - Mike_Peterson - 23.12.2010

define all bike ids and use a check if(!IsABike(vehicleid)) this will check if the vehicle is NOT a bike. use this onplayerentervehicle before the textdraw get shown.


Re: Fuel, HELP - Kardanas - 23.12.2010

how to define all bikes ids?


Re: Fuel, HELP - Mike_Peterson - 23.12.2010

I forgot how to make to make an array l0l. anyway since im quite dizzy here are the bike ids.
Bike:509
BMX:481
MB:510


Re: Fuel, HELP - stix - 23.12.2010

if(GetPlayerVehicleID(playerid) == 509 || GetPlayerVehicleID(playerid) == 481 || GetPlayerVehicleID(playerid) == 510)
{
Fuel = 0 // or whatever function you use
return 1;
}


Re: Fuel, HELP - Mike_Peterson - 23.12.2010

use this: new vid=GetVehicleModel(GetPlayerVehicleID(playerid));
if(vid == 509 || vid == 481 || vid == 510)
{
// stuff here
return 1;
}


Re: Fuel, HELP - Kardanas - 23.12.2010

This is what i find it my gm -

and i want to disable gas on bikes



if(model != BMX && model != MTBIKE && model != BIKE)
{
if(vehicleDB[vehicleid][gas] > aEda[model-400])
{
vehicleDB[vehicleid][gas]-=aEda[model-400];
new Float:vhp; GetVehicleHealth(vehicleid,vhp); if(vhp > 307) SetVehicleHealth(vehicleid,vhp-7);
}else{
if(vehicleDB[vehicleid][gas] > 0)
{
vehicleDB[vehicleid][gas]=0;
}else{
TogglePlayerControllable(playerid,false);
}
}


Re: Fuel, HELP - Kardanas - 23.12.2010

ANy1 ?


Re: Fuel, HELP - [BG]PREDATOR - 23.12.2010

like Mike say "my motto: Search before you post..."