SA-MP Forums Archive
SetVehicleParamsEx Help - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: SetVehicleParamsEx Help (/showthread.php?tid=527161)



SetVehicleParamsEx Help - edwardluciano - 21.07.2014

pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if(Pressed(KEY_CTRL) && IsPlayerInAnyVehicle(playerid) && !Bike(newcar))
    {
       
            new engine, lights, alarm, doors, bonnet, boot, objective;
        GetVehicleParamsEx(newcar, engine, lights, alarm, doors, bonnet, boot, objective);
        if(lights == 1)
        {
            SetVehicleParamsEx(newcar, engine, 0, alarm, doors, bonnet, boot, objective);
        }
        else
        {
            SetVehicleParamsEx(newcar, engine, 1, alarm, doors, bonnet, boot, objective);
        }
        return 1;
    }
}
When in a car not work (if at night work normally)


but when out a car why it work (has way to fix light use on a day normally same night ?) * sorry my english skill not good



Re: SetVehicleParamsEx Help - osman2571 - 21.07.2014

put this under ongamemodeinit
ManualVehicleEngineAndLights();


Re: SetVehicleParamsEx Help - edwardluciano - 21.07.2014

Thankyou can you tell me about how to give REP ?