[Include] tsys: Complete RPG Solution - vehicle ownership, businesses, banking, housing, factions and more!!!
#1

The All-In-One RPG system!!!

DEMO SERVER HERE

Required Includes:

Lstream Include
SSCANF2 include & Plugin
Foreach Include


TSYS is the new all-in-one RPG solution for your server. It is currently in development but i decided to release it a tad early as somebody was pleading with me (YOU KNOW WHO YOU ARE U DINGBAT LOL).

Basically this system gives you the abillity to dynamically create an in game world where users can own multiple vehicles and buy businesses. Users can also store their money in banks located accross the world of SA for safe storage and then use it to purchase a house or business. Park your vehicles wherever you like and rest safe in the knowledge that your new vehicle security system will blow intruders to peices! Businesses will earn money each hour based on a daily profit margin.

Create factions with dedicated vehicles and safe-houses. Houses can even have the same interiors thanks to the abillity to specify the houses virtual world in the configuration.

The system also boasts the single most comprehensive and advanced vehicle ownership system availlable for sa-mp and the housing and business system are being designed along the same lines. DON'T MISS OUT!!!


This really is the ONLY RPG system it makes any sense to use!

********** NOW WITH BUILT IN ANTICHEAT Courtesy of MAKI187 ******************
anticheat is fairly comprehensive - I've taken the liberty of tidying up the code, fixing the few errors and fully integrating it into the tsys core system. all credit for the original code goes to the author as always.

================================================== ========

OK so now I have that out of my system i can introduce you to the new brainchild I've been hatching. This system is a very advanced all in one rpg type package. It will take some getting used to but when mastered it can do everything mentioned above and more.

The commands available so far include:

- TSYS_Register(playerid, password[]) - registers a player with tsys
- TSYS_Login(playerid, password[]) - logs the player into tsys
- TSYS_SetPassword(playerid, newpass[]) - Set's the player's tsys password
- TSYS_SetPlayerAdmin(playerid, level) - makes player a tsys admin of specified level (0 is no admin, 3 is server owner)
- TSYS_GetPlayerAdmin(playerid) - returns a player's admin level (returns 1 for yes and 0 for no)
- TSYS_SetPlayerFaction(playerid, factionid) - sets player faction (0 and up. -1 is considered no faction)
- TSYS_RemovePlayerFaction(playerid) - removes any faction affiliation player has
- TSYS_GetPlayerFaction(playerid) - returns player faction
- TSYS_IsPlayerLogged(playerid) - Checks if a player is logged in
- TSYS_IsPlayerRegistered(playerid) - Checks if a player is registered

- TSYS_SetVehicleFaction(vehicleid, factionid) - sets a vehicle faction (same rules as players apply)
- TSYS_RemoveVehicleFaction(vehicleid) - removes the vehicle's faction
- TSYS_GetVehicleFaction(vehicleid) - returns the vehicle's faction

- TSYS_CreateMapIcon(markermodel,Float: x,Float: y,Float: z,Float: spawn_distance) - creates a map icon that uses the in-built streamer (returns the iconid)
- TSYS_DestroyMapIcon(iconid) - destroys a TSYS map icon

- TSYS_ShowPlayerBankMenu(playerid);
- TSYS_ShowPlayerBusinessMenu(playerid)
- TSYS_ShowPlayerVehicleMenu(playerid) - shows the player the vehicle menu
- TSYS_ShowPlayerACMenu(playerid) - shows the player the AntiCheat Menu

==== The following commands replace standard sa-mp commands so you don't get kicked or banned by anticheat ====

- TSYS_GetPlayerMoney(playerid)
- TSYS_GivePlayerMoney(playerid, amount)
- TSYS_SetPlayerMoney(playerid, amount)
- TSYS_SetPlayerVirtualWorld(playerid, vw)
- TSYS_SetPlayerInterior(playerid, intid);
- TSYS_SetPlayerPos(playerid, Float: xx, Float:yy, Float:zz)
- TSYS_SetPlayerHealth(playerid,Float:health)
- TSYS_SetPlayerArmour(playerid,Float:armor)

Setup:

Very easy to use. Simply put the tsys.inc and TSYS folder in your "...pawno\includes\" folder and load up pawno. scroll down on the right hand side and you shoud be able to see a list of availlable commands. remember to add:

pawn Код:
#include <tsys>
to the top of your script in order to compile properly. Once you have used the functions you wish to use and integrated them you are good to go!

VEHICLE SETUP:

1 - In order to use the initial batch add system, in the scriptfiles folder you must place a file named "tsys_files/setup_files/TSYS_vehicles_setup.txt" (demo included in the download package)
2 - The vehicles setup file should contain the co-ords/info of your vehicles to be batch added into the system in the following format:

model,x,y,z,z_angle,color1,color2

3 - each set of co-ords/info for each vehicle must start on a new line.

There are 2 other files in the scriptfiles required for the bank and fuel systems to be fully activated.
"tsys_files/core_files/TSYS_fuelstations.txt" and "tsys_files/core_files/TSYS_banks.txt". The bank file must be formatted in the following manner.
Each line is a single bank:

mapicon_x, mapicon_y, mapicon_z, banklocation_x, banklocation_y, banklocation_z, bank_name

The Fuelstations file must be formatted in the following manner. Each line is a fuel station:

location_x, location_y, location_z, type (1 = small vehicle / 2 = large vehicle)

there are demo files in the download for reference!

*** You can add your own vehicles using addstatic or createvehicle in your script but they will not be part of the vehicle ownership system at all. Vehicles can be added either via the old "batch file method" or in game by using the vehicle admin menu system. Remember to add all map icons you have using the commands provided with this include or you will have trouble. ***

I think that pretty much covers most of the basics. I'm always open to ideas so make suggestions and please comment if you download - I wanna know whats working and whats not!

================================================== ==========
Downloads
Download v1
Download v2 - ***Current***
Download v3 - ***Beta***
================================================== ==========

Reply
#2

Niice rep+
Reply
#3

UPDATE:

- Expanded the library to help track money inside the system. You must substitute the usual money commands for the custom ones on the include.

- Added banking functionallity but have not yet implemented the banking menu system - working out the bugs as your reading this.

- Migrated fuel station loading to external files for easy editing on the server side.

- Migrated bank locations to external file to allow easy editing on the server side. The bank systems require 2 sets of co-ordinates to allow the map icon to be placed outside of the building whilst the bank location is inside the building etc.

- bank and fuel system auto generate info pickups and map icons.

Please report all bugs here and any questions or prblems you have please get in touch here.
Reply
#4

Nice release.
Reply
#5

UPDATE:

- Bank system now fully active and running. use:

ShowPlayerBankMenu(playerid);

- Bank menu will allow you to view statements and deposit and withdraw cash. will add wire transfer functionallty. Each player also has a unique assigned account number also.
Reply
#6

hey guys. Sorry for the long update absence - I've been pretty busy at work so this kinda took a backseat - however I'll be releasing the newer version in about a week. I'm switching the vehicle system over to a single file per vehicle in order to allow for much faster file i/o during server use for larger GM's with loads of vehicles. This will however mean that the scriptfiles directory will again get a little more complicated to compensate for the sheer volume of files there will be. Also it will effect server initial load-up time but that cannot be helped I'm afraid!
Reply
#7

OK I've scrapped the filesystem altogether and have started the conversion to SQLite.

RELEASE: v2.0.0

- some minor code optimizations and bug fixes (thanks all those who reported em )
- User system converted to core database using SQLite (nothing changed in function at your end)
- Vehicle system has started to migrate over to SQLite but unfinished yet = will do it all this weekend.

I look at the change pretty positively as the old filesystem quite frankly was starting to piss me off - overly complex and writing 40,000 variables to a file every time you run a save routine is crazy and might end up lagging some large server using the system. The vehicle batch add feature will remain as is but only for initial setup. Vehicle info will be stored within the core database and saving each vehicle individually will become possible rather than having to do 2000 line write routines.

I WILL NOT convert to full mysql because honestly i can' be bothered and really you do NOT need mysql for this. why run an extra server when you don't have to.

As is the inc is stable but as always if you notice any huge glaring problems I've caused please gimme a shout and let me know !!!!

I will however continue to host both version downloads but V1 as of today is now obsolete and will not be updated further.
Reply
#8

UPDATE:

- moved player filesystem over to REAL-TIME WRITE. Player data is no longer cached and written in a dump. It is saved as the values change and all changes are tracked realtime so if the server crashes, NO INFO CAN BE LOST. Filei/o has be drastically sped up via sqlite use.

- Vehicle system not quite at that stage yet but is very close to completed now.

- Player registration and login now require passwords which are encrypted into the database. As such i have included a set password command - see the first page native list!

- I have completely redesigned the vehicle labelling system. the server can suport 2000 veicles give or take a couple but the server cannot support more than 1024 3d text labels and as such, rther than decrease the number of veicles the system supports i have installed a simple 3d text label STREAMER system to cope with all of the vehicle text labels. To demo this system i have included a vehicle setup file in the download which contains over 1900 vehicle spawns. All work flawlessly.

Hopefully no major bugs but please report any you find! Thanks!
Reply
#9

UPDATED:

- Vehicle Filesystem has been redesigned. Each vehicle has a single file and changes are tracked and made in real-time to keep things faster.
Reply
#10

UPDATE:

- Minor bug-fixes
- Added more versatile player management functions - see function list in source-code.
- Business system 90% implemented - menu system for user buying selling etc still needs to be installed but the core system is running and functions well. See the read-me for setup details!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)