SA-MP Forums Archive
[FilterScript] [FS] Spike Strips - 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: Filterscripts (https://sampforum.blast.hk/forumdisplay.php?fid=17)
+--- Thread: [FilterScript] [FS] Spike Strips (/showthread.php?tid=137658)

Pages: 1 2


[FS] Spike Strips - FreshKilla - 29.03.2010

Spike Strips

By: FreshKilla

This is a script for decent Spike Strips that include more functions then the other Spike Strip scripts out there, and more better quality in the script etc, I finished this script in about two hours its very simple but its good for people in Roleplay servers who want the police to have spike strips or w/e.

Callbacks:

Код:
CreateStrip(Float:x,Float:y,Float:z,Float:Angle)
That function will create a spike strip.

Код:
DeleteAllStrip()
This function will delete every SpikeStrip thats created/running on the server.

Код:
DeleteClosestStrip(playerid)
This function will delete the Spikestrip thats closest to that playerid.

Defines:

pawn Код:
#define MAX_SPIKESTRIPS 200
You can change the amount but if your using more then 200 i suggest you use a ObjectStreamer.

Download:
The download includes a Filterscript which includes some commands that might help you.

http://www.mediafire.com/?uaoyoyo0tm2

Video:
SA-MP Spike Strips by FreshKilla

Bugs:
v1.0 - You're tires would pop even if you flew over the spikes[Fixed].




Re: [FS] Spike Strips - gtagangsta22 - 29.03.2010

WOw thads awesome!

Plz reupload the vid cause i cant see it :P

But good scrpt!


Re: [FS] Spike Strips - MPKaboose - 29.03.2010

Quote:
Originally Posted by gtagangsta22
WOw thads awesome!

Plz reupload the vid cause i cant see it :P

But good scrpt!
This video is not yet processed. just wait a few minutes

anyway nice script


Re: [FS] Spike Strips - [03]Garsino - 29.03.2010

That looks tbh completly awesome =)
Best spike script so far IMO.

Gonna add it to my server later


Re: [FS] Spike Strips - XRVX - 29.03.2010

nice script man
best spike strip script
10/10


Re: [FS] Spike Strips - Mr L - 29.03.2010

very nice Job 10/10 from me. :P


Re: [FS] Spike Strips - Fre$hKidd - 29.03.2010

Usefull Carlos


Re: [FS] Spike Strips - Scream[SM] - 29.03.2010

nice work, simple, and useful


Re: [FS] Spike Strips - Joe Staff - 29.03.2010

My only problem with that is that it pops all four tires regardless of which tires actually touch it, but indeed it's the best I've seen as of yet.


Re: [FS] Spike Strips - rephex - 29.03.2010

Very well done! you are cruel!


Re: [FS] Spike Strips - jasonnw666 - 29.03.2010

hi i have these errors when i compil :/

(29) : error 017: undefined symbol "GetVehicleDamageStatus"
(31) : error 017: undefined symbol "UpdateVehicleDamageStatus"
(2 : warning 204: symbol is assigned a value that is never used: "carid"
(30) : warning 204: symbol is assigned a value that is never used: "tires"
(27) : warning 203: symbol is never used: "lights"
(27) : warning 203: symbol is never used: "doors"
(27) : warning 203: symbol is never used: "panels"


Re: [FS] Spike Strips - Correlli - 29.03.2010

Quote:
Originally Posted by jasonnw666
hi i have these errors when i compil :/

(29) : error 017: undefined symbol "GetVehicleDamageStatus"
(31) : error 017: undefined symbol "UpdateVehicleDamageStatus"
(2 : warning 204: symbol is assigned a value that is never used: "carid"
(30) : warning 204: symbol is assigned a value that is never used: "tires"
(27) : warning 203: symbol is never used: "lights"
(27) : warning 203: symbol is never used: "doors"
(27) : warning 203: symbol is never used: "panels"
Update your include files with the latest ones (R7 version).


Re: [FS] Spike Strips - XxJoexX - 29.03.2010

Nice FS also nice car


Re: [FS] Spike Strips - [03]Garsino - 29.03.2010

Am I the only one getting popped tires when I am jumping over them?


Re: [FS] Spike Strips - Mr187 - 29.03.2010

Lol, Now start making crap like this for our server :P lol i am joking, Nice one fresh.


Re: [FS] Spike Strips - Postalityjr - 30.03.2010

Is there a way to make only the S.W.A.T. Skin only able to do this?


Re: [FS] Spike Strips - [MK]Soprano - 30.03.2010

GREAT !!!


Re: [FS] Spike Strips - Anthonyx3' - 30.03.2010

hey i get a few errors:
Код:
C:\Documents and Settings\Anthony.ANTHONY-0987F55\Desktop\SA-MP\pawno\include\SpikeStrip.inc(23) : error 017: undefined symbol "IsPlayerInRangeOfPoint"
C:\Documents and Settings\Anthony.ANTHONY-0987F55\Desktop\SA-MP\pawno\include\SpikeStrip.inc(29) : error 017: undefined symbol "GetVehicleDamageStatus"
C:\Documents and Settings\Anthony.ANTHONY-0987F55\Desktop\SA-MP\pawno\include\SpikeStrip.inc(31) : error 017: undefined symbol "UpdateVehicleDamageStatus"
C:\Documents and Settings\Anthony.ANTHONY-0987F55\Desktop\SA-MP\pawno\include\SpikeStrip.inc(28) : warning 204: symbol is assigned a value that is never used: "carid"
C:\Documents and Settings\Anthony.ANTHONY-0987F55\Desktop\SA-MP\pawno\include\SpikeStrip.inc(30) : warning 204: symbol is assigned a value that is never used: "tires"
C:\Documents and Settings\Anthony.ANTHONY-0987F55\Desktop\SA-MP\pawno\include\SpikeStrip.inc(27) : warning 203: symbol is never used: "lights"
C:\Documents and Settings\Anthony.ANTHONY-0987F55\Desktop\SA-MP\pawno\include\SpikeStrip.inc(27) : warning 203: symbol is never used: "doors"
C:\Documents and Settings\Anthony.ANTHONY-0987F55\Desktop\SA-MP\pawno\include\SpikeStrip.inc(27) : warning 203: symbol is never used: "panels"
C:\Documents and Settings\Anthony.ANTHONY-0987F55\Desktop\SA-MP\pawno\include\SpikeStrip.inc(78) : error 017: undefined symbol "IsPlayerInRangeOfPoint"
C:\Documents and Settings\Anthony.ANTHONY-0987F55\Desktop\SA-MP\pawno\include\SpikeStrip.inc(74) : warning 203: symbol is never used: "playerid"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
Help PLease?


Re: [FS] Spike Strips - Jay_ - 30.03.2010

This is VERY inefficient. I wouldn't recommend using this. It can loop over 2000 times per second, per player. It has a 200 iteration loop inside OnPlayerUpdate, which can get called up 10x a second per player.


If your server had only 10 players connected, it could loop up 20,000 times a second. Considering how slow pawn is your server would be unplayable. Not to mention the calculations in place to check if a player is in range of the spikes.

I released a spike strip about a year ago. I'm going to be rewriting part of it and releasing it shortly. It will be much faster and efficient than this.

Some other problems I've just noticed:

Quote:
Originally Posted by OnPlayerUpdate
if(!IsPlayerConnected(playerid)) return 0;
Although I doubt this function is in anyway inefficient, it's a useless check. There obviously has to be a connected player for it to call OnPlayerUpdate.

Quote:
Originally Posted by OnPlayerUpdate loop
if(IsPlayerInRangeOfPoint(playerid, 3.0, SpikeInfo[i][sX], SpikeInfo[i][sY], SpikeInfo[i][sZ]))
{
if(SpikeInfo[i][sCreated] == 1)
Why are you calculating if the player is in range of the strip before even knowing if the strip exists or not?

Quote:
Originally Posted by OnPlayerUpdate: tyre popping
UpdateVehicleDamageStatus(carid, panels, doors, lights, tires);
return 0;
Why are you returning 0 here, which would result in the player being de synced if they're hovering over the spike strip?


Re: [FS] Spike Strips - [03]Garsino - 30.03.2010

Quote:
Originally Posted by Hellpkz
hey i get a few errors:
Код:
C:\Documents and Settings\Anthony.ANTHONY-0987F55\Desktop\SA-MP\pawno\include\SpikeStrip.inc(23) : error 017: undefined symbol "IsPlayerInRangeOfPoint"
C:\Documents and Settings\Anthony.ANTHONY-0987F55\Desktop\SA-MP\pawno\include\SpikeStrip.inc(29) : error 017: undefined symbol "GetVehicleDamageStatus"
C:\Documents and Settings\Anthony.ANTHONY-0987F55\Desktop\SA-MP\pawno\include\SpikeStrip.inc(31) : error 017: undefined symbol "UpdateVehicleDamageStatus"
C:\Documents and Settings\Anthony.ANTHONY-0987F55\Desktop\SA-MP\pawno\include\SpikeStrip.inc(28) : warning 204: symbol is assigned a value that is never used: "carid"
C:\Documents and Settings\Anthony.ANTHONY-0987F55\Desktop\SA-MP\pawno\include\SpikeStrip.inc(30) : warning 204: symbol is assigned a value that is never used: "tires"
C:\Documents and Settings\Anthony.ANTHONY-0987F55\Desktop\SA-MP\pawno\include\SpikeStrip.inc(27) : warning 203: symbol is never used: "lights"
C:\Documents and Settings\Anthony.ANTHONY-0987F55\Desktop\SA-MP\pawno\include\SpikeStrip.inc(27) : warning 203: symbol is never used: "doors"
C:\Documents and Settings\Anthony.ANTHONY-0987F55\Desktop\SA-MP\pawno\include\SpikeStrip.inc(27) : warning 203: symbol is never used: "panels"
C:\Documents and Settings\Anthony.ANTHONY-0987F55\Desktop\SA-MP\pawno\include\SpikeStrip.inc(78) : error 017: undefined symbol "IsPlayerInRangeOfPoint"
C:\Documents and Settings\Anthony.ANTHONY-0987F55\Desktop\SA-MP\pawno\include\SpikeStrip.inc(74) : warning 203: symbol is never used: "playerid"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
Help PLease?
You need the 0.3 R7 includes.
You can find them here: http://forum.sa-mp.com/index.php?topic=161491.0