[FilterScript] [FS] Spike Strips
#1

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].

Reply
#2

WOw thads awesome!

Plz reupload the vid cause i cant see it :P

But good scrpt!
Reply
#3

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
Reply
#4

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

Gonna add it to my server later
Reply
#5

nice script man
best spike strip script
10/10
Reply
#6

very nice Job 10/10 from me. :P
Reply
#7

Usefull Carlos
Reply
#8

nice work, simple, and useful
Reply
#9

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.
Reply
#10

Very well done! you are cruel!
Reply
#11

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"
Reply
#12

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).
Reply
#13

Nice FS also nice car
Reply
#14

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

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

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

GREAT !!!
Reply
#18

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?
Reply
#19

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?
Reply
#20

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)