[FilterScript] [FS] Spike Strips v3 (No OnPlayerUpdate or Fast Timers)
#1

UPDATE 2013:

Edit 1:
Three years have passed and I'm working on an update (or rewrite). It will be the most advanced spike strip script ever released. A few coming features:

1. Popping individual tires instead of popping all tires at once.
2. Customizable by non-coders using a config file; you can specify the following:
2.1. Commands to spawn a spike strip
2.2. Hotkeys to spawn a spike strip
2.3. Teams that are able to spawn spike strips
2.4. Anti-team option
2.5. Respawn time
2.6. Charges (i.e. dissapears after it has been used)
3. Customizable by code too
4. Better placement on the floor

If you have any suggestions, feel free to post them.


Description
This script makes it possible to have spike strips in your script without having to worry about computer resources.

Notes
Sure you can make it better by respawning it after it's used but I wanted to keep it simple. Feel free to improve it.

Pros & Cons
Pros:
- Does not use OnPlayerUpdate or very fast timers.
- Easy to use
- Easy to edit for personal use. If you don't want to use the timer for spike strip destroyal. Set timer to 0 in CreateLargeStinger and CreateSmallStinger.
- Doesn't miss high speed vehicles.

Cons:
- Spike Strips can only be used once on the same player, unless the player dies or respawns.
- Creating stingers while in a vehicle requires to find the proper offset. Otherwise you will get a floating stinger. Works fine on foot though.

Functions
stock CreateLargeStinger(Float:X, Float:Y, Float:Z, Float:A, virtualworld, timer)
returns stingerid, -1 if the server could not create a stinger

stock CreateSmallStinger(Float:X, Float:Y, Float:Z, Float:A, virtualworld, timer)
returns stingerid, -1 if the server could not create a stinger

public DestroyStinger(stingerid)

Commands
/stinger
/destroystinger

Version 3 Download
- /destroystinger command due to popular demand.
- Pickups now respawns after it was picked up so the stinger can be used on the same player more than once.
http://pastebin.com/xRmH9cqH


Version 2 Download
- Fixes pickupid 0 removal.
http://pastebin.com/jnA8sG92
http://solidfiles.com/d/SQNU
http://solidfiles.com/d/lPrZ

Version 1 Download
http://pastebin.com/BzuKu7pi
http://www.easy-share.com/1910169001/stinger.pwn
http://www.easy-share.com/1910168996/stinger.amx

SA:MP Stinger
Reply
#2

Good Work !
Reply
#3

Nicely done. Good method, nice and efficient.
Reply
#4

Amazing, Good Job!
Reply
#5

Very good work my friend
Reply
#6

Yeah, good job [MOB]Tr1viUm keep it up
Reply
#7

I compiled it and done everything no errors.
When im using in server command /Stinger says unknown command
Reply
#8

Nice and very useful! Keep it up!
Reply
#9

Nicely coded. Good release Trivum
Reply
#10

Please send me in pm the weapon mod Thanks
Reply
#11

Nice one..
Reply
#12

Damn, never thought about using pickups for this...

Much more better than times or updates.

Many thanks!
Reply
#13

Good script! I like the idea.
Reply
#14

Thanks for the comments.

Quote:
Originally Posted by musklymees
I compiled it and done everything no errors.
When im using in server command /Stinger says unknown command
Are you have loaded the filterscript into your server? It works fine at me.

Quote:
Originally Posted by [Hun
SnicKerS ]
Please send me in pm the weapon mod Thanks
PM sent.
Reply
#15

Quote:
Originally Posted by musklymees
I compiled it and done everything no errors.
When im using in server command /Stinger says unknown command
i get the same thing
Reply
#16

Quote:
Originally Posted by pepper
Quote:
Originally Posted by musklymees
I compiled it and done everything no errors.
When im using in server command /Stinger says unknown command
i get the same thing
Looks like another script is making it impossible for my filterscript to call OnPlayerCommandText. Try to use it LVDM as gm with no filterscripts loaded.

Edit: I have also added a working .amx file for players having trouble with compiling.
Reply
#17

Code:
C:\Users\Giulio\Desktop\stinger.pwn(60) : error 017: undefined symbol "GetVehicleDamageStatus"
C:\Users\Giulio\Desktop\stinger.pwn(61) : error 017: undefined symbol "UpdateVehicleDamageStatus"
C:\Users\Giulio\Desktop\stinger.pwn(59) : warning 203: symbol is never used: "tires"
C:\Users\Giulio\Desktop\stinger.pwn(59) : warning 203: symbol is never used: "lights"
C:\Users\Giulio\Desktop\stinger.pwn(59) : warning 203: symbol is never used: "doors"
C:\Users\Giulio\Desktop\stinger.pwn(59) : warning 203: symbol is never used: "panels"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.
Reply
#18

Quote:
Originally Posted by Fenice
Code:
C:\Users\Giulio\Desktop\stinger.pwn(60) : error 017: undefined symbol "GetVehicleDamageStatus"
C:\Users\Giulio\Desktop\stinger.pwn(61) : error 017: undefined symbol "UpdateVehicleDamageStatus"
C:\Users\Giulio\Desktop\stinger.pwn(59) : warning 203: symbol is never used: "tires"
C:\Users\Giulio\Desktop\stinger.pwn(59) : warning 203: symbol is never used: "lights"
C:\Users\Giulio\Desktop\stinger.pwn(59) : warning 203: symbol is never used: "doors"
C:\Users\Giulio\Desktop\stinger.pwn(59) : warning 203: symbol is never used: "panels"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.
Get the new SA:MP server package. (R7)
Reply
#19

Can u send me too ur weapon mode i lowe it
Reply
#20

Quote:
Originally Posted by musklymees
Can u send me too ur weapon mode i lowe it
Seriously, you looked like CJ-ohnRAMBO lol I would love that script as well
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)