[FilterScript] Dealership plugin for shoebill (Java) - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Filterscripts (
https://sampforum.blast.hk/forumdisplay.php?fid=17)
+--- Thread: [FilterScript] Dealership plugin for shoebill (Java) (
/showthread.php?tid=518123)
Dealership plugin for shoebill (Java) -
123marvin123 - 08.06.2014
Dealership plugin for shoebill
Powered by:
[ame]http://www.youtube.com/watch?v=Au9CRYxMFBU[/ame]
First: This is a plugin for
Shoebill, and can't be used with Pawn-Gamemodes at this time.
Features:- Written in Java
- Dialogs as main interface
- Customize plugin in your gamemode
- Vehiclelicenses which will expire
- Vehiclelicenses can be added in the gamemode
- MySQL
- Open Source (GitHub)
- Multi-Language (German, English, Simplified chinese)
What benefits do I get when using the plugin?- It's faster then Pawn
- Detailed errors (Exceptions) at runtime
- Fast and easy development because of Java
Disadvantages?How to use the plugin?
- You can download the .jar file on the
Jenkins Server, or you get the artifacts with maven.
- If you want to use Maven, you need to add the following code to your pom.xml:
Code:
<dependency>
<groupId>org.marvin</groupId>
<artifactId>dealership</artifactId>
<version>0.1-SNAPSHOT</version>
<type>jar</type>
<scope>compile</scope>
</dependency>
How to use the plugin in my gamemode?
- You get the DealershipPlugin Instance:
Code:
private DealershipPlugin dealershipPlugin;
dealershipPlugin = Shoebill.get().getResourceManager().getPlugin(DealershipPlugin.class);
- Now you can add vehicle licenses:
Code:
dealershipPlugin.getBuyableLicenses().add(new BuyableVehicleLicense(411, 12500, 5)); //Adds a license for the vehicle 'Infernus' which will cost 12.500$ and will be valid for 5 days.
- If you use a Anti-Money-Cheat system, you need to customise the money getter & setter function:
Code:
dealershipPlugin.setAddMoneyFunction((player, integer) -> {
player.giveMoney(integer);
//Or own function to set server money
});
dealershipPlugin.setMoneyGetter(player -> player.getMoney()); //Or own function
- You can change the language of the player like this:
Code:
dealershipPlugin.setPlayerLanguage(player, "DEU");
dealershipPlugin.setPlayerLanguage(player, "ENG"); //etc.
//Or show him selection dialog:
dealershipPlugin.getShowLanguageDialog().accept(player);
Thanks to:- mk124 for the translation & the beta testing
Here you can get the localized strings & mysql access file: http://puu.sh/9jvUr/d4aca2349f.rar
AW: Dealership plugin for shoebill (Java) -
Phцnix - 08.06.2014
very nice !
Re: Dealership plugin for shoebill (Java) -
mk124 - 08.06.2014
Good job
Re: Dealership plugin for shoebill (Java) -
Bingo - 08.06.2014
Great job again.
Re: Dealership plugin for shoebill (Java) -
AviPeker - 08.06.2014
Very nice.