Jump to content

sistem la masina


AlexCelTare

Recommended Posts

  • 1 month later...
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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.