SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Plugin Development

Thread Tools Display Modes
Old 24/01/2016, 11:27 AM   #1
Little Clucker
Join Date: Dec 2013
Location: LS in SA
Posts: 39
Reputation: 10
Post [Shoebill] weapon-system

weapon-system v4.0

Here an example weapon-system based on Shoebill (JAVA).
(Original Post: [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.

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.

by BloodAngelHD

Other informations:
Type of saving system: MySQL
Language of the programm: Java (Shoebill)
Type of system: Plugin for the Shoebill Plugin
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

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

1. Download from GitHub or add it with maven to you pom.xml (in the dependencies):
Or download here:

2. add Plugin into folder shoebill/plugins and add in shoebill/resources.yml under "plugins:"
  - me.alf21:weapon-system:1.0-SNAPSHOT

DONT re-release this system or change the credits, but you can ask me!

//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!


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

Last edited by Alf21; 27/01/2016 at 01:56 PM.
Alf21 is offline   Reply With Quote
Old 25/01/2016, 03:09 PM   #2
Join Date: Jul 2014
Posts: 803
Reputation: 51
Default Re: [Shoebill] weapon-system

Looks nice and everything but why did you make a plugin for it?
This is quite easy to do in Pawn also.
TwinkiDaBoss is offline   Reply With Quote
Old 25/01/2016, 06:30 PM   #3
Little Clucker
Join Date: Dec 2013
Location: LS in SA
Posts: 39
Reputation: 10
Default Re: [Shoebill] weapon-system

@TwinkiDaBoss : I leaved PAWN because i started to learn Java and i liked to program object-oriented. So i found Shoebill and tried it out. 123maven123 supports me perfectly so i tried to program this system as my first Shoebill system to learn Java. Because of this, this system is pretty simple. But i don't believe that it's quite easy to do it with PAWN (maybe for you but not for all, eg beginners^^). Shoebill has a better performance because of Java and C++. So on there are some timers, a shop and weapon inventar, a weapon fix and different munition types you can own at the same time. In addition to that you can communicate with this plugin because of the plugin system of Shoebill.
But you are right, it is possible to write this system as an Include file for PAWN! (Oh: A plugin for Shoebill is nearly the same as a include for Pawn)

Thanks for your feedback, i like it!
Alf21 is offline   Reply With Quote
Old 26/01/2016, 10:22 PM   #4
AirKite's Avatar
Join Date: Feb 2009
Posts: 734
Reputation: 21
Default Re: [Shoebill] weapon-system

Read rules in this forum! You must post only with source code!
AirKite is offline   Reply With Quote
Old 26/01/2016, 11:27 PM   #5
Huge Clucker
Join Date: Oct 2010
Posts: 221
Reputation: 75
Default Respuesta: Re: [Shoebill] weapon-system

Originally Posted by AirKite View Post
Read rules in this forum! You must post only with source code!
Review the thread, he linked the source code.
kirk is offline   Reply With Quote
Old 26/01/2016, 11:30 PM   #6
Join Date: Mar 2015
Posts: 36
Reputation: 12
Default Re: [Shoebill] weapon-system

Originally Posted by AirKite View Post
Read rules in this forum! You must post only with source code!
Maybe if you looked before instantly crying because "POST MUST ONLY BE WITH SOURCE CODE!!!!" you would notice that...
1. The source code is actually IN THE POST.
2. The rules don't say your post must be ONLY the source code, it only says it must have it. Read the rules before you complain.
Codac is offline   Reply With Quote
Old 27/01/2016, 04:40 PM   #7
Huge Clucker
mk124's Avatar
Join Date: Jul 2007
Location: Nanning, China
Posts: 319
Reputation: 59
Default Re: [Shoebill] weapon-system

Nice, I like it
mk124 is offline   Reply With Quote

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
[FilterScript] [SHOEBILL] Gamemode Reloader mk124 Tools and Files 10 16/05/2016 06:29 PM
[Tutorial] Setup a Shoebill Server and create a Gamemode 123marvin123 Tutorials 17 20/12/2014 08:16 PM
[FilterScript] Dealership plugin for shoebill (Java) 123marvin123 Filterscripts 4 08/06/2014 02:17 PM
[FilterScript] Weapon Shop v2.0 With Weapon Saving System Danyal Filterscripts 30 16/01/2014 08:58 AM
[FilterScript] Weapon specifier - Advanced weapon system. Blunt Filterscripts 16 12/01/2014 11:45 AM

All times are GMT. The time now is 06:09 PM.

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