[FilterScript] SA-MP Light Control
#1

[FS] SA-MP Light Control

This script was made after reading about someone wanting to make flashing lights. Not thinking it was actually going to work well, i produced this. I have seen people with SAES Light Mod and thought it was cool! But, the mod rule gets people in trouble. So i made a SA-MP Alternative for servers to use. Its simple to use, and with a little modification, it can be even easier.

Script Commands
/lightson - Turns the headlamps on.
/lightsoff - Turns the headlamps off.
/lightsflash - Makes the headlamps alternate @ 1/10th of a second intervals. (10 flashes per second)
/lightsflashoff - Turns the Flashing Off, returning to the pre-existing light state (If they were off, they turn back off.)

Things needed
The only thing you need to do is read the commented section at the top and follow those steps.

Suggestions
Maybe setup the keys to do on/off/toggle between the light types. Ill leave that up to the server owners, as some keys may be in use already.

Mirrors
No mirrors, please.

Download
Script - http://pastebin.com/K1X13s4Q
Enjoy!
Reply
#2

this only works at night though right?
Reply
#3

Yes, as the functions only destroy the lights.
Reply
#4

Nice work man.
Reply
#5

great script none the less
Reply
#6

Niice !!
Reply
#7

Great release. Well done.
Reply
#8

This is pretty nice, good job!
Reply
#9

I really don't know why MTA can support lights on day and SA-MP can't...
Reply
#10

Quote:
Originally Posted by Stefan_Toretto
Посмотреть сообщение
I really don't know why MTA can support lights on day and SA-MP can't...
MTA has part of the GTA source code so maybe that was in it.
Reply
#11

Ah, I made this a while back and it works off buttons.
https://sampforum.blast.hk/showthread.php?tid=136277
Reply
#12

Quote:
Originally Posted by cyber_punk
View Post
Ah, I made this a while back and it works off buttons.
https://sampforum.blast.hk/showthread.php?tid=136277
Yea and yours is a whole lot nicer.
Reply
#13

Quote:
Originally Posted by BP13
View Post
MTA has part of the GTA source code so maybe that was in it.
all they have is open source community, they is not connected to rockstar in any way.
Reply
#14

Quote:
Originally Posted by cyber_punk
View Post
Ah, I made this a while back and it works off buttons.
https://sampforum.blast.hk/showthread.php?tid=136277
Thanks for postjacking.

Quote:
Originally Posted by Steven82
Quote:
Originally Posted by cyber_punk
View Post
Ah, I made this a while back and it works off buttons.
https://sampforum.blast.hk/showthread.php?tid=136277
Yea and yours is a whole lot nicer.
Nobody is twisting wrists. This is a simple way to educate scripters on how to make this. As opposed to complicated methods.
Reply
#15

Nice release, might be going to use this
Reply
#16

great Script Man!
Reply
#17

Awesome, nice job
Reply
#18

Did anyone see at 0.42 the moon appeared! lol
Reply
#19

EDIT: Dumb question.
Reply
#20

C:\DOCUME~1\Steptu\LOCALS~1\Temp\lights.pwn(1 : error 017: undefined symbol "MAX_VEHICLES"
C:\DOCUME~1\Steptu\LOCALS~1\Temp\lights.pwn(1 : error 009: invalid array size (negative, zero or out of bounds)
C:\DOCUME~1\Steptu\LOCALS~1\Temp\lights.pwn(19) : error 017: undefined symbol "MAX_VEHICLES"
C:\DOCUME~1\Steptu\LOCALS~1\Temp\lights.pwn(19) : error 009: invalid array size (negative, zero or out of bounds)
C:\DOCUME~1\Steptu\LOCALS~1\Temp\lights.pwn(20) : error 017: undefined symbol "MAX_VEHICLES"
C:\DOCUME~1\Steptu\LOCALS~1\Temp\lights.pwn(20) : error 009: invalid array size (negative, zero or out of bounds)
C:\DOCUME~1\Steptu\LOCALS~1\Temp\lights.pwn(23) : warning 235: public function lacks forward declaration (symbol "OnFilterScriptInit")
C:\DOCUME~1\Steptu\LOCALS~1\Temp\lights.pwn(25) : error 017: undefined symbol "print"
C:\DOCUME~1\Steptu\LOCALS~1\Temp\lights.pwn(26) : error 017: undefined symbol "print"
C:\DOCUME~1\Steptu\LOCALS~1\Temp\lights.pwn(27) : error 017: undefined symbol "print"
C:\DOCUME~1\Steptu\LOCALS~1\Temp\lights.pwn(2 : error 017: undefined symbol "MAX_VEHICLES"
C:\DOCUME~1\Steptu\LOCALS~1\Temp\lights.pwn(31) : warning 217: loose indentation
C:\DOCUME~1\Steptu\LOCALS~1\Temp\lights.pwn(34) : error 017: undefined symbol "SetTimer"
C:\DOCUME~1\Steptu\LOCALS~1\Temp\lights.pwn(3 : warning 235: public function lacks forward declaration (symbol "OnFilterScriptExit")
C:\DOCUME~1\Steptu\LOCALS~1\Temp\lights.pwn(40) : error 017: undefined symbol "print"
C:\DOCUME~1\Steptu\LOCALS~1\Temp\lights.pwn(41) : error 017: undefined symbol "print"
C:\DOCUME~1\Steptu\LOCALS~1\Temp\lights.pwn(42) : error 017: undefined symbol "print"
C:\DOCUME~1\Steptu\LOCALS~1\Temp\lights.pwn(43) : error 017: undefined symbol "KillTimer"
C:\DOCUME~1\Steptu\LOCALS~1\Temp\lights.pwn(47) : warning 235: public function lacks forward declaration (symbol "OnPlayerCommandText")
C:\DOCUME~1\Steptu\LOCALS~1\Temp\lights.pwn(52) : error 017: undefined symbol "strcmp"
C:\DOCUME~1\Steptu\LOCALS~1\Temp\lights.pwn(54) : error 017: undefined symbol "GetPlayerVehicleID"
C:\DOCUME~1\Steptu\LOCALS~1\Temp\lights.pwn(55) : error 017: undefined symbol "GetVehicleDamageStatus"
C:\DOCUME~1\Steptu\LOCALS~1\Temp\lights.pwn(56) : error 017: undefined symbol "UpdateVehicleDamageStatus"
C:\DOCUME~1\Steptu\LOCALS~1\Temp\lights.pwn(61) : error 017: undefined symbol "strcmp"
C:\DOCUME~1\Steptu\LOCALS~1\Temp\lights.pwn(63) : error 017: undefined symbol "GetPlayerVehicleID"
C:\DOCUME~1\Steptu\LOCALS~1\Temp\lights.pwn(64) : error 017: undefined symbol "GetVehicleDamageStatus"
C:\DOCUME~1\Steptu\LOCALS~1\Temp\lights.pwn(65) : error 017: undefined symbol "UpdateVehicleDamageStatus"
C:\DOCUME~1\Steptu\LOCALS~1\Temp\lights.pwn(70) : error 017: undefined symbol "strcmp"
C:\DOCUME~1\Steptu\LOCALS~1\Temp\lights.pwn(72) : error 017: undefined symbol "GetPlayerVehicleID"
C:\DOCUME~1\Steptu\LOCALS~1\Temp\lights.pwn(73) : error 017: undefined symbol "GetVehicleDamageStatus"

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


26 Errors.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)