Jump to content

Recommended Posts

  • 1 month later...
Posted
On 10/15/2022 at 2:06 PM, AlexCelTare said:

asta e ideea ca am incercat si n-a iesit nmc

#include <a_samp>


new CoreENGINE,CoreLIGHTS,CoreCARalarm,
    CoreCARdoors,CoreCARBonnet,CoreCARBooty,CoreSobjective;

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    new veh = GetPlayerVehicleID(playerid);
//------------------------------------------------------------------------------
    if(newkeys == KEY_LOOK_BEHIND) //2
    {
        if(GetPVarInt(playerid, "Lights") == 0)
        {
            GetVehicleParamsEx(veh,CoreENGINE,CoreLIGHTS,CoreCARalarm,CoreCARdoors,CoreCARBonnet,CoreCARBooty,CoreSobjective);
            SetVehicleParamsEx(veh,CoreENGINE,VEHICLE_PARAMS_ON,CoreCARalarm,CoreCARdoors,CoreCARBonnet,CoreCARBooty,CoreSobjective);
            SetPVarInt(playerid, "Lights", 1);
            SendClientMessage(playerid,-1,"Luminile au fost aprinse.");
        }
        else if(GetPVarInt(playerid, "Lights") == 1)
        {
            GetVehicleParamsEx(veh,CoreENGINE,CoreLIGHTS,CoreCARalarm,CoreCARdoors,CoreCARBonnet,CoreCARBooty,CoreSobjective);
            SetVehicleParamsEx(veh,CoreENGINE,VEHICLE_PARAMS_OFF,CoreCARalarm,CoreCARdoors,CoreCARBonnet,CoreCARBooty,CoreSobjective);
            SetPVarInt(playerid, "Lights", 0);
            SendClientMessage(playerid,-1,"Luminile au fost stinse.");
        }
//------------------------------------------------------------------------------
    }
    return 1;
}

 

De inceput, poti continua tu mai departe.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.