diff --git a/COMMANDS.md b/COMMANDS.md new file mode 100644 index 00000000..4e046cdb --- /dev/null +++ b/COMMANDS.md @@ -0,0 +1,194 @@ +## Player Commands + +### Account + * /login + * /register + * /changepass + * /setemail + * /verifyemail + +### Character + * /newchar /usechar /switchchar + * /autolastchar + +### Settings + * /logo + * /gui + * /lang + * /notips + * /loginalert + * /scrolllines + * /chatautohide + * /chatfilter + * /chatemoji + * /chattime + +### Chat + * /me + * /do + * /s + * /shout + * /talk + * /local + * /l + * /w + * /whisper + * /clanchat + * /clan + * /c + * /m + * /dm + * /reply + +### Items + * /i + * /item + * /pickup + * /=--drop + * /put + * /take + * /use + * /inv + * /inventory + * /items + * /houseitems + * /bizstorage + * /bizfloor + * /buylist + * /power + * /freq + * /radio + * /r + +### Vehicle + * /nearveh + * /oldveh + * /lastveh + * /oldcar + * /lastcar + * /engine + * /siren + * /lights + * /vehclan + * /vehbiz + * /vehrank + * /vehinfo + * /vehrent + * /vehrentprice + * /vehbuyprice + * /vehstoprent + * /vehbuy + * /vehcolour + * /vehlivery + * /vehrepair + * /passenger + +### Business + * /bizbuy + * /bizfee + * /biztill + * /bizbalance + * /bizwithdraw + * /bizdeposit + * /buy + * /bizstock + * /bizstore + * /bizorder + * /bizitemprice + * /bizname + * /bizowner + * /bizrank + * /bizclan + * /bizbuyprice + * /bizinfo + * /bizflooritems + * /bizstorageitems + * /bizdealership + * /bizpaintball + +### Clan + * /clans + * /clanchat + * /c + * /clanranks + * /clanflags + * /clanaddrank + * /clandelrank + * /clansetrank + * /clanowner + * /clantag + * /clanranktag + * /clanmembertag + * /clanrankname + * /clanranklevel + * /clanmembertitle + * /clanaddrankflag + * /clanrankflags + * /clandelrankflag + * /clanaddmemberflag + * /clandelmemberflag + +### House + * /houseinfo + * /housebuy + * /houseclan + * /houseowner + * /housebuyprice + * /houserentprice + +### Keybinds + * /bindkey + * /unbindkey + * /keybinds + +### Misc + * /idea + * /bug + * /pos + * /enter + * /cursor + * /yes + * /no + * /help + * /suicide + * /lights + * /lock + * /admins + * /mousecam + * /cursor + * /speak + * /gps + * /stuck + +### Job + * /takejob + * /startwork + * /stopwork + * /startjob + * /stopjob + * /quitjob + * /uniform + * /equip + * /department + * /d + * /fare + * /detain + * /drag + * /search + * /startroute + * /stoproute + * /jobinfo + * /joblocinfo + +### Animation + * /anim + * /an + * /e + * /anims + * /animlist + * /stopanim + +### Radio + * /radiostation + * /radiostations + * /radiovolume diff --git a/IDEAS.md b/IDEAS.md index 5c4236f2..893e22e3 100644 --- a/IDEAS.md +++ b/IDEAS.md @@ -1,9 +1,10 @@ # Ideas **NOTICE: Most of these ideas are totally random and some might be unrealistic. Every time I thought of something, I just immediately threw it into this file. I never checked to see if I had already added it, so there may be duplicates or similar entries spread out and unorganized.** - -### Businesses +--- +### Businesses *Inspiration from GTA Online* + * Nightclubs * Executive Offices * Warehouses @@ -12,7 +13,7 @@ * Garages * Casinos --- -### Interactive peds with each one having a background story, characteristics, certain people or groups they like/dislike +### Interactive peds with each one having a background story, characteristics, certain people or groups they like/dislike *Inspiration from Skyrim and many other RPGs* * Procedurally generated? @@ -477,4 +478,4 @@ In-world indicator too, when player gets close and is in line of sight ### Item/Object pickup and move *Inspiration from the 3D Fallout games* -Fallout 3 and New Vegas have a neat feature where you can "grab" an object and fling it around while the key is pressed. Could be implemented for items in GTACRP servers \ No newline at end of file +Fallout 3 and New Vegas have a neat feature where you can "grab" an object and fling it around while the key is pressed. Could be implemented for items in GTACRP servers diff --git a/README.md b/README.md index a76f8d8b..3ae14123 100644 --- a/README.md +++ b/README.md @@ -2,53 +2,59 @@ ### Description This is Vortrex's Roleplay Resource ---- + +### Supported Games and Multiplayer Mods +* GTA III (on [GTA Connected](https://gtaconnected.com/)) +* GTA VC (on [GTA Connected](https://gtaconnected.com/)) +* GTA SA (on [GTA Connected](https://gtaconnected.com/)) +* GTA IV (on [GTA Connected](https://gtaconnected.com/)) +* Mafia: The City of Lost Heaven (on [Mafia Connected](https://mafiaconnected.com/)) + ## Setup * Download the server from the [downloads page](https://gtaconnected.com/downloads) of the GTA Connected website. * Download this resource via git clone or directly from GitHub with the green zip download button. -* Add this resource as-is into a resource folder of your choice inside the resources directory of your server. I named my resource folder "gtac_roleplay" +* Add this resource as-is into a resource folder of your choice inside the resources directory of your server. * Add the resource to the server config. You should also disable a lot of the cvars in the config too. I only have traffic, civilians, planes, and bigmap enabled. -* Add the [v-roleplay-intro](https://github.com/VortrexFTW/v-roleplay-intro) resource to your server to make the screen fade in (needs to be a separate resource) * Download the required modules and add them to your server config. See list of modules below. -* Import the database.sql to your MySQL server, and edit database.json in the resource's config folder with the info to connect to the database. +* Import the database to your MySQL server, and edit database.json in the resource's config folder with the info to connect to the database. +* Edit `svr_main` table, and set the `svr_game` and `svr_port` to your server's info. Game ID numbers are [here](https://wiki.gtaconnected.com/GameIdentifiers) * (Optional) Edit the email SMTP connection info. Without this, the email features will be disabled. * Start the server and connect. Register your account, make a character, and disconnect. -* Edit your account in the database (get your account ID from the acct_main table and then edit the four entries in acct_svr for your account, changing acct_svr_staff_flags to negative 1 (-1) ... **you must not be connected to the server when doing this** +* Edit your account in the database (get your account ID from the acct_main table and then edit the four entries in acct_svr for your account, changing `acct_svr_staff_flags` to negative 1 (-1) ... **you must not be connected to the server when doing this** * You now have full admin. Enjoy the resource! ---- + ## Modules * [MySQL](https://github.com/VortrexFTW/mod_mysql) * [Hashing](https://github.com/VortrexFTW/mod_hashing) * [SMTP](https://github.com/VortrexFTW/mod_smtp) (Optional) ---- + ### Git Branches -*The nightly branch is not recommended for public server. Some features may or may not work as intended, or the script may be broken entirely. `master` will always be the stable branch, although slower to get new features.* -* master/main - The current release. *This branch is never committed to directly, only merged* -* nightly - The next upcoming release. All feature/fix/change branches are merged into this one. -* feature/fix/change - This is where the stuff currently being working on goes into. ---- +* master/main - The current release. *Never commit to this branch directly* +* nightly - The next upcoming release. All feature/fix/change branches are merged into this one +* feature/fix/change - This is where the stuff currently being working on goes into. + ### Scripting Style * Always use camelCase, even for event names. * Use a util function where possible. Keep raw logic in command/event/network handlers to a minimum. * Keep opening curly brackets in-line. Don't linebreak before an opening curly brackets. * Use sentence case instead of adjacent uppercase letters in class/member names. (i.e. Id instead of ID) * Use generic, non-specific class member names wherever possible. (i.e. databaseId instead of accountId) -* All communications from server to client are handled in server-side `client.js` script file via utils -* All communications from client to server are handled in client-side `server.js` script file via utils -* All server events are handled in `event.js` script file, sometimes with utils. ---- +* All communications from server <-> client are handled in each side's `netevents.js` script files via utils +* All server and client events are handled in each side's `event.js` script files, sometimes with utils. + ### Database Style -* Always use lowercase. -* Shorten prefix names to four characters or less (i.e. acct=account, veh=vehicle) +* Always use lowercase names for tables and fields +* Try to shorten prefix names to four characters or less (i.e. acct=account, veh=vehicle) * Add an underscore between each word * Append _main to any tables that store primary data (i.e. acct_main, ban_main, etc) * Prefix field names with the table name, except for _main tables (i.e. acct_id, job_loc_id) -* Tables use primary index on their ID column. -* Tables use both secondary indexes & cascading foreign key links to any ID that points to another table ---- +* Tables use primary key on their ID column +* Tables use both secondary keys & cascading foreign key links to any ID that points to another table +* Prefix table names with func_ if they are a custom function or procedure + ### Notes * The resource is designed to load the script files first, then initialize after that's done. +* The resource is designed to run on multiple servers. Each server needs a row in `svr_main` table with matching port and [game ID](https://wiki.gtaconnected.com/GameIdentifiers) * The IDEAS.md file is not a to-do list. It's just a random file to throw ideas into when they come to mind. -* Bitwise values are used for several different aspects related to permissions. The value of -1 is **always** used as "*all flags*" for that set. -* The script does not fade in the game camera. You'll need the [v-roleplay-intro](https://github.com/VortrexFTW/v-roleplay-intro) for that. -* The script does not contain any content except item types. You need to spawn all businesses, houses, vehicles, jobs, job routes, etc. +* Bitwise values are used for several different aspects, mostly related to permissions. +* Bitwise value of -1 is **always** used as "*all flags*" for that set. For admin permissions, -1 is god-tier admin level diff --git a/database.sql b/database.sql index 800381b5..c9a2f316 100644 --- a/database.sql +++ b/database.sql @@ -358,7 +358,7 @@ CREATE TABLE IF NOT EXISTS `biz_main` ( `biz_till` int(11) NOT NULL DEFAULT '0', `biz_entrance_fee` int(11) NOT NULL DEFAULT '0', `biz_deleted` tinyint(1) NOT NULL DEFAULT '0', - `biz_who_deleted` int(11) NOT NULL DEFAULT '479', + `biz_who_deleted` int(11) NOT NULL DEFAULT '1', `biz_when_deleted` bigint(20) NOT NULL DEFAULT '0', `biz_has_interior` tinyint(1) NOT NULL DEFAULT '0', `biz_interior_lights` tinyint(4) NOT NULL DEFAULT '1', @@ -420,9 +420,9 @@ CREATE TABLE IF NOT EXISTS `clan_main` ( `clan_owner` int(11) NOT NULL DEFAULT '0', `clan_created` int(11) NOT NULL DEFAULT '0', `clan_deleted` tinyint(4) NOT NULL DEFAULT '0', - `clan_who_deleted` int(11) NOT NULL DEFAULT '479', + `clan_who_deleted` int(11) NOT NULL DEFAULT '1', `clan_when_deleted` bigint(20) NOT NULL DEFAULT '0', - `clan_who_added` int(11) NOT NULL DEFAULT '479', + `clan_who_added` int(11) NOT NULL DEFAULT '1', `clan_when_added` bigint(20) NOT NULL DEFAULT '0', `clan_motd` varchar(128) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', `clan_col_r` int(11) NOT NULL DEFAULT '255', @@ -634,7 +634,7 @@ CREATE TABLE IF NOT EXISTS `house_main` ( `house_custom_interior` tinyint(4) NOT NULL DEFAULT '0', `house_deleted` tinyint(4) NOT NULL DEFAULT '0', `house_when_deleted` bigint(20) NOT NULL DEFAULT '0', - `house_who_deleted` int(11) NOT NULL DEFAULT '479', + `house_who_deleted` int(11) NOT NULL DEFAULT '1', `house_tax_exempt` tinyint(4) NOT NULL DEFAULT '0', `house_radio_station` int(11) NOT NULL DEFAULT '0', PRIMARY KEY (`house_id`) USING BTREE, @@ -793,9 +793,9 @@ CREATE TABLE IF NOT EXISTS `item_main` ( `item_value` int(11) NOT NULL DEFAULT '0', `item_enabled` tinyint(4) NOT NULL DEFAULT '0', `item_deleted` tinyint(4) NOT NULL DEFAULT '0', - `item_who_deleted` int(11) NOT NULL DEFAULT '479', + `item_who_deleted` int(11) NOT NULL DEFAULT '1', `item_when_deleted` bigint(20) NOT NULL DEFAULT '0', - `item_who_added` int(11) NOT NULL DEFAULT '479', + `item_who_added` int(11) NOT NULL DEFAULT '1', `item_when_added` bigint(20) NOT NULL DEFAULT '0', PRIMARY KEY (`item_id`), KEY `item_server` (`item_server`), @@ -855,9 +855,9 @@ CREATE TABLE IF NOT EXISTS `item_type` ( `item_type_anim_put` varchar(64) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'none', `item_type_anim_pickup` varchar(64) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'none', `item_type_deleted` tinyint(4) NOT NULL DEFAULT '0', - `item_type_who_deleted` int(11) NOT NULL DEFAULT '479', + `item_type_who_deleted` int(11) NOT NULL DEFAULT '1', `item_type_when_deleted` bigint(20) NOT NULL DEFAULT '0', - `item_type_who_added` int(11) NOT NULL DEFAULT '479', + `item_type_who_added` int(11) NOT NULL DEFAULT '1', `item_type_when_added` bigint(20) NOT NULL DEFAULT '0', PRIMARY KEY (`item_type_id`), KEY `item_type_server` (`item_type_server`), @@ -2307,9 +2307,9 @@ CREATE TABLE IF NOT EXISTS `job_equip` ( `job_equip_name` varchar(50) COLLATE utf8_unicode_ci NOT NULL DEFAULT '0', `job_equip_enabled` tinyint(1) NOT NULL DEFAULT '1', `job_equip_deleted` tinyint(1) NOT NULL DEFAULT '1', - `job_equip_who_deleted` int(11) NOT NULL DEFAULT '479', + `job_equip_who_deleted` int(11) NOT NULL DEFAULT '1', `job_equip_when_deleted` bigint(20) NOT NULL DEFAULT '0', - `job_equip_who_added` int(11) NOT NULL DEFAULT '479', + `job_equip_who_added` int(11) NOT NULL DEFAULT '1', `job_equip_when_added` bigint(20) NOT NULL DEFAULT '0', PRIMARY KEY (`job_equip_id`), KEY `job_equip_job` (`job_equip_job`), @@ -2330,9 +2330,9 @@ CREATE TABLE IF NOT EXISTS `job_equip_item` ( `job_equip_item_value` int(11) NOT NULL DEFAULT '0', `job_equip_item_enabled` tinyint(1) NOT NULL DEFAULT '1', `job_equip_item_deleted` tinyint(1) NOT NULL DEFAULT '0', - `job_equip_item_who_deleted` int(11) NOT NULL DEFAULT '479', + `job_equip_item_who_deleted` int(11) NOT NULL DEFAULT '1', `job_equip_item_when_deleted` bigint(20) NOT NULL DEFAULT '0', - `job_equip_item_who_added` int(11) NOT NULL DEFAULT '479', + `job_equip_item_who_added` int(11) NOT NULL DEFAULT '1', `job_equip_item_when_added` bigint(20) NOT NULL DEFAULT '0', PRIMARY KEY (`job_equip_item_id`) USING BTREE, KEY `job_equip_item_equip` (`job_equip_item_equip`), @@ -2360,9 +2360,9 @@ CREATE TABLE IF NOT EXISTS `job_loc` ( `job_loc_vw` int(11) NOT NULL DEFAULT '0', `job_loc_name` varchar(64) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', `job_loc_deleted` tinyint(4) NOT NULL DEFAULT '0', - `job_loc_who_deleted` int(11) NOT NULL DEFAULT '479', + `job_loc_who_deleted` int(11) NOT NULL DEFAULT '1', `job_loc_when_deleted` bigint(20) NOT NULL DEFAULT '0', - `job_loc_who_added` int(11) NOT NULL DEFAULT '479', + `job_loc_who_added` int(11) NOT NULL DEFAULT '1', `job_loc_when_added` bigint(20) NOT NULL DEFAULT '0', PRIMARY KEY (`job_loc_id`), KEY `job_loc_job` (`job_loc_job`), @@ -2394,9 +2394,9 @@ CREATE TABLE IF NOT EXISTS `job_main` ( `job_wl` tinyint(4) NOT NULL DEFAULT '0', `job_bl` tinyint(4) NOT NULL DEFAULT '0', `job_deleted` tinyint(4) NOT NULL DEFAULT '0', - `job_who_deleted` int(11) NOT NULL DEFAULT '479', + `job_who_deleted` int(11) NOT NULL DEFAULT '1', `job_when_deleted` bigint(20) NOT NULL DEFAULT '0', - `job_who_added` int(11) NOT NULL DEFAULT '479', + `job_who_added` int(11) NOT NULL DEFAULT '1', `job_when_added` bigint(20) NOT NULL DEFAULT '0', PRIMARY KEY (`job_id`), KEY `job_server` (`job_server`), @@ -2421,9 +2421,9 @@ CREATE TABLE IF NOT EXISTS `job_rank` ( `job_rank_flags` int(11) NOT NULL DEFAULT '0', `job_rank_pay` int(11) NOT NULL DEFAULT '0', `job_rank_deleted` int(11) NOT NULL DEFAULT '0', - `job_rank_who_deleted` int(11) NOT NULL DEFAULT '479', + `job_rank_who_deleted` int(11) NOT NULL DEFAULT '1', `job_rank_when_deleted` bigint(20) NOT NULL DEFAULT '0', - `job_rank_who_added` int(11) NOT NULL DEFAULT '479', + `job_rank_who_added` int(11) NOT NULL DEFAULT '1', `job_rank_when_added` bigint(20) NOT NULL DEFAULT '0', PRIMARY KEY (`job_rank_id`), KEY `fk_job_rank_job` (`job_rank_job`), @@ -2452,9 +2452,9 @@ CREATE TABLE IF NOT EXISTS `job_route` ( `job_route_pay` int(11) NOT NULL DEFAULT '0', `job_route_enabled` tinyint(4) NOT NULL DEFAULT '1', `job_route_deleted` tinyint(4) NOT NULL DEFAULT '0', - `job_route_who_deleted` int(11) NOT NULL DEFAULT '479', + `job_route_who_deleted` int(11) NOT NULL DEFAULT '1', `job_route_when_deleted` bigint(20) NOT NULL DEFAULT '0', - `job_route_who_added` int(11) NOT NULL DEFAULT '479', + `job_route_who_added` int(11) NOT NULL DEFAULT '1', `job_route_when_added` bigint(20) NOT NULL DEFAULT '0', PRIMARY KEY (`job_route_id`), KEY `fk_job_route_job` (`job_route_job`), @@ -2481,9 +2481,9 @@ CREATE TABLE IF NOT EXISTS `job_route_loc` ( `job_route_loc_delay` int(11) NOT NULL DEFAULT '0', `job_route_loc_pay` int(11) NOT NULL DEFAULT '0', `job_route_loc_deleted` tinyint(4) NOT NULL DEFAULT '0', - `job_route_loc_who_deleted` int(11) NOT NULL DEFAULT '479', + `job_route_loc_who_deleted` int(11) NOT NULL DEFAULT '1', `job_route_loc_when_deleted` bigint(20) NOT NULL DEFAULT '0', - `job_route_loc_who_added` int(11) NOT NULL DEFAULT '479', + `job_route_loc_who_added` int(11) NOT NULL DEFAULT '1', `job_route_loc_when_added` bigint(20) NOT NULL DEFAULT '0', `job_route_loc_goto_msg` varchar(128) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', `job_route_loc_arrive_msg` varchar(128) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', @@ -2507,9 +2507,9 @@ CREATE TABLE IF NOT EXISTS `job_uniform` ( `job_uniform_minrank` int(11) NOT NULL DEFAULT '0', `job_uniform_name` varchar(50) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'Unnamed', `job_uniform_deleted` tinyint(4) NOT NULL DEFAULT '0', - `job_uniform_who_deleted` int(11) NOT NULL DEFAULT '479', + `job_uniform_who_deleted` int(11) NOT NULL DEFAULT '1', `job_uniform_when_deleted` bigint(20) NOT NULL DEFAULT '0', - `job_uniform_who_added` int(11) NOT NULL DEFAULT '479', + `job_uniform_who_added` int(11) NOT NULL DEFAULT '1', `job_uniform_when_added` bigint(20) NOT NULL DEFAULT '0', PRIMARY KEY (`job_uniform_id`), KEY `job_uniform_job` (`job_uniform_job`), @@ -3119,7 +3119,7 @@ CREATE TABLE IF NOT EXISTS `veh_main` ( `veh_ins_acct` tinyint(1) NOT NULL DEFAULT '0', `veh_price` int(11) NOT NULL DEFAULT '0', `veh_deleted` tinyint(1) NOT NULL DEFAULT '0', - `veh_who_deleted` int(11) NOT NULL DEFAULT '479', + `veh_who_deleted` int(11) NOT NULL DEFAULT '1', `veh_when_deleted` bigint(20) NOT NULL DEFAULT '0', `veh_flags` int(11) NOT NULL DEFAULT '0', `veh_spawn_lock` tinyint(1) NOT NULL DEFAULT '0', diff --git a/meta.xml b/meta.xml index 1ca42fd2..a61384ee 100644 --- a/meta.xml +++ b/meta.xml @@ -1,5 +1,5 @@ - +