SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Filterscripts > Includes

Reply
 
Thread Tools Display Modes
Old 19/01/2018, 11:36 PM   #1
Gammix
High-roller
 
Gammix's Avatar
 
Join Date: Jan 2015
Location: Canada
Posts: 1,773
Reputation: 856
Default Fix for tire poping with EnableVehicleFriendlyFire()

I have seen lot of servers don't have this fix. I used Admigo's vehicle part detection library to detect tire poping.

This is a simple include, all you have to do is include this library in your script and there will be no tire poping on friendly vehicles anymore. But only if you have this: EnableVehicleFriendlyFire(), in your script.

None the less, there is a drawback, the include only support 4 wheel vehicles (i.e. only cars). Bikes hasn't been added, i don't have time to make the algorithm for coordinates. But atleast cars are safe!

Download
https://github.com/Agneese-Saini/SA-...iendlyFire.inc

Try it out on your servers and let me know if any bugs!

Extra
For adding a further feature, i made a callback which is called every time a player confirm pops a team vehicle's tire:
PHP Code:
/*
*** Parameters:
* playerid: the player who called the shots
* vehicleid: vehicle taking the hits on tires
* driverid: the drive of the vehicle
*/
forward OnPlayerFirendlyFireTires(playeridvehicleiddriverid); 
__________________

Follow me on Github: Follow me on Spotify: Donate on Paypal:

Gammix is offline   Reply With Quote
Old 20/01/2018, 12:26 AM   #2
liguanhua123
Little Clucker
 
liguanhua123's Avatar
 
Join Date: Jun 2013
Location: China
Posts: 35
Reputation: 13
Default Re: Fix for tire poping with EnableVehicleFriendlyFire()

Good Work
__________________
My Projects:https://github.com/li123856
Battle Mode:[CSGO-SAMP-][PUBG-SAMP-]
Freedom Mode:[FreeMan1][FreeMan2][FreeMan3][FreeMan4]

liguanhua123 is offline   Reply With Quote
Old 20/01/2018, 03:16 AM   #3
RogueDrifter
High-roller
 
RogueDrifter's Avatar
 
Join Date: Dec 2017
Location: SA-MP Drifting world.
Posts: 1,193
Reputation: 420
Default Re: Fix for tire poping with EnableVehicleFriendlyFire()

Oh that's interesting good job!
__________________
Quote:
Originally Posted by Andy
My anti cheat is still relevant *puts shades on* https://github.com/RogueDrifter/Anti_cheat_pack

[Github]:Link [Gists]:Link [Forum]:Link [Server]:Link [Discord]:Link

RogueDrifter is offline   Reply With Quote
Old 20/01/2018, 06:16 AM   #4
Admigo
High-roller
 
Admigo's Avatar
 
Join Date: Oct 2010
Location: The Netherlands
Posts: 1,840
Reputation: 297
Default Re: Fix for tire poping with EnableVehicleFriendlyFire()

Hey Gammix. Thanks for using my include. If i have time soon i will improve the include and support for bikes.
Great release. +1
__________________
Follow me on Instagram @brandonvanommen
Admigo is offline   Reply With Quote
Old 20/01/2018, 06:45 AM   #5
Gammix
High-roller
 
Gammix's Avatar
 
Join Date: Jan 2015
Location: Canada
Posts: 1,773
Reputation: 856
Default Re: Fix for tire poping with EnableVehicleFriendlyFire()

Quote:
Originally Posted by Admigo View Post
Hey Gammix. Thanks for using my include. If i have time soon i will improve the include and support for bikes.
Great release. +1
That would be great, bike support will complete this include.
__________________

Follow me on Github: Follow me on Spotify: Donate on Paypal:

Gammix is offline   Reply With Quote
Old 20/01/2018, 08:34 AM   #6
Cypress
Gangsta
 
Cypress's Avatar
 
Join Date: Dec 2009
Location: Germany
Posts: 938
Reputation: 127
Default Re: Fix for tire poping with EnableVehicleFriendlyFire()

That's a great fix. Being annoyed when people don't understand that you're at the same team as they, so your vehicle gets rip!
__________________

Welcome stranger. I like your attitude.
Cypress is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
EnableVehicleFriendlyFire() Johndaonee Scripting Help 0 15/05/2013 05:37 PM
EnableVehicleFriendlyFire( ) - Does not work? RedFusion Scripting Help 2 21/04/2013 04:15 PM
tire inflation Faheem Scripting Help 4 04/01/2012 06:00 PM
Tire pop question Haris Hadzic Help Archive 1 07/02/2011 05:44 PM


All times are GMT. The time now is 05:16 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.