SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Filterscripts

Reply
 
Thread Tools Display Modes
Old 25/03/2010, 12:23 AM   #1
Anwix
Big Clucker
 
Anwix's Avatar
 
Join Date: Jun 2007
Posts: 146
Reputation: 0
Default [FS] Simple Vehicle Light's System


[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)
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
Anwix is offline   Reply With Quote
Old 25/03/2010, 01:08 AM   #2
IDownload
Big Clucker
 
Join Date: Mar 2010
Posts: 69
Reputation: 0
Default Re: [FS] Simple Vehicle Light's System

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 (c) 1997-2006, ITB CompuPhase


8 Errors.
IDownload is offline   Reply With Quote
Old 25/03/2010, 01:40 AM   #3
mick88
Big Clucker
 
mick88's Avatar
 
Join Date: Jan 2010
Location: Ireland
Posts: 170
Reputation: 32
Default Re: [FS] Simple Vehicle Light's System

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 (c) 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
mick88 is offline   Reply With Quote
Old 25/03/2010, 02:23 AM   #4
jame20702
Big Clucker
 
Join Date: Nov 2009
Posts: 60
Reputation: 0
Default Re: [FS] Simple Vehicle Light's System

0.3 R5 http://forum.sa-mp.com/index.php?topic=161491.0
jame20702 is offline   Reply With Quote
Old 25/03/2010, 02:25 AM   #5
IDownload
Big Clucker
 
Join Date: Mar 2010
Posts: 69
Reputation: 0
Default Re: [FS] Simple Vehicle Light's System

Quote:
Originally Posted by jame20702
yeh yeh guys thanks for the update
IDownload is offline   Reply With Quote
Old 25/03/2010, 02:27 PM   #6
Anwix
Big Clucker
 
Anwix's Avatar
 
Join Date: Jun 2007
Posts: 146
Reputation: 0
Default Re: [FS] Simple Vehicle Light's System

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

Code:
if (IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
Anwix is offline   Reply With Quote
Old 25/03/2010, 03:49 PM   #7
DauerDicht
Gangsta
 
Join Date: May 2008
Posts: 533
Reputation: 0
Default Re: [FS] Simple Vehicle Light's System

Work this only too in the nighttime?
DauerDicht is offline   Reply With Quote
Old 25/03/2010, 03:59 PM   #8
Anwix
Big Clucker
 
Anwix's Avatar
 
Join Date: Jun 2007
Posts: 146
Reputation: 0
Default Re: [FS] Simple Vehicle Light's System

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.
Anwix is offline   Reply With Quote
Old 25/03/2010, 04:01 PM   #9
DauerDicht
Gangsta
 
Join Date: May 2008
Posts: 533
Reputation: 0
Default Re: [FS] Simple Vehicle Light's System

no, daytime doesnt work.
Do u know what time it will work?
DauerDicht is offline   Reply With Quote
Old 25/03/2010, 04:02 PM   #10
Zimon95
Big Clucker
 
Zimon95's Avatar
 
Join Date: Sep 2009
Location: Ravenna, Italy
Posts: 186
Reputation: 10
Default Re: [FS] Simple Vehicle Light's System

Great job! I think it works from 20:00 to 6:00.
Zimon95 is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[FilterScript] [FS] Simple vehicle health system. Backwardsman97 Filterscripts 16 05/10/2012 01:13 PM
[FilterScript] [FS] Backwards's Vehicle System - Speedometer and Vehicle Health- Backwardsman97 Filterscripts 7 06/08/2009 09:52 AM


All times are GMT. The time now is 07:48 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.