OnPlayerEnterVehicle -
SoFahim - 23.07.2015
How to disable the this problem.If a player enter in a car, If vehicle id 481, 509, 510 , The car engine will not off. Like the car's do. How to fix the problem?
I have Added this line too
Код:
case 509, 481, 510: VehicleFuel[vehicleid] = 100, arr_Engine{vehicleid} = 1, SetVehicleParamsEx(vehicleid,VEHICLE_PARAMS_ON,lights,alarm,doors,bonnet,boot,objective);
But still problem
Re: OnPlayerEnterVehicle -
xVIP3Rx - 23.07.2015
What do you mean by
Quote:
The car engine will not off
|
?
Re: OnPlayerEnterVehicle -
SoFahim - 23.07.2015
Quote:
Originally Posted by xVIP3Rx
What do you mean by
?
|
I mean, In bike vehicle. ( Padel bike ) Should not have to off. like engine car
Re: OnPlayerEnterVehicle -
xVIP3Rx - 23.07.2015
Bikes(In GTA) has no motor, so are you trying to turn something that doesn't exist off when you get in a bike ?
Maybe if you tell me why are you trying to do this I would understand..
however, to turn the vehicle motor off use this
pawn Код:
stock DisableVehicleEngine(vehicleid)
{
new engine, lights, alarm, doors, bonnet, boot, objective;
GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);
SetVehicleParamsEx(vehicleid, VEHICLE_PARAMS_OFF, lights, alarm, doors, bonnet, boot, objective);
}
Re: OnPlayerEnterVehicle -
SoFahim - 23.07.2015
Quote:
Originally Posted by xVIP3Rx
Bikes(In GTA) has no motor, so are you trying to turn something that doesn't exist off when you get in a bike ?
Maybe if you tell me why are you trying to do this I would understand..
|
LOL no. I mean, If i enter a car, The car engine off. and i need to type /engine or /car engine to open it right?
Yes it is right./
But when i enter on a bike, The car also want /engine or /car engine . So I need to fix the problem. how to do that?
Re: OnPlayerEnterVehicle -
xVIP3Rx - 23.07.2015
Got it, and I showed you the codes to do it..
if, by default the motors are off, use my code
but if you disable it when somebody enters a vehicle, then don't when it's a bike.
Re: OnPlayerEnterVehicle -
SoFahim - 23.07.2015
Quote:
Originally Posted by xVIP3Rx
Got it, and I showed you the codes to do it..
if, by default the motors are off, use my code
but if you disable it when somebody enters a vehicle, then don't when it's a bike.
|
Thanks. But where is the codes?
Re: OnPlayerEnterVehicle -
xVIP3Rx - 23.07.2015
use "DisableVehicleEngine(vehicleid)" wherever you want to turn the engine off
pawn Код:
stock DisableVehicleEngine(vehicleid)
{
new engine, lights, alarm, doors, bonnet, boot, objective;
GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);
SetVehicleParamsEx(vehicleid, VEHICLE_PARAMS_OFF, lights, alarm, doors, bonnet, boot, objective);
}
Re: OnPlayerEnterVehicle -
SoFahim - 23.07.2015
Quote:
Originally Posted by xVIP3Rx
use "DisableVehicleEngine(vehicleid)" wherever you want to turn the engine off
pawn Код:
stock DisableVehicleEngine(vehicleid) { new engine, lights, alarm, doors, bonnet, boot, objective; GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective); SetVehicleParamsEx(vehicleid, VEHICLE_PARAMS_OFF, lights, alarm, doors, bonnet, boot, objective); }
|
I have ask for only bike . not for whole car system
Re: OnPlayerEnterVehicle -
xVIP3Rx - 23.07.2015
pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(newstate == PLAYER_STATE_DRIVER)
{
new vehicleid = GetPlayerVehicleID(playerid);
new model = GetVehicleModel(vehicleid);
switch(model)
{
case 481, 509, 510://Bikes, add more if you wish..
{
new engine, lights, alarm, doors, bonnet, boot, objective;
GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);
SetVehicleParamsEx(vehicleid, VEHICLE_PARAMS_ON, lights, alarm, doors, bonnet, boot, objective);
}
}
}
return 1;
}