car lights not working correctly
#1

hi, my problem is today that when i type command /lights then in day time the car light not turn on, but when it's night time and i type /lights then it works perfect, please help me.

pawn Код:
CMD:lights(playerid, params[])
{
    if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER) return SendClientMessage(playerid, V_PUNANE, "[VIGA]: Sa pead olema sхidukis ,et kasutada seda kдsku!");
    new vehicleid = GetPlayerVehicleID(playerid), engine, lights, alarm, doors, bonnet, boot, objective;
    GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);
    SetVehicleParamsEx(vehicleid, engine, (lights) ? (0) : (1), alarm, doors, bonnet, boot, objective);
    return 1;
}
Reply
#2

This should work:
pawn Код:
SetVehicleParamsEx(vehicleid, engine, 1, alarm, doors, bonnet, boot, objective);
Reply
#3

https://sampwiki.blast.hk/wiki/ManualVehicleEngineAndLights
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)