[GameMode] RPG World 5.0 - SQLite, ZCMD, Sscanf2, Real-time GM Editing, Banking, Vehicle Ownership, Businesses, Houses...more!
#1

RPG World 5.0


Version: 5.0 & 6.0 beta
Author: CJay9209/tAxI/Necrioss/cptnsausage

Version Notes:
V6.0 is still in beta and I'm putting it out for testing - basically I've upped the use of SQLite significantly and the entire vehicle system is now run through SQLite instead of simple text files. AS A RESULT THE FIRST TIME YOU RUN THE GM IT WILL TAKE AROUND 5 MINUTES FOR SOME PEOPLE (DEPENDING ON THE HARDWARE YOU HAVE) TO FULLY INITIALISE. I highly recommend that you keep your old files handy just in case the database screws up. It shouldn't but I'll never say my coding is foolproof! The business and banking systems will be switching shortly once stabillity overall has been established. The setup files remain unchanged.

Required Includes:

TSYS RPG System
Lstream Include
SSCANF2 include & Plugin
Foreach Include


Description:

This is a bit of a rework of older code i had lying around thats been updated. It's a good base for an RPG Script and is easily customizable . The system includes a full vehicle ownership system, banking system and admin system - 3 levels (see the features below).

This GM also makes extensive use of the tsys Library for most of the advanced features. I'm developing them side-by-side to showcase what it's capable of for developing RPG game-mode scripts. If you are having issues related to TSYS please post in that thread instead

Features:

- The most advanced vehicle ownership system in sa-mp.
- Own multiple vehicles at once with full control over them all.
- Vehicles will automatically save mods applied in mod shops.
- Call your vehicles to you anywhere!
- Dynamic vehicle tags lets everyone know who owns the vehicles from the outside (unique 3d text label streamer)
- Full admin control over vehicles.
- Add and remove system vehicles in game.
- Faction specific vehicles which will eject non-faction members.
- Admin vehicles that can be set to eject or blow up intruders.
- All vehicle features accessed via a single menu system.

- User control system powered by SQLite
- Banking system user configured via scriptfiles and accessed ingame via menu system
- Administrator command set to allow banning,kicking and punishment etc.
- users can share resources like money etc.

- full business and housing system is in development but not yet implemented!

Commands:

General:

- For CELLPHONE help please type /cellhelp."
- For BUSINESS system help please type /bizhelp
- For BANK commands please type /bankhelp."
- For VEHICLE SYSTEM info, please type /vehiclehelp."
- For ADMIN commands, please type /adminhelp.
- For GENERAL commands, please type /commands.
- For FUEL SYSTEM info and the location of the refuelling stations, please type /fuelhelp.
- Type /credits to see a full list of credits.

General:

- You can use /setpass to manage your user account.");
- To see what admins are online type /admins");
- To start a countdown type /countdown [time]

CellPhone:

- Every person has their own cellphone - calls cost $1/second.
- To make a call - /call [player id].
- To answer a call - /answer.
- To end a call - /hangup.

Fuel System:

- Fuel stations are located in all the fuel stations for ground vehicles!
- For airborne and large vehicles, the refuelling stations are located in all of the airports (inc verdant meadows)...just look for the little grey/blue vehicle icons on ur minimap to locate the refuelling areas.
- Refuel vehicle - /vmenu

General Admin:

- To become the server owner you must login to rcon and type /makeowner
- Admin help part 1 - /ahelp1
- Admin help part 2 - /ahelp2
- Admin help part 3 - /ahelp3

Admin Level 1:

- Use Admin Chat - /achat [message]
- To use the vehicle admin system enter a vehicle and type /vmenu
- Teleport anyone to any other person - /tele [teleportee id/name] [destination id/name]

Admin Level 2:
- Kick a player - /kick [player id/name]
- Disarm a player - /disarm [player idname]
- Murder a player - /murder [player id/name]
- Make an announcement - /announce [message]
- Give player money - /givemoney [player id/name] [amount]
- Freeze or Unfreeze a player - /freeze [player id/name] or /unfreeze [player id/name]

Admin Level 3:

- Ban a player - /ban [player id/name]
- Set player admin level (server owner only) - /setadmin [player id/name] [admin level] (0: None / 1: Server Admin / 2: Advanced Server Admin / 3: Server Owner)

You must be at an ATM area (identified by a dollar sign on your map) to use banking features

- Open the banking menu - /bankmenu");
- Give Cash - /givecash [recipient id/name] [amount] - sends a specified amount of money to the specified player id

Vehicle System

- In order to gain access to your vehicles controls please type /vmenu - can be used in or outside your owned vehicle.

Business System

- In order to gain access to your Business controls please type /bizmenu.

************************************************** **************************************************
The entire system was coded by myself and released under the Mozilla V2 License. Please give credit if you intend to use any of my code in your script! Please report any bugs!
************************************************** **************************************************

====================================
Download v5 HERE
Download v6 beta HERE
====================================
Reply
#2

NIce GM , thankx for the Release .
Reply
#3

looks awesome
Reply
#4

i like it
Reply
#5

From viewing the features of this game mode, and the back round information... I can proudly say I enjoy this game mode. It's really nice. It has amazing features not featured on other game modes. I hope that this project gets far.
Reply
#6

I like the features, will test it!
+Rep
Reply
#7

UPDATE:

- system has been majorly updated for a few bug fixes i didnt notice before - thanks guys!!!
- Have now added extra functionality which is 90% implemented. The BUSINESS system core is fully operational but still requires the menu integration components - I'm working on em but i have a sore head so you'll have to wait a few hours lol. As it stands you will be able to see and interact with business icons and pickups on a very basic level but not do much else yet - business icons are marked on the map by a green house-ish icon or a red icon if they are already sold. I have as always included the demo scrip-tfiles i use for testing purposes and there are 13 pre-installed businesses and 1 pre-installed bank. All located in LV with the bank in the strip 24/7.
Reply
#8

Can you explain more on this sqlite? as for beginners. or just pm me.
I am new and trying to test something out, till I get enough money in donations.
To actually purchase a game mode / all that..
Reply
#9

SQLite is just a database system - similar to MySQL but it uses a local database file instead of a full blown MySQL server. When you get right down to it MySQL is faster when your talking about thousands upon thousands of queries to the database but for sa-mp there really is no good reason to go MySQL unless your looking for a few more statistics gathering procedures. SQLite is also technically faster and more efficient than using a standard filesystem but to be honest again the differences are extremely small and in most cases will not make any real noticable difference.

The best way to handle player data is simply to load the database into an array of player info to start and not bother calling any queries to the database unless anything changes. If it changes then you simply change the variable and then save it into the database for that player rather than saving everything at once as alot of systems will do. why write 40-50 variables for the one player when rewriting one is just as easy and way faster right? Thats the main reason i switched to sqlite. Now saying that the business system and the vehicle systems are still on a standard file base which you would think is a bit counter-intuitive when you take into account my preferences - Basically, I'm haveing trouble with the system in SQLite and it takes about 15 minutes for the system to setup for the first time due to the 2001 database insertions per system so 4002 overall which is massive - not to mention the fact the Queries are huge as I'm writing 30+ variables per vehicle to the database and about 18 variables per business. I could switch it over but to be honest the filesystem seems to be working just fine for now and no slower really.

Don't be me wrong though. If I find a good easy way of doing it it'll be done and I am still working on it.
Reply
#10

Hmm, this looks nice. Good Job !
Reply
#11

Awesome , Good Job
Reply
#12

I like the features


+Rep.
Reply
#13

UPDATE:

Minor bugfixes and a couple extra business features added including a cashbox and pay system - also now included is a system where players can buy shares in a business for small cash gains over time.

Coming tonight is the business system menu update - just got a few issues to clean up
Reply
#14

cool/\
Reply
#15

Superb Gamemode And Simple Script In Gamemode and i like the way how you put the vehicle system and biz system (include)
Reply
#16

soo good

i liked it very much
Reply
#17

UPDATE:

- More slight bugfixes - the crash bug with login has been resolved - thanks for that all who reported it! Did some minor debugging and discovered i was bit dumb and was trying to save passwords as a string when i was hashing it into an integer - apologies if this messes your database up! I will be adding some admin commands to allow admins to reset a user's password to a predefined default value.

- sorry for the lack of updates on the business syste, - I've just been crazy busy - will be complete before the weekend and the housing system will have started being implemented also.

- Work has also been started on a faction system. I will be expanding the rudimentary faction commands used in the TSYS database to incorporate faction HQ's etc.
Reply
#18

Awesome man!
Reply
#19

this is cool +rep
Reply
#20

Updated again:

- expanded the 3D Text label streamer system to prepare for housing update. Also fiddled with the colors for the labels as the off-blue color for vehicle names was bugging me.
- Labels are now applied globally to fuel system icons, vehicles not in use, business icons, bank icons.
- Set the label streamer values reset timer to 500ms instead of 1sec increments as it is a lil smoother but feel free to change it if you so desire.
- Split each timer process out into 5 different processes to run simultaneously rather than running one huge time consuming process.

- Also did a lil bit housekeeping and removed the 5 second wait from callcar command in the /vmenu - no reason to run another timer for that alone really.
- changed the default owned vehicle max limit to 10 vehicles instead of 5: Reason... No reason

- rebuilt the filesystem again to make it a bit more useful. Planning on adding a reload from setup file option for vehicles and businesses etc so that you can batch add vehicles and simply reset the system to have em setup instead of manually removing files etc.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)