<b>Arms trading 1.3 - Paleto Assault</b>    by GeorgeZhang

<i>It has begun. With gangwar going here and there, the government has decicded to launch an assault 
on these gangs in order to put an end to this madness, starting at Paleto Bay.</i>

<b>###note###</b>:
-<b>the script doesn't load completely when the game starts, so you need to reload it by pressing "Insert".</b>
-please make sure you installed every requirement of this mod and its requirements'
-I really can't guarantee that it won't conflict with other mods, I can only tell you what mods might.
-I know, it's a trainer. However, with some more interactions you can have with the world, it brings a slightly different feeling.

<b>###What's New?###</b>

*<u>Added support for non-player characters:</u>
-Introducing "credit card" feature~ basically you don't have to pay a cent when this is enabled.(however, I plan to make it so that you have to pay debts)
With this, you don't have to worry about the non-player-character has no money to buy stuffs from the dealer.
-methods that prevent the script from freezing when you play as NPCs were implemented
-NPC models also support uses of every features(maybe not every) such as the "enhanced heavy suit" and calling dealer

*<u>1 more dealer:</u>
Currently you can trade with 11 dealers (picked randomly), depending on your luck.
-The Lost MC
-Ballas
-Los Santos Triads 
-Varrios Los Aztecas
-Merryweather Security
-Los Santos Vagos
-The Families
-Armenian Mob
-Marabunta Grande
-Kkangpae
-U.S. Military
(dealers' locations & vehicles are base on their ingame territories & vehicles)

<i>thanks @Area9268,@JerryCan88 for the suggestion</i>:)

*<u>Added Features:</u>
-Calling the dealer: now you can actually "call" the dealer, open up your player's phone and open "Contacts",
and press "up" to go to the last contact(number 25), you will see "Arms Dealer", select it to arrange a deal.(hangup the phone yourself)
-Dealer's Trunk: small thing, the car's trunk will now open if you get close enough to the dealer
-Reload Settings: you can now reload settings in "ArmsTrading.ini" by selecting "Load Settings" in the player's contacts(right above "Arms Dealer") with his/her phone.

*<u>Menu Redesigned:</u>
-rewroked menu built with the NativeUI library
-descriptions for many stuffs are added(vehicle descriptions will be added next time:P)
-configurable navigation keys

<i>thanks @iTrungChemxX for the suggestion</i>:)

*<u>GangWar Enhancement</u>
-various gangwar locations has been added, each represents a gang's default war-location, but the choice is yours to make
-you can select <enemy gang> and <investment> and <location> before launching a gangwar
-the scoreboard is now transparent
-enemy spawnpoints has been increased to 4
-auto-deploy option added
-each fiendly soldier that survived will now share 0.5% of your profits if your team won the gangwar

*<u>enhanced heavy suit</u>
2700 armor(normal full armor is 100)
fireproof
supports every model(sort of), that is, every model can wear it.
the armor will be disposed once it is broken or you're dead.
when the armor is broken, your player will change to original clothes(clothes he weared before buying the armour)

---requested by @iTrungChemxX

*<u>BullShark Testosterone update:</u>
-now you can buy one and keep it, and activate it anytime with the press of a key "bull_shark_activation"(default B)
-once you acquire the BS Testosterone, a red bar with "BS" on it will appear at the right side of your radar, the length of it 
represents the remaining active time, so it will begin shrinking once you activate it.
-you can customize the x position of the bar in "ArmsTarding.ini"
-doubled max health

*<u>Balance between bullshark testosterone and heavy armor</u>
they do different things:
-bull shark testosterone reduces the damage you take, while also making you completely resistent to impact and burning damages
-heavy armor adds external armor that is 27x more tough than normal armors, while also making you fireproof.
The armor only takes effect before the armorbar runs out, after which it will be thrown away(disappear)

*<u>Improved icons and text colors</u>
the deal location will now appear as a blue icon which resembles ammunation's icon
the gangwar locations will appear as a red skull
friendly(or neutral) stuffs in this mod are blue in texts, while enemies are red

<u>reduced the chance of getting busted</u>
-reduced it, it was quite annoying i know:)
-fixed a bug where only if you're having a deal with Kkangpae will result in 3star wanted level

<u>new setting:</u>
-some orders has the "drive to you" feature, to prevent bugs, something was changed:
*now you have to wait for your order to arrive before you can call another
*this ONLY applies to: bodyguards & buy vehicles

<u>minor bugs fix</u>

<b>###features###</b>:

-<u>Arrange a deal:</u>
*(new)Call a dealer with the player's phone

-<u>buy most weapons, health pack, bodyarmour</u>
*the weapon would appear as pickups at the back of the vehicle
*in every deal there will be different weapons available, (new!)and only available weapons are shown
*the weapon you buy comes with default 100 rounds(5 if it's a projectile)
*buy ammunitions at the "Ammunition" section

-<u>buy some vehicles</u>
*the vehicles will be DRIVEN to you
*different dealers sells different vehicles

-<u>sell your weapons/ammo for cash</u>
*different weapons and ammunitions have their respective prices

price reference:(I slightly altered the values)
https://www.reddit.com/r/gtaonline/comments/30oly7/comparison_of_ammo_prices_and_how_much_money/

-<u>BullShark testosterone effects</u>:
enhanced durability, you can take 20x more damage
infinity special abilities
(new!)doubled max health
enhanced strength
enhanced speed x1.2
fireproof
drownproof
lasts for 10 min by default, configurable
"screen effects" can be toggled in the config file
(new!)you can keep it after buying it, and activate it at anytime with a press of the key
(new!)a red "BS" bar will now appear at the right side of the radar, representing the amount of time left for the drug being active.

-<u>chances of getting wanted</u>:
there are very little chances that you get a instant 3 star wanted level after starting a deal.

-<u>Protection</u>:
Call three dedicated bodyguards that will fight with you until you die.
the bodyguards bulletproof can be toggled.
the bodyguards will "drive" to you, just wait.
the bodyguards will be deleted when they're too far away from you.

-<u>the dealers have reinforcements</u>:
try not to piss them off.
waves of reinforcements will come

-<u>Gang War minigame</u>
*gangwars can be arranged through dealers
*you can choose your enemy, your investment and the location in the menu
*soldiers & spawning:
7 classes of soldiers, you can toggle "auto spawn" to make it spawn friendly for you
you can spawn every 3.5 seconds
enemy spawns every 5 seconds
(new!)toggleable auto-deploying, deploys every 6 seconds

*final point:
when the war lasts over the wartime you have set in the ini file
or your team runs out of money
or enemy gang runs out of money, the war will enter final stage.

at the final point, the enemy deploy two expert killers with high accuracy and large amount of health.
after the final point, noone can spawn soldiers anymore.

after 1.your team dies out
      2.enemy team dies out
the war ends

*money system:
1.you and enemy will invest a amount of money before the war begins
2.each deploy costs money, while each kill grants killer money
3.winner takes all
4.if you win, you and survivors on your team share the enemymoney and your team's money,
 each survivor takes 0.5%, killing them after the war won't grant you money though

<b>All of above can be changed/expanded, suggestions are welcome!</b>

<b>###Controls###</b>:
1.When in-game press "Insert" to reload scripts

2.Open up your player's phone and open "Contacts", and press "up" to go to the last contact(number 25),
 you will see "Arms Dealer", select it to arrange a deal.(then hangup the phone yourself)

*Alternative way: you can toggle "key_press" in the ini file in case you want to call a dealer with a press of the key you set

3.go to the location(blue pistol icon), and approach the dealer on foot, the game should notify you to press E
(if the game doesn't tell you to press E, press N to dismiss Terry and then reload the script)

4.press E and the menu should pop up, or press N to cancel the deal

5.use navigation controls or mouse to control(default: NumPad8(Up) NumPad2(Down) NumPad4(Left) NumPad6(Right) NumPad5(select))

6.press bull_shark_activation(default B) to enable bull shark testosterone if you have bought one

7.after setting up a gang war, go to the location(red skull blip) and press gangwar_start_key(default K) to start the gang war

8.when in gangwar, press gangwar_menu(default F10) to open deploy menu, or the game will deploy for you if you toggle the auto-deploy option

<b>###Installation###</b>
1.install ScriptHookV and ScriptHookVDotNet <b>and its requirements, which are:</b>
*Microsoft .NET Framework 4.5(or 4.5.2)
*Microsoft Visual C++ Redistributable Package for Visual Studio 2013 (x64)

2.install NativeUI.dll & iFruitContacts.dll links below
<a href="http://gtaforums.com/topic/809284-net-nativeui/">http://gtaforums.com/topic/809284-net-nativeui/</a>
<a href="http://gtaforums.com/topic/812301-net-ifruitcontacts/">http://gtaforums.com/topic/812301-net-ifruitcontacts/</a>

(tip: put the .dll files in GTA\scripts\)

3.put Armstrading.dll && Armstrading.ini into GTA V\script\

<b>###Known Issues###</b>
1.Not sure why, you have to reload the script (Insert Key) after the game is loaded  for the script to be fully functional.
2.possible mods that will conflict with this(all small conflicts though)
*(encountered)weapon.meta mods that modifies ammunition: the "buy ammo" feature(which uses ADD_AMMO_TO_PED) might not work
*scripts that sets armor/health max values and/or health values:
since the heavy suit and bullshark testosterone features will be modifying these values, it sure will conflict, for example
if you have the heavy armor, your max armor is now 2700. but another script sets your value to 100. bam, your player died before you notice this.

*please report bugs/conflicts

<b>Recommended mods</b>
Combat HUD by @CamxxCore
<a href="https://www.gta5-mods.com/scripts/combat-hud">https://www.gta5-mods.com/scripts/combat-hud</a>
try it with my gangwar minigame.

<b>Credits</b>
<i>Huge Thanks to @Alexander Blade for his ScriptHookV and all his source codes!</i>
<a href="https://www.gta5-mods.com/tools/script-hook-v">https://www.gta5-mods.com/tools/script-hook-v</a>

<i>Huge Thanks to @Crosire for his ScriptHookV .NET plugins and all of his source codes/examples!</i>
<a href="https://www.gta5-mods.com/tools/scripthookv-net">https://www.gta5-mods.com/tools/scripthookv-net</a>

<i>Huge Thanks to @CamxxCore for his awesome "iFruitContacts" plugin!</i>

<i>Huge Thanks to @Guad for his awesome NativeUI menu base!</i>

<i>Huge Thanks to @robiehn for finding various locations and spawnpoints for gangwars!</i>
and any other guys who gave me suggestions/help!


Have Fun!! and please report bugs!

please RESPECT others' work:
You should NOT edit my mod.
You may reupload once i agree.

