07.03.2017, 12:24
(
Last edited by TitanX; 12/03/2017 at 10:21 PM.
)
New MoneyBag System
Introduction:
Hello,
i noticed in nowdays the most servers are using the old moneybag system that use strcmp command and old functions + is not optimized at all,
so i created new with the most optimized functions, and fastest functions (MySQL), i don't forgot credits for [HiC]TheKiller because i got inspired by his work ofc
Features:
- Fast loading postions MySQL
- easy to add your own clues and pos's
- easy to deleted it too
- script so optimized
- Support 2 saving modes SQLite / MySQL
- fast loading and setup
How to install it ?:
- Download it (mediafire) | copy it (pastebin)
- as you see in script there some places must be edited and some others not
PHP Code:
// --------------< this must be edited without it FS will not work >--------------
#define USE_MYSQL 1 // un-comment this and comment USE_SQLITE to use MySQL
#define USE_SQLITE 0 // un-comment this and comment USE_MYSQL to use SQLite
#define MySQL_Host "localhost" // hostname of your mysql server if you are using xampp use "localhost"
#define MySQL_User "root" // username for your mysql database
#define MySQL_Database "test" // database that server will connect to it
#define MySQL_Password "" // password of the database (user) that server will connect to it
// --------------< you can edit this if you want >--------------
#define MAX_MONEYBAGS 150 // max moneybags that can be stored in database
#define MB_DELAY 30 // how many time moneybag re-spawn
#define MAX_MONEYBAG_MONEY 37000 // Max of money that can moneybag handle
#define MIN_MONEYBAG_MONEY 13000 // Min of money that can moneybag handle
//#define WEAPONS_BOUNS // un-comment this if you want player get weapons bouns from moneybag
#if defined WEAPONS_BOUNS
#define MAX_WEAPONS_AMMO 1500 // Min of ammo that can be given to a player
#define MIN_WEAPONS_AMMO 200 // Max of ammo that can be given to a player
- Complie it
- copy *.amx file to filterscripts in your server folder
- add it in Server.cfg
- restart server
- well done
Commands:
- /savemb or /savemoneybag
- /delmb or /deletemoneybag
- /mb or /moneybag
- /tmb or /togglemb
How to add a moneybag?:
just get ingame and use /savemb or /savemoneybag with name!
enjoy!
same for delete /delmb
Download Link:
Pastebin: http://pastebin.com/RR3uSEPH
Mediafire: http://www.mediafire.com/file/f31aij...eyBag%282%29.p
**Note: *.p = *.pwn just open it using your pawn complier and complie it
Credits:
- SA-MP Team
- Zeex
- BlueG
- [HiC]TheKiller
- Jelly23