- 0
Comanda /lights
-
Recently Browsing 0 members
- No registered users viewing this page.
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.
Question
Mark S.
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