Bike bug. -
FaZeRs - 06.01.2015
So noone is able to drive with a bike
PHP код:
new engine,lights,alarm,doors,bonnet,boot,objective;
GetVehicleParamsEx(vehicleid,engine,lights,alarm,doors,bonnet,boot,objective);
if(engine == VEHICLE_PARAMS_UNSET) switch(GetVehicleModel(vehicleid)) {
case 509, 481, 510: VehicleFuel[vehicleid] = 100, arr_Engine{vehicleid} = 1, SetVehicleParamsEx(vehicleid,VEHICLE_PARAMS_ON,lights,alarm,doors,bonnet,boot,objective);
default: SetVehicleParamsEx(vehicleid,VEHICLE_PARAMS_OFF,VEHICLE_PARAMS_OFF,alarm,doors,bonnet,boot,objective), arr_Engine{vehicleid} = 0;
}
I have added this but it still doesnt work
Re: Bike bug. -
Sid_Alexander - 06.01.2015
You want players to avoid using bikes?
Re: Bike bug. -
FaZeRs - 06.01.2015
No i want players to use bikes.
Re: Bike bug. -
Sid_Alexander - 06.01.2015
Quote:
Originally Posted by FaZeRs
No i want players to use bikes.
|
I don't know, The code doesn't make sense, What does the code mean? That's a vehicle fuel and engine system for all vehicles, And you want to make it only for motor vehicles and not bikes, Correct?
Re: Bike bug. -
FaZeRs - 06.01.2015
I have put this code under it
PHP код:
new pveh = GetVehicleModel(GetPlayerVehicleID(playerid));
if(pveh == 510 || pveh == 462 || pveh == 481 || pveh == 509)
{
arr_Engine{vehicleid} = 1;
GetVehicleParamsEx(pveh,engine,lights,alarm,doors,bonnet,boot,objective);
SetVehicleParamsEx(pveh, 1, lights, 0, 0, 0, 0, 0);
}
With Bike i mean Bicycle
Re: Bike bug. -
Sid_Alexander - 06.01.2015
That will automatically turn the bike params engine to on, So you don't want them to do /engine on bicycle?
Re: Bike bug. -
FaZeRs - 06.01.2015
Yes. But it doesnt work.
Re: Bike bug. -
Sid_Alexander - 06.01.2015
Modify this with your codes
pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(oldstate == PLAYER_STATE_ONFOOT && newstate == PLAYER_STATE_DRIVER)
{
new engine,lights,alarm,doors,bonnet,boot,objective, vehicleid;
GetVehicleParamsEx(vehicleid,engine,lights,alarm,doors,bonnet,boot,objective);
if(GetVehicleModel(vehicleid) == 509 || GetVehicleModel(vehicleid) == 481 || GetVehicleModel(vehicleid) == 510)
{
VehicleFuel[vehicleid] = 100;
arr_Engine{vehicleid} = 1;
SetVehicleParamsEx(vehicleid, 1, lights, alarm, doors, bonnet, boot, objective);
}
}
return 1;
}
Re: Bike bug. -
FaZeRs - 06.01.2015
It didnt work
Re: Bike bug. -
FaZeRs - 07.01.2015
BUMP