Daytime Car Lights -
bookknp - 01.05.2018
Hello guys, can you turn on the daytime car lights? I need the code, very thx friends...
I have this code but only turn on the lights at night:
Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(newkeys == KEY_SUBMISSION)
{
if(IsPlayerInAnyVehicle(playerid))
{
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
new vehicleid, engine, lights, alarm, doors, bonnet, boot, objective;
vehicleid = GetPlayerVehicleID(playerid);
GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);
if(lights)
{
SetVehicleParamsEx(vehicleid, engine, false, alarm, doors, bonnet, boot, objective);
}
else
{
SetVehicleParamsEx(vehicleid, engine, true, alarm, doors, bonnet, boot, objective);
}
}
}
return 1;
}
Re: Daytime Car Lights -
David (Sabljak) - 01.05.2018
PHP код:
ManualVehicleEngineAndLights();
under
PHP код:
public OnGameModeInit()
Re: Daytime Car Lights -
bookknp - 01.05.2018
Now, car dont move
Re: Daytime Car Lights -
David (Sabljak) - 01.05.2018
You need to define VehicleParams
https://sampwiki.blast.hk/wiki/SetVehicleParamsEx
Re: Daytime Car Lights -
jasperschellekens - 01.05.2018
Quote:
Originally Posted by bookknp
Now, car dont move
|
That's because the engine is off.
Add this:
PHP код:
public OnPlayerEnterVehicle(playerid,vehicleid,ispassenger)
{
new engine,lights,alarm,doors,bonnet,boot,objective;
GetVehicleParamsEx(vehicleid,engine,lights,alarm,doors,bonnet,boot,objective);
SetVehicleParamsEx(vehicleid,1,lights,alarm,doors,bonnet,boot,objective);
return 1;
}
public OnPlayerExitVehicle(playerid,vehicleid)
{
new engine,lights,alarm,doors,bonnet,boot,objective;
GetVehicleParamsEx(vehicleid,engine,lights,alarm,doors,bonnet,boot,objective);
SetVehicleParamsEx(vehicleid,0,0,alarm,doors,bonnet,boot,objective);
return 1;
}
Re: Daytime Car Lights -
bookknp - 01.05.2018
Quote:
Originally Posted by jasperschellekens
That's because the engine is off.
Add this:
PHP код:
public OnPlayerEnterVehicle(playerid,vehicleid,ispassenger)
{
new engine,lights,alarm,doors,bonnet,boot,objective;
GetVehicleParamsEx(vehicleid,engine,lights,alarm,doors,bonnet,boot,objective);
SetVehicleParamsEx(vehicleid,1,lights,alarm,doors,bonnet,boot,objective);
return 1;
}
public OnPlayerExitVehicle(playerid,vehicleid)
{
new engine,lights,alarm,doors,bonnet,boot,objective;
GetVehicleParamsEx(vehicleid,engine,lights,alarm,doors,bonnet,boot,objective);
SetVehicleParamsEx(vehicleid,0,0,alarm,doors,bonnet,boot,objective);
return 1;
}
|
Very thx friend, one question for on engine of trolley car??...
Re: Daytime Car Lights -
bookknp - 02.05.2018
bump
Re: Daytime Car Lights -
jasperschellekens - 03.05.2018
Quote:
Originally Posted by bookknp
bump
|
Can u repeat your question? i don't understand what u want to do.
Re: Daytime Car Lights -
Sew_Sumi - 04.05.2018
Quote:
Originally Posted by bookknp
Very thx friend, one question for on engine of trolley car??...
|
Trailer? Nah.... Train? SF Tram?
Maybe the tram?
Re: Daytime Car Lights -
bookknp - 04.05.2018
Quote:
Originally Posted by jasperschellekens
Can u repeat your question? i don't understand what u want to do.
|
hello guys, I want to turn on the San Fierro Tram engine, but now ManualVehicleEngineAndLights () is set; and does not allow to move, can someone help me?? thx friends