03.03.2016, 22:34
(
Последний раз редактировалось Salvator; 24.10.2016 в 02:01.
Причина: Small text correction.
)
* Can administrators change name of the thread to "[Unoccupied] Vehicle Damage Enabler"? Thank you.__________________________________________________ ____________________________________________
Introduction
- This represents my first script and I hope it will be just one of many in close future. My goal was to learn more of coding through creating, and if happens to be a good and useful for others, that's even better, I'd just be more motivated to keep updating this one and work on new scripts.
About
- This script will enable you to damage vehicles that doesn't have drivers in them. There are few more scripts on this same topic, but non was able to work as I want, or was outdated, so I decided to make one myself.
- The idea is to bring more reality into RP servers, to disable someone from going further by damaging his/hers car or popping tires. It can be useful for mafia, gangs or if just someone makes you angry . Also, I didn't like the possibility to jump out of the car at any time to avoid them getting damaged.
*It's in Alpha state as I couldn't test it on big server, only made it on local alone with two computers. Also it doesn't have all features I was planing to have, but that is changing with new updates. So far no one mentioned problems for bigger servers.
Features
- You can use all weapons that fire bullets to damage vehicles with no driver:
- Pistols (9mm, Silenced and Desert Eagle);
- Shotguns (Shotgun, Sawed Off, Combat Shotgun);
- SMGs (Uzi, MP5, Tec-9);
- Rifles (Country Rifle, Sniper, M4, AK-47);
- Minigun.
- You can pop tires on vehicles. - Added in Alpha v2.0
Weapon Vehicles Airplanes9mm 25 10Silenced 40 16Desert Eagle 140 56Shotgun 150 60Sawnoff 150 60Combat Shotgun 120 48Uzi 20 8MP5 25 10AK-47 30 12M4 30 12Tec-9 20 8Country Rifle 75 30Sniper 125 50Minigun 140 56
- In plan is to add melee, heavy weapons (RPG, HS rocket and flamethrower) and also the bombs to deal exact damage like with driver. But, at the moment I can't enable explosions and fire to damage empty cars, as there is no such callback, or I'm just not aware of it.
Video preview - https://www.youtube.com/watch?v=4V-7SKCzUG8
Known bugs and issues
- Shotguns will deal maximum damage (150 and 60) with every shot. (Damage should depend on how many bullets actually hit the target).
- Popping tires will also damage vehicle. (Working on a fix.)
- Vehicle health can go to minus. *Fixed in Alpha v2.0 (You can't damage vehicle if it's on fire, have less then 250 health).
Feedback
- I would appreciate a feedback on how script is reacting when several players shoot at the same car or different players shot different cars. If you spot problems in other situations, please post here and I'll try to fix them.
- If you have some ideas how to make this better I'd like to hear it, I'm open to suggestions.
Copyrights and credits
- You can use or edit script as long as you give me credits as first creator and initiator.
- Thanks and credits goes to AmigaBlizzard for showing me IsAirModel(modelid) function.
- Thanks to Gammix's vehicleplus.inc, helped me to figure out wheels position.
- Thanks Abagail for improved IsDriverAvalable call and player loop.
Download and installation
- Download .amx file file and put it into your "filterscripts" folder.
- After that open server.cfg and add name of the file under "filterscripts", without the .amx extension.
Alpha v1.0 (4th March 2016.)
- Download - AMX file
- Download - PWN file
- Preview script code
Alpha v2.0 (5th March 2016.)
* with new feature tire popping
- Download - AMX file
- Download - PWN file
- Preview script code
Alpha v2.1 (6th March 2016.)
* same features with improved code
- Download - AMX file
- Download - PWN file
- Preview script code