SA-MP Forums Archive
lights dont work - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: lights dont work (/showthread.php?tid=206485)



lights dont work - dud - 04.01.2011

i change server to 0.3c and all lights on car dosnt work
i try all FS and nothing work...
i try vehicle control dont work light and alarm
try neon dont work
try real_light dont work....
someone know what is wrong?


Re: lights dont work - Krx17 - 04.01.2011

Make sure your client is 0.3c also.


Re: lights dont work - ToPhrESH - 04.01.2011

Download the 0.3c like Krx17 says. Sometimes if errors like this occur you need to re-install Sa-Mp and they are usually fixed.


Re: lights dont work - Anthonyx3' - 04.01.2011

Maybe show the code your using? you sure you dont have multiple fs running, that do same thing?


Re: lights dont work - dud - 04.01.2011

of corse i use 0.3c server is hosted and its 0.3c linux



this is code...


Код:
case 0:
			{
				if( LightPwr[vehicleid] == 1)
				{
					//vehicleid = GetPlayerVehicleID(playerid);
					GetVehicleDamageStatus(vehicleid,panels,doors,lights,tires);
					UpdateVehicleDamageStatus(vehicleid, panels, doors, 5, tires);
					SendClientMessage(playerid,WHITE,"Svetla {E31919}Iskluceni!");
					LightPwr[vehicleid] = 0;
				}
				else if( LightPwr[vehicleid] == 0)
				{
					//vehicleid = GetPlayerVehicleID(playerid);
					GetVehicleDamageStatus(vehicleid,panels,doors,lights,tires);
					UpdateVehicleDamageStatus(vehicleid, panels, doors, 0, tires);
					SendClientMessage(playerid,WHITE,"Svetna {2F991A}Vkluceno!");
					SendClientMessage(playerid,ORANGE,"Dokolku e den, svetla nema da bidat vkluceni!");
					LightPwr[vehicleid] = 1;
				}
			}
its filterscript download from here


Re: lights dont work - Sascha - 04.01.2011

use this to turn the lights on
pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
    if(newstate == PLAYER_STATE_DRIVER && oldstate == PLAYER_STATE_ONFOOT){
        new vehicleid = GetPlayerVehicleID(playerid);
        new engine,lights,alarm,doors,bonnet,boot,objective;
        GetVehicleParamsEx(vehicleid,engine,lights,alarm,doors,bonnet,boot,objective);
        SetVehicleParamsEx(vehicleid,engine,1,alarm,doors,bonnet,boot,objective);
    }
    return 1;
}