CTRL for vehicle headlights
#6

-.-
Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys) 
{ 
        if(newkeys == KEY_ACTION) // KEY_SUBMISSION = butonul 2 - Daca apesi 2 vei deschide / inchide farurile 
        { 
            if(IsPlayerInAnyVehicle(playerid))  // Daca playerul nu e in masina oprim 'operatiunea' 
            {
                new engine, lights, alarm, doors, bonnet, boot, objective; // Cream niste variabile pentru a stoca informatiile despre masini 
                new vid = GetPlayerVehicleID(playerid); // Cream o variabiabila gen 'shortcut' pentru a nu mai scrie 'GetPlayerVehicleID(playerid)' 

                GetVehicleParamsEx(vid, engine, lights, alarm, doors, bonnet, boot, objective); // Stocam informatiile despre masina in variabilile create; // La fel ca mai sus doar ca opusu (o pornim daca e oprita) 
                if(lights == VEHICLE_PARAMS_ON) SetVehicleParamsEx(vid, engine, VEHICLE_PARAMS_OFF, alarm, doors, bonnet, boot, objective); // Daca lumina este pornita , o oprim - Traducere mot-a-mot :P 
                if(lights == VEHICLE_PARAMS_OFF) SetVehicleParamsEx(vid, engine, VEHICLE_PARAMS_ON, alarm, doors, bonnet, boot, objective); 
            }
        } 
        return 1; 
}
Reply


Messages In This Thread
CTRL for vehicle headlights - by GabiXx - 15.08.2015, 19:52
Re: CTRL for vehicle headlights - by Vince - 15.08.2015, 20:03
Re: CTRL for vehicle headlights - by GabiXx - 15.08.2015, 20:20
Re: CTRL for vehicle headlights - by Variable™ - 15.08.2015, 20:57
Re: CTRL for vehicle headlights - by GabiXx - 15.08.2015, 21:22
Re: CTRL for vehicle headlights - by Variable™ - 15.08.2015, 21:32

Forum Jump:


Users browsing this thread: 1 Guest(s)