/elmon - not working
#1

Can anyone tell me why this is not working?

Код:
command(elmon, playerid, params[])
{
	if(Player[playerid][Faction] == 1 || Player[playerid][Faction] == 2)
	{
	    new vehicleid = GetPlayerVehicleID(playerid), string[256];
    	if(Flasher[vehicleid] == 0)
	    {
	        if(VehicleFaction[vehicleid] == 1 || VehicleFaction[vehicleid] == 2)
			{
				Flasher[vehicleid] = 1;
				new engine, lights, alarm, doors, bonnet, boot, objective;
				SendClientMessage(playerid, WHITE, "You have turned on the emergency lights in this vehicle.");
				GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);
				SetVehicleParamsEx(vehicleid, engine, 1, alarm, doors, bonnet, boot, objective);
				format(string, sizeof(string), "* %s turns on the Emergency Lights of the %s. *", MaskOnOff(playerid), GetVehicleName(GetPlayerVehicleID(playerid)));
				CloseMessage(playerid, ACTION, string);
				if(Lights[vehicleid] == 0)
				{
					Lights[vehicleid] = 1;
				}
				else
				{
				    Lights[vehicleid] = 1;
				}
			}
			else return SendClientMessage(playerid, WHITE, "This vehicle doesn't have an emergency light.");
		}
        else return SendClientMessage(playerid, WHITE, "The vehicle's emergency lights are already on.");
	}
	else return SendClientMessage(playerid, WHITE, "You aren't in the correct Faction.");
    return 1;
}
Reply
#2

What is not working?

BTW use [code ] and [/ code] around your code to make it look better
Reply
#3

Emergency lights is not working. The lights it not swiching. Can anyone help me?
Reply
#4

First of all, I dont think lights will wark at day time. At least they will work at night or with weather ID 10.

Also, this part of script is useless:
Код:
				if(Lights[vehicleid] == 0)
				{
					Lights[vehicleid] = 1;
				}
				else
				{
				    Lights[vehicleid] = 1;
				}
			}
Reply
#5

It is working fine, but the lights is not switching. That's everything I need.
Reply
#6

Quote:
Originally Posted by Benjamin_Cylerson
Посмотреть сообщение
It is working fine, but the lights is not switching. That's everything I need.
If lights are not showing, why do you say it's working fine?
Reply
#7

Don't know, I just need the lights to be fixed.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)