02.07.2013, 23:40
(
Последний раз редактировалось MP2; 03.07.2013 в 00:14.
)
Why would you want to unload it?
Anyway, I've tested it and it doesn't work. I added a print to print the value of 'distance' and it never goes below 0.24 - not even close. (Print was JUST before 'if (distance < 0.24)').
I've transferred the entire thing in to an inc, but I guarantee you I haven't 'broken' anything.
It doesn't seem to go below 0.6.
EDIT: Fixed by changing to this: if (distance < 1)
EDIT #2: Okay, I made some changes, hope you don't mind: http://pastebin.com/mqKa4Gj0
- Added callback OnSpikeStripPop(vehicleid, spikeid)
- Ground offset is now OPTIONAL (added a param to the creation function)
- Changed the < 0.24 thing to < 1 (it wasn't working!)
- Added bool:FindZ param to the creation function to disable the 'ground offset' thing (my script handled it itself with MapAndreas)
- Added 'ArePlayerTiresPoppable' - declare this function (with params 'playerid') and return 0 in there if the player's tires can't be popped (for example if they're a cop). Perhaps SpikeStrip_ToggleVehicleTiresPoppable or something would be better than spamming this, but oh well.
- And of course it's just an include now.
Feel free to use that as your release. I don't want any credit, I haven't done much really - I've just done your work for you. Hope you don't mind. Great work though!
Anyway, I've tested it and it doesn't work. I added a print to print the value of 'distance' and it never goes below 0.24 - not even close. (Print was JUST before 'if (distance < 0.24)').
I've transferred the entire thing in to an inc, but I guarantee you I haven't 'broken' anything.
It doesn't seem to go below 0.6.
EDIT: Fixed by changing to this: if (distance < 1)
EDIT #2: Okay, I made some changes, hope you don't mind: http://pastebin.com/mqKa4Gj0
- Added callback OnSpikeStripPop(vehicleid, spikeid)
- Ground offset is now OPTIONAL (added a param to the creation function)
- Changed the < 0.24 thing to < 1 (it wasn't working!)
- Added bool:FindZ param to the creation function to disable the 'ground offset' thing (my script handled it itself with MapAndreas)
- Added 'ArePlayerTiresPoppable' - declare this function (with params 'playerid') and return 0 in there if the player's tires can't be popped (for example if they're a cop). Perhaps SpikeStrip_ToggleVehicleTiresPoppable or something would be better than spamming this, but oh well.
- And of course it's just an include now.
Feel free to use that as your release. I don't want any credit, I haven't done much really - I've just done your work for you. Hope you don't mind. Great work though!