SA-MP Forums

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

Reply
 
Thread Tools Display Modes
Old 24/04/2015, 06:27 PM   #11
xF4Life
Huge Clucker
 
Join Date: May 2013
Posts: 222
Reputation: 42
Default Re: [0.3.7] Flashing Police Lights (ELM)

Nice, i like it
xF4Life is offline   Reply With Quote
Old 24/04/2015, 06:59 PM   #12
Abagail
High-roller
 
Join Date: Dec 2013
Location: GetPlayerPos(playerid, pos); Scripter/Mapper.
Posts: 3,411
Reputation: 439
Default Re: [0.3.7] Flashing Police Lights (ELM)

So you are turning off the lights for every vehicle loaded on the server just because your FS exits? This can cause problems, such as a player without a siren vehicle loosing headlights, etc.

I have made a github pull request that addresses the issue if you want to take a look at it.
Abagail is offline   Reply With Quote
Old 24/04/2015, 07:10 PM   #13
TakeiT
Gangsta
 
Join Date: May 2014
Location: Toronto, Canada
Posts: 797
Reputation: 157
Default Re: [0.3.7] Flashing Police Lights (ELM)

Quote:
Originally Posted by Abagail View Post
So you are turning off the lights for every vehicle loaded on the server just because your FS exits? This can cause problems, such as a player without a siren vehicle loosing headlights, etc.

I have made a github pull request that addresses the issue if you want to take a look at it.
Hmm? It uses UpdateVehicleDamageStatus and a timer. It only does one vehicle at a time. I showed that when I recorded the video but I don't have the official version of fraps at the moment and it got cut off.
TakeiT is offline   Reply With Quote
Old 24/04/2015, 07:20 PM   #14
Abagail
High-roller
 
Join Date: Dec 2013
Location: GetPlayerPos(playerid, pos); Scripter/Mapper.
Posts: 3,411
Reputation: 439
Default Re: [0.3.7] Flashing Police Lights (ELM)

Quote:
Originally Posted by TakeiT View Post
Hmm? It uses UpdateVehicleDamageStatus and a timer. It only does one vehicle at a time. I showed that when I recorded the video but I don't have the official version of fraps at the moment and it got cut off.
I am talking about when the filterscript is unloaded you turn off EVERY vehicle's lights AND THE WORST PART DESTROY TIMERS FOR EVERY SINGLE VEHICLE! Not every single vehicle has a timer, nor a siren!

Check the pull request I made and see the changes and you'll realize your mistake.
Abagail is offline   Reply With Quote
Old 26/04/2015, 07:23 PM   #15
d0nTtoucH
Huge Clucker
 
d0nTtoucH's Avatar
 
Join Date: Feb 2013
Posts: 365
Reputation: -17
Default Re: [0.3.7] Flashing Police Lights (ELM)

still not working
__________________
GameModes
Filterscripts
d0nTtoucH is offline   Reply With Quote
Old 27/04/2015, 08:19 PM   #16
Alex Magaņa
High-roller
 
Alex Magaņa's Avatar
 
Join Date: Oct 2012
Location: 𝕭𝖗𝖔𝖙𝖍𝖊𝖗𝖍𝖔𝖔𝖉
Posts: 2,457
Reputation: 216
Default Re: [0.3.7] Flashing Police Lights (ELM)

I would like to know why on 0.3.7RC-6 was removed. i got the same error like this:

Quote:
Originally Posted by d0nTtoucH View Post
how do i fix this /
C:\Users\\Desktop\lights.pwn(45) : warning 235: public function lacks forward declaration (symbol "OnVehicleSirenStateChange")
C:\Users\\Desktop\lights.pwn(6 : error 017: undefined symbol "GetVehiclePoolSize"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


1 Error.

line 45:
Code:
public OnVehicleSirenStateChange(playerid, vehicleid, newstate)
{
	if(newstate)
	{
	    FlashTime[vehicleid] = SetTimerEx("OnLightFlash", flashtime, true, "d", vehicleid);
	}

	if(!newstate)
	{
		new panels, doors, lights, tires;

		KillTimer(FlashTime[vehicleid]);

		GetVehicleDamageStatus(vehicleid, panels, doors, lights, tires);
	    UpdateVehicleDamageStatus(vehicleid, panels, doors, 0, tires);
	}
	return 1;
}
line 68:
Code:
	for(new i=0; i<GetVehiclePoolSize(); i++)
	{
	    KillTimer(FlashTime[i]);

	    GetVehicleDamageStatus(i, panels, doors, lights, tires);
	    UpdateVehicleDamageStatus(i, panels, doors, 0, tires);
	}
	return 1;
}

#endif
Alex Magaņa is online now   Reply With Quote
Old 29/04/2015, 01:45 AM   #17
TakeiT
Gangsta
 
Join Date: May 2014
Location: Toronto, Canada
Posts: 797
Reputation: 157
Default Re: [0.3.7] Flashing Police Lights (ELM)

Quote:
Originally Posted by Alex Magaņa View Post
I would like to know why on 0.3.7RC-6 was removed. i got the same error like this:
Are you sure you have the a_samp.inc from RC4/5/6?
TakeiT is offline   Reply With Quote
Old 25/05/2016, 07:47 AM   #18
ShadowTeam
Little Clucker
 
ShadowTeam's Avatar
 
Join Date: May 2016
Location: Indonesian
Posts: 15
Reputation: 0
Default Re: [0.3.7] Flashing Police Lights (ELM)

Why if we using ELM, we can die.., please tell me how to fix it
ShadowTeam is offline   Reply With Quote
Old 13/06/2016, 03:06 AM   #19
VinHanako
Big Clucker
 
VinHanako's Avatar
 
Join Date: Jun 2016
Location: PH
Posts: 90
Reputation: 0
Default Re: [0.3.7] Flashing Police Lights (ELM)

Didnt work please help
__________________
VinHanako is offline   Reply With Quote
Old 14/06/2016, 02:33 AM   #20
L3uX
Little Clucker
 
Join Date: Jan 2015
Posts: 2
Reputation: 0
Default Re: [0.3.7] Flashing Police Lights (ELM)

There is a massive performance problem with this.

You've to kill the timer if the car is destroyed.
The siren status is only updating if you're in the car.

So if the car gets destroyed without passenger.. the timer will still run till someone re-enter the car.
L3uX 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] Code 2 - flashing police lights KoczkaHUN Filterscripts 28 26/01/2014 09:27 AM
Colored Flashing lights zT KiNgKoNg Scripting Help 2 20/02/2013 11:12 AM
Flashing car lights martynas Help Archive 11 27/09/2010 12:22 PM


All times are GMT. The time now is 05:37 PM.


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