Vehicle lights
#1

Hey guys, what's the function for turning on and off the lights?

I want to do this:
pawn Код:
if(IsKeyJustDown(KEY_NO, newkeys, oldkeys))
{
    /* Function */
}
And how do I control Direction Indicator Lights?

Thanks a lot
Reply
#2

https://sampwiki.blast.hk/wiki/SetVehicleParamsEx
Reply
#3

Thanks But how do I use Direction indicator lights?
Reply
#4

What you mean for Direction Indicator Lights?
Reply
#5

When you want to change direction..
Reply
#6

I think it's not possible.
Reply
#7

Make a timer which damage and fix car wings and I love your preview pic

use UpdateVehicleDamageStatus
Reply
#8

try this


Код:
if(IsKeyJustDown(KEY_NO, newkeys, oldkeys))
{
    new engine,lights,alarm,doors,bonnet,boot,objective,vehicleid;
    vehicleid = GetPlayerVehicleID(playerid);
    new vehicleid = GetPlayerVehicleID(playerid);
    if(GetVehicleModel(vehicleid) == 481 || GetVehicleModel(vehicleid) == 509 || GetVehicleModel(vehicleid) == 510) return SendClientMessageEx(playerid,COLOR_WHITE,"This command can't be used in this vehicle.");
    SetVehicleLights(vehicleid, playerid);

}
Код:
SetVehicleLights(vehicleid, playerid)
{
	new engine,lights,alarm,doors,bonnet,boot,objective;
    GetVehicleParamsEx(vehicleid,engine,lights,alarm,doors,bonnet,boot,objective);
    if(lights == VEHICLE_PARAMS_ON)
	{
		SetVehicleParamsEx(vehicleid,engine,VEHICLE_PARAMS_OFF,alarm,doors,bonnet,boot,objective);
		SendClientMessageEx(playerid, COLOR_WHITE, "Vehicle lights successfully turned off.");
	}
    else if(lights == VEHICLE_PARAMS_OFF || lights == VEHICLE_PARAMS_UNSET)
	{
		SetVehicleParamsEx(vehicleid,engine,VEHICLE_PARAMS_ON,alarm,doors,bonnet,boot,objective);
		SendClientMessageEx(playerid, COLOR_WHITE, "Vehicle lights successfully turned on.");
	}
	return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)