Problem with /lights command
#1

Hello guys.
I'm Benjamin Jones and I need some help.So I will discribe my problem.When I type /lights I they are working if the time is dark(Night).If it's day they doesn't work.If someone can help me will be really good.I just want to someone make it to work when is day and when is night ... 24 hours...Thank you.

If you help me, I will give you +1 Rep


if(strcmp(cmd, "/lights", true) == 0)
{
new v = GetPlayerVehicleID(playerid);
if(IsPlayerInAnyVehicle(playerid))
{
if(IsPlayerInAnyVehicle(playerid))
{
new seat = GetPlayerVehicleSeat(playerid);
if(seat != 0)
{
return 1;
}
}
if(LightsOn[v] == 0)
{
new engine, light, alarm, doors, bonnet, boot, objective;
GetVehicleParamsEx(v, engine, light, alarm, doors, bonnet, boot, objective);
SetVehicleParamsEx(v, engine, VEHICLE_PARAMS_ON, alarm, doors, bonnet, boot, objective);
LightsOn[v] = 1;
//SendClientMessage(playerid, GREY, "You have turned on the lights.");
format(string, sizeof(string), "* %s has turned on the lights.", PlayerName(playerid));
ProxDetector(30.0, playerid, string, PURPLE, PURPLE, PURPLE, PURPLE, PURPLE);
return 1;
}
else
{
new engine, light, alarm, doors, bonnet, boot, objective;
GetVehicleParamsEx(v, engine, light, alarm, doors, bonnet, boot, objective);
SetVehicleParamsEx(v, engine, VEHICLE_PARAMS_OFF, alarm, doors, bonnet, boot, objective);
LightsOn[v] = 0;
//SendClientMessage(playerid, GREY, "You have turned off the lights.");
format(string, sizeof(string), "* %s has turned off the lights.", PlayerName(playerid));
ProxDetector(30.0, playerid, string, PURPLE, PURPLE, PURPLE, PURPLE, PURPLE);
return 1;
}
}
return 1;
}
Reply


Messages In This Thread
Problem with /lights command - by benjaminjones - 19.04.2013, 12:50
Re: Problem with /lights command - by lean1337 - 19.04.2013, 13:02
Re: Problem with /lights command - by benjaminjones - 19.04.2013, 13:16
Re: Problem with /lights command - by benjaminjones - 19.04.2013, 14:49
Re: Problem with /lights command - by lean1337 - 19.04.2013, 14:51
Re: Problem with /lights command - by benjaminjones - 19.04.2013, 15:00
Re: Problem with /lights command - by ryanhawk31 - 19.04.2013, 15:18
Re: Problem with /lights command - by benjaminjones - 19.04.2013, 15:19
Re: Problem with /lights command - by DobbysGamertag - 19.04.2013, 15:39
Re: Problem with /lights command - by benjaminjones - 19.04.2013, 15:51

Forum Jump:


Users browsing this thread: 1 Guest(s)