[FilterScript] [FS] Simple Vehicle Light's System
#1

[FS] Simple Vehicle Lights
_________________________________________________
This filterscript will allow you to toggle your vehicle lights on/off, it will save the status of the vehicle lights so if they are turned off, and you re-enter the vehicle, the lights will still be switched off.
After thinking i was the first to actually release this kind of filterscript i was quickly uploading, but sadly enough i was beaten, but i decided to release it anyway.

How to use:
You can toggle your vehicle lights on/off by pressing the ACTION (CTRL) key.
If you exit your vehicle with your lights OFF when you re-enter the vehicle the lights will be OFF (presuming no one has entered the vehicle and turned the lights on).

Thanks to JernejL (RedShirt) for the damage encoding code snippet.

Bugs:
~ You cannot use your lights in day time. (default in san andreas).

(REPLACE LINE 63 WITH)
pawn Code:
if (IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
Download
(includes .amx & .pwn)

PASTEBIN
http://pastebin.com/dFCs7Y5n

Feel free to edit it to how you need it, but please don't re-release as your own.

Don't post comments saying this has already been released, please read my post first.

EDIT:
Fixed the vehicle repair problem
Reply
#2

great job


Although i get these errors

Code:
C:\DOCUME~1\HP_ADM~1\Desktop\GTARP\FILTER~1\lights.pwn(46) : error 017: undefined symbol "GetVehicleDamageStatus"
C:\DOCUME~1\HP_ADM~1\Desktop\GTARP\FILTER~1\lights.pwn(47) : error 017: undefined symbol "UpdateVehicleDamageStatus"
C:\DOCUME~1\HP_ADM~1\Desktop\GTARP\FILTER~1\lights.pwn(52) : error 017: undefined symbol "GetVehicleDamageStatus"
C:\DOCUME~1\HP_ADM~1\Desktop\GTARP\FILTER~1\lights.pwn(53) : error 017: undefined symbol "UpdateVehicleDamageStatus"
C:\DOCUME~1\HP_ADM~1\Desktop\GTARP\FILTER~1\lights.pwn(67) : error 017: undefined symbol "GetVehicleDamageStatus"
C:\DOCUME~1\HP_ADM~1\Desktop\GTARP\FILTER~1\lights.pwn(68) : error 017: undefined symbol "UpdateVehicleDamageStatus"
C:\DOCUME~1\HP_ADM~1\Desktop\GTARP\FILTER~1\lights.pwn(73) : error 017: undefined symbol "GetVehicleDamageStatus"
C:\DOCUME~1\HP_ADM~1\Desktop\GTARP\FILTER~1\lights.pwn(74) : error 017: undefined symbol "UpdateVehicleDamageStatus"
C:\DOCUME~1\HP_ADM~1\Desktop\GTARP\FILTER~1\lights.pwn(87) : warning 203: symbol is never used: "doors"
C:\DOCUME~1\HP_ADM~1\Desktop\GTARP\FILTER~1\lights.pwn(87) : warning 203: symbol is never used: "lights"
C:\DOCUME~1\HP_ADM~1\Desktop\GTARP\FILTER~1\lights.pwn(87) : warning 203: symbol is never used: "panels"
C:\DOCUME~1\HP_ADM~1\Desktop\GTARP\FILTER~1\lights.pwn(87) : warning 203: symbol is never used: "tires"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


8 Errors.
Reply
#3

Quote:
Originally Posted by IDownload
great job


Although i get these errors

Code:
C:\DOCUME~1\HP_ADM~1\Desktop\GTARP\FILTER~1\lights.pwn(46) : error 017: undefined symbol "GetVehicleDamageStatus"
C:\DOCUME~1\HP_ADM~1\Desktop\GTARP\FILTER~1\lights.pwn(47) : error 017: undefined symbol "UpdateVehicleDamageStatus"
C:\DOCUME~1\HP_ADM~1\Desktop\GTARP\FILTER~1\lights.pwn(52) : error 017: undefined symbol "GetVehicleDamageStatus"
C:\DOCUME~1\HP_ADM~1\Desktop\GTARP\FILTER~1\lights.pwn(53) : error 017: undefined symbol "UpdateVehicleDamageStatus"
C:\DOCUME~1\HP_ADM~1\Desktop\GTARP\FILTER~1\lights.pwn(67) : error 017: undefined symbol "GetVehicleDamageStatus"
C:\DOCUME~1\HP_ADM~1\Desktop\GTARP\FILTER~1\lights.pwn(68) : error 017: undefined symbol "UpdateVehicleDamageStatus"
C:\DOCUME~1\HP_ADM~1\Desktop\GTARP\FILTER~1\lights.pwn(73) : error 017: undefined symbol "GetVehicleDamageStatus"
C:\DOCUME~1\HP_ADM~1\Desktop\GTARP\FILTER~1\lights.pwn(74) : error 017: undefined symbol "UpdateVehicleDamageStatus"
C:\DOCUME~1\HP_ADM~1\Desktop\GTARP\FILTER~1\lights.pwn(87) : warning 203: symbol is never used: "doors"
C:\DOCUME~1\HP_ADM~1\Desktop\GTARP\FILTER~1\lights.pwn(87) : warning 203: symbol is never used: "lights"
C:\DOCUME~1\HP_ADM~1\Desktop\GTARP\FILTER~1\lights.pwn(87) : warning 203: symbol is never used: "panels"
C:\DOCUME~1\HP_ADM~1\Desktop\GTARP\FILTER~1\lights.pwn(87) : warning 203: symbol is never used: "tires"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


8 Errors.
This works with the new release only.

I was hoping for something that could actually force my car lights on during day, would be cool in my trucking server. But damaging car lights is a clever idea
Reply
#4

0.3 R5 http://forum.sa-mp.com/index.php?topic=161491.0
Reply
#5

Quote:
Originally Posted by jame20702
yeh yeh guys thanks for the update
Reply
#6

To fix a problem with anyone being able to turn your lights on/off replace line 63 with

pawn Code:
if (IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
Reply
#7

Work this only too in the nighttime?
Reply
#8

Yea, this only works in night time, thats something todo with San Andreas, im not actually sure if you can turn on the lights in daytime.
Reply
#9

no, daytime doesnt work.
Do u know what time it will work?
Reply
#10

Great job! I think it works from 20:00 to 6:00.
Reply
#11

wow nice release man
Reply
#12

This is one of the greatest things that's made, I don't know why but for me this is REAAAL RP stuff...
Reply
#13

I think its 9 o clock.. now its 8 and it doesnt work now
Reply
#14

EPIC DUDE
Reply
#15

Cool man
Reply
#16

Thanks guys, and i only know this will work when your headlights come on automatically (defaul san andreas) which is around 9-6.
Reply
#17

It must be 9 o clock to make the lights!
Reply
#18

Pastebin link added!

http://pastebin.com/dFCs7Y5n
Reply
#19

yay, using it
Reply
#20

Thank For those have error i fix error and download here > https://pastebin.com/UK3cWfBd
Reply


Forum Jump:


Users browsing this thread: 6 Guest(s)