Jump to content

Question

Posted

Problemă întâlnită (descriere): Am comanda /lights care opreste  luminile masinii daca e noapte sau le porneste daca sunt stinse, dar daca este zi nu se intampla nimic nu se vad luminile(pe timp de zi luminile nu se vad)
Ero(area / rile) / warning-(ul / urile): nu am warning
Liniile de cod / sursa / script-ul:

new vehicleid, engine, lights, alarm, doors, bonnet, boot, objective;
    if (strcmp("/lights", cmdtext, true, 10) == 0)
    {
        if(!IsPlayerInAnyVehicle(playerid))
            {
                SendClientMessage(playerid, COLOR_RED, "Nu esti intr-un vehicul");
                return 1;
            }
        if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
        {
            vehicleid = GetPlayerVehicleID(playerid);
            if(VehicleLights[vehicleid] == 0)
            {
                VehicleLights[vehicleid] = 1;
                SendClientMessage(playerid, COLOR_YELLOW, "Lights Turned On");
                GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);
                SetVehicleParamsEx(vehicleid, engine, true, alarm, doors, bonnet, boot, objective);
            }
            else if(VehicleLights[vehicleid] == 1)
            {
                VehicleLights[vehicleid] = 0;
                SendClientMessage(playerid, COLOR_YELLOW, "Lights Turned Off");
                GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);
                SetVehicleParamsEx(vehicleid, engine, false, alarm, doors, bonnet, boot, objective);
            }
        }
        return 1;
    }
Imagini / Video (optional):
Aţi încercat să rezolvaţi singur?: da. Problema este ca vreau sa se vada pe timp de zi.

5 answers to this question

Recommended Posts

Posted

Poti face in felul urmator:

Intrii pe server dai /lights si dupa /tod 0 ( ca sa se faca intuneric) si vezi daca functioneaza,nu are cum sa nu functioneze si ziua.

  • Upvote 1

 

 

Posted

salut am rezolvat, am facut cum ai spus @

Adrian_Petre

si am observat ca este din vina luminii zilei si am cautat si am gasit ca trebuie sa pun la ongamemodeinit aceasta functie:

 

ManualVehicleEngineAndLights(); acum merge multumesc

Guest
This topic is now closed to further replies.
×
×
  • 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.