SA-MP Forums Archive
[FilterScript] [FS] Spike Strips v3 (No OnPlayerUpdate or Fast Timers) - 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 v3 (No OnPlayerUpdate or Fast Timers) (/showthread.php?tid=146513)

Pages: 1 2


[FS] Spike Strips v3 (No OnPlayerUpdate or Fast Timers) - Tr1viUm - 07.05.2010

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


Re: [FS] Stingers / Spike Strips v1 (No OnPlayerUpdate or Fast Timers) - Hip-hop - 07.05.2010

Good Work !


Re: [FS] Stingers / Spike Strips v1 (No OnPlayerUpdate or Fast Timers) - Jay_ - 07.05.2010

Nicely done. Good method, nice and efficient.


Re: [FS] Stingers / Spike Strips v1 (No OnPlayerUpdate or Fast Timers) - Victor - 07.05.2010

Amazing, Good Job!


Re: [FS] Stingers / Spike Strips v1 (No OnPlayerUpdate or Fast Timers) - luigifan9 - 08.05.2010

Very good work my friend


Re: [FS] Stingers / Spike Strips v1 (No OnPlayerUpdate or Fast Timers) - ViruZZzZ_ChiLLL - 08.05.2010

Yeah, good job [MOB]Tr1viUm keep it up


Re: [FS] Stingers / Spike Strips v1 (No OnPlayerUpdate or Fast Timers) - musklymees - 08.05.2010

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


Re: [FS] Stingers / Spike Strips v1 (No OnPlayerUpdate or Fast Timers) - Skaty - 08.05.2010

Nice and very useful! Keep it up!


Re: [FS] Stingers / Spike Strips v1 (No OnPlayerUpdate or Fast Timers) - Rac3r - 08.05.2010

Nicely coded. Good release Trivum


Re: [FS] Stingers / Spike Strips v1 (No OnPlayerUpdate or Fast Timers) - [Hun]SnicKerS - 08.05.2010

Please send me in pm the weapon mod Thanks


Re: [FS] Stingers / Spike Strips v1 (No OnPlayerUpdate or Fast Timers) - Geso - 08.05.2010

Nice one..


Re: [FS] Stingers / Spike Strips v1 (No OnPlayerUpdate or Fast Timers) - CaHbKo - 08.05.2010

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

Much more better than times or updates.

Many thanks!


Re: [FS] Stingers / Spike Strips v1 (No OnPlayerUpdate or Fast Timers) - Jeffry - 08.05.2010

Good script! I like the idea.


Re: [FS] Stingers / Spike Strips v1 (No OnPlayerUpdate or Fast Timers) - Tr1viUm - 08.05.2010

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.


Re: [FS] Stingers / Spike Strips v1 (No OnPlayerUpdate or Fast Timers) - pepper - 08.05.2010

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


Re: [FS] Stingers / Spike Strips v1 (No OnPlayerUpdate or Fast Timers) - Tr1viUm - 08.05.2010

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.


Re: [FS] Stingers / Spike Strips v1 (No OnPlayerUpdate or Fast Timers) - Fenice - 08.05.2010

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.



Re: [FS] Stingers / Spike Strips v1 (No OnPlayerUpdate or Fast Timers) - Tr1viUm - 08.05.2010

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)


Re: [FS] Stingers / Spike Strips v1 (No OnPlayerUpdate or Fast Timers) - musklymees - 09.05.2010

Can u send me too ur weapon mode i lowe it


Re: [FS] Stingers / Spike Strips v1 (No OnPlayerUpdate or Fast Timers) - [LF]Mr.Lucci - 09.05.2010

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