SetVehicleParamsEx Help
#1

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
Reply
#2

put this under ongamemodeinit
ManualVehicleEngineAndLights();
Reply
#3

Thankyou can you tell me about how to give REP ?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)