Lights Help
#1

Hello

Can anyone help me

I am trying to get my lights to go to the back of my trailer when i am in my truck when i have my lights on anyway i can get it as just now they don't come on my trailer

Help please

Thanks
Reply
#2

You mean when you attach a vehicle in your vehicle, the rear lights of you vehicle will turned off then the other vehicle's rear lights turned on? No you can't do that. Except you turned both of them.

EDIT: Just crossed in my mind. You can do UpdateVehicleDamageStatus on the lights
Reply
#3

i want it when u attach a trailer to ur vehicle the rear lights of that vehicle and ur lights all come on and stay on till u turn them off
Reply
#4

You can set the light params for the attached vehicle.
pawn Код:
new trash,lights;
GetVehicleParamsEx(yourvehicleid,trash,lights,trash,trash,trash,trash,trash);
if(lights) SetVehicleParamsEx(theattachvehicle,-1,lights,-1,-1,-1,-1,-1);
Reply
#5

were will i add this too
Reply
#6

What do you mean?
Reply
#7

He means something like

OnGameModeInit , I think he ask where to put that functions.
Reply
#8

pawn Код:
CMD:trailerlightson(playerid, params[])
{
    if(GetPlayerVehicleSeat(playerid) != 0) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: You are not driving a vehicle!");
    if(!IsTrailerAttachedToVehicle(GetPlayerVehicleID(playerid))) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: No trailer attached!");
    SetVehicleParamsEx(GetVehicleTrailer(GetPlayerVehicleID(playerid)), 1, 1, -1, -1, -1, -1, -1);
    SendClientMessage(playerid, 0xFFFF00FF, "Trailer lights turned {00ff00}on{ffff00}!");
    return 1;
}

CMD:trailerlightsoff(playerid, params[])
{
    if(GetPlayerVehicleSeat(playerid) != 0) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: You are not driving a vehicle!");
    if(!IsTrailerAttachedToVehicle(GetPlayerVehicleID(playerid))) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: No trailer attached!");
    SetVehicleParamsEx(GetVehicleTrailer(GetPlayerVehicleID(playerid)), 0, 0, -1, -1, -1, -1, -1);
    SendClientMessage(playerid, 0xFFFF00FF, "Trailer lights turned {ff0000}off{ffff00}!");
    return 1;
}
Something like that?
Reply
#9

were do i add this too
Reply
#10

Quote:
Originally Posted by OPremium
Посмотреть сообщение
pawn Код:
CMD:trailerlightson(playerid, params[])
{
    if(GetPlayerVehicleSeat(playerid) != 0) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: You are not driving a vehicle!");
    if(!IsTrailerAttachedToVehicle(GetPlayerVehicleID(playerid))) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: No trailer attached!");
    SetVehicleParamsEx(GetVehicleTrailer(GetPlayerVehicleID(playerid)), 1, 1, -1, -1, -1, -1, -1);
    SendClientMessage(playerid, 0xFFFF00FF, "Trailer lights turned {00ff00}on{ffff00}!");
    return 1;
}

CMD:trailerlightsoff(playerid, params[])
{
    if(GetPlayerVehicleSeat(playerid) != 0) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: You are not driving a vehicle!");
    if(!IsTrailerAttachedToVehicle(GetPlayerVehicleID(playerid))) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: No trailer attached!");
    SetVehicleParamsEx(GetVehicleTrailer(GetPlayerVehicleID(playerid)), 0, 0, -1, -1, -1, -1, -1);
    SendClientMessage(playerid, 0xFFFF00FF, "Trailer lights turned {ff0000}off{ffff00}!");
    return 1;
}
Something like that?
like that but i want it when u attach a trailer the trailer lights automatically come on
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)