[Plugin] [Shoebill] weapon-system
#1

weapon-system v4.0
Here an example weapon-system based on Shoebill (JAVA).
(Original Post: https://breadfish.de/index.php?threa...postID=2074778 [GERMAN])

Why using this weapon-system?
Because you have 5 different types of munition changable with the key [N]

Types of munition:
  • normal munition
  • fire munition
  • explosive munition
  • armour-breaking munition
  • special munition
Every type of munition has a different effect and amount of damage.

Intro:
Clicking key [N] with a short duration, you will change the type of munition.
Clicking key [N] with a longer duration than ca. 1sec, you will open the weapon inventar and the included weapon shop.
You are only able to hold one weapon of any slot in your hand but you can also easily change the weapon of a slot by open the inventar and change the weapon.
So on there is a reloading animation to fix SAMP bugs while changing a weapon.

Video:
*********/v36qQqOUJIE
by BloodAngelHD

Other informations:
Type of saving system: MySQL
Language of the programm: Java (Shoebill)
Type of system: Plugin for the Shoebill Plugin
GitHub: github.com/Alf21/weapon-system.git
Thanks to @123marvin123 (for a lot of helping, Shoebill and the repo) and to BloodAngelHD (for the video)!

-> Why using Shoebill / Java?
Shoebill is faster than Pawn so there is a better performance. Its very important for this system because there is after every shoot a calculation.
In addition to that java has a great support and you can use your favourite IDEs such as Eclipse with Maven.

Effects of types of munition:
Name - Damage - Price
Normal - 50%* - 100%*
Fire - 1 [+ every second damage(+2)] - 10%*
Explosiv - 10%* (+ areadamage / damage of explosion**) - 250%*
Armour-breaking - 65%* (+ ignores armour of enemy) - 120%*
special - 120%* - 350%*

* of normal damage / price
** Distance of: 1 - 10 Damage, 2 - 5 Damage, 3 - 2 Damage, >4 - 0 Damage

Requirements:
Shoebill ([0.3.7] Shoebill 1.2 Plugin) + MySQL Database -> localhost or a vServer / root for using Shoebill

Installation:
1. Download from GitHub or add it with maven to you pom.xml (in the dependencies):
Код:
<dependency> 
    <groupId>me.alf21</groupId>
    <artifactId>weapon-system</artifactId>
    <version>1.0-SNAPSHOT</version>
    <type>jar</type>           
    <scope>compile</scope>
</dependency>
Or download here: http://ci.gtaun.net/job/weapon-system/

2. add Plugin into folder shoebill/plugins and add in shoebill/resources.yml under "plugins:"
Код:
  - me.alf21:weapon-system:1.0-SNAPSHOT
Attention!:
DONT re-release this system or change the credits, but you can ask me!

Callbacks:
Код:
//To give a weapon
givePlayerWeapon(player, weaponId, ammo) //to reload a weapon completeky
givePlayerNewWeapon(player, weaponId, ammo) //to load a weapon with the old munition data

//To get munition
getWeaponAmmo(player, weaponId)
getFireWeaponAmmo(player, weaponId)
getExplosiveWeaponAmmo(player, weaponId)
getHeavyWeaponAmmo(player, weaponId)
getSpecialWeaponAmmo(player, weaponId)

//To set munition
setWeaponAmmo(player, weaponId, ammo)
setFireWeaponAmmo(player, weaponId, ammo)
setExplosiveWeaponAmmo(player, weaponId, ammo)
setHeavyWeaponAmmo(player, weaponId, ammo)
setSpecialWeaponAmmo(player, weaponId, ammo)

//To get current loaded type of munition
getAmmoState(player, weaponId)

//To set current loaded type of munition (ATTENTION: The player need to have the type of munition)
setAmmoState(player, weaponId, ammoState)

//To check whether the weapon is selected / armed
isSelectedWeapon(player, weaponId)

//To set a weapon selected / armed
setSelectedWeapon(player, weaponId, bool)

//To check whether is weapon is buyed / able to arm
isAbleWeapon(player, weaponId)

//To set a weapon able 
setAbleWeapon(player, weaponId, bool)

//To set all weapon of a slot as not armed / unselected
unselectWeapons(player, slot)
Please give a Feedback, thanks!

Alf21
//edit there was a link, but it was not detected because of no 'http://' (GitHub)
Reply


Messages In This Thread
[Shoebill] weapon-system - by Alf21 - 24.01.2016, 11:27
Re: [Shoebill] weapon-system - by TwinkiDaBoss - 25.01.2016, 15:09
Re: [Shoebill] weapon-system - by Alf21 - 25.01.2016, 18:30
Re: [Shoebill] weapon-system - by AirKite - 26.01.2016, 22:22
Respuesta: Re: [Shoebill] weapon-system - by kirk - 26.01.2016, 23:27
Re: [Shoebill] weapon-system - by Codac - 26.01.2016, 23:30
Re: [Shoebill] weapon-system - by mk124 - 27.01.2016, 16:40

Forum Jump:


Users browsing this thread: 1 Guest(s)