Update from master (merge error)
This commit is contained in:
194
COMMANDS.md
Normal file
194
COMMANDS.md
Normal file
@@ -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
|
||||||
9
IDEAS.md
9
IDEAS.md
@@ -1,9 +1,10 @@
|
|||||||
# Ideas
|
# 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.**
|
**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*
|
*Inspiration from GTA Online*
|
||||||
|
|
||||||
* Nightclubs
|
* Nightclubs
|
||||||
* Executive Offices
|
* Executive Offices
|
||||||
* Warehouses
|
* Warehouses
|
||||||
@@ -12,7 +13,7 @@
|
|||||||
* Garages
|
* Garages
|
||||||
* Casinos
|
* 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*
|
*Inspiration from Skyrim and many other RPGs*
|
||||||
|
|
||||||
* Procedurally generated?
|
* 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
|
### Item/Object pickup and move
|
||||||
*Inspiration from the 3D Fallout games*
|
*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
|
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
|
||||||
|
|||||||
54
README.md
54
README.md
@@ -2,53 +2,59 @@
|
|||||||
|
|
||||||
### Description
|
### Description
|
||||||
This is Vortrex's Roleplay Resource
|
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
|
## Setup
|
||||||
* Download the server from the [downloads page](https://gtaconnected.com/downloads) of the GTA Connected website.
|
* 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.
|
* 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 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.
|
* 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.
|
* (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.
|
* 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!
|
* You now have full admin. Enjoy the resource!
|
||||||
---
|
|
||||||
## Modules
|
## Modules
|
||||||
* [MySQL](https://github.com/VortrexFTW/mod_mysql)
|
* [MySQL](https://github.com/VortrexFTW/mod_mysql)
|
||||||
* [Hashing](https://github.com/VortrexFTW/mod_hashing)
|
* [Hashing](https://github.com/VortrexFTW/mod_hashing)
|
||||||
* [SMTP](https://github.com/VortrexFTW/mod_smtp) (Optional)
|
* [SMTP](https://github.com/VortrexFTW/mod_smtp) (Optional)
|
||||||
---
|
|
||||||
### Git Branches
|
### 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. *Never commit to this branch directly*
|
||||||
* 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
|
||||||
* 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.
|
||||||
* feature/fix/change - This is where the stuff currently being working on goes into.
|
|
||||||
---
|
|
||||||
### Scripting Style
|
### Scripting Style
|
||||||
* Always use camelCase, even for event names.
|
* Always use camelCase, even for event names.
|
||||||
* Use a util function where possible. Keep raw logic in command/event/network handlers to a minimum.
|
* 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.
|
* 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 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)
|
* 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 server <-> client are handled in each side's `netevents.js` script files via utils
|
||||||
* All communications from client to server are handled in client-side `server.js` script file via utils
|
* All server and client events are handled in each side's `event.js` script files, sometimes with utils.
|
||||||
* All server events are handled in `event.js` script file, sometimes with utils.
|
|
||||||
---
|
|
||||||
### Database Style
|
### Database Style
|
||||||
* Always use lowercase.
|
* Always use lowercase names for tables and fields
|
||||||
* Shorten prefix names to four characters or less (i.e. acct=account, veh=vehicle)
|
* Try to shorten prefix names to four characters or less (i.e. acct=account, veh=vehicle)
|
||||||
* Add an underscore between each word
|
* Add an underscore between each word
|
||||||
* Append _main to any tables that store primary data (i.e. acct_main, ban_main, etc)
|
* 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)
|
* 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 primary key on their ID column
|
||||||
* Tables use both secondary indexes & cascading foreign key links to any ID that points to another table
|
* 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
|
### Notes
|
||||||
* The resource is designed to load the script files first, then initialize after that's done.
|
* 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.
|
* 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.
|
* Bitwise values are used for several different aspects, mostly related to permissions.
|
||||||
* 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.
|
* Bitwise value of -1 is **always** used as "*all flags*" for that set. For admin permissions, -1 is god-tier admin level
|
||||||
* The script does not contain any content except item types. You need to spawn all businesses, houses, vehicles, jobs, job routes, etc.
|
|
||||||
|
|||||||
50
database.sql
50
database.sql
@@ -358,7 +358,7 @@ CREATE TABLE IF NOT EXISTS `biz_main` (
|
|||||||
`biz_till` int(11) NOT NULL DEFAULT '0',
|
`biz_till` int(11) NOT NULL DEFAULT '0',
|
||||||
`biz_entrance_fee` int(11) NOT NULL DEFAULT '0',
|
`biz_entrance_fee` int(11) NOT NULL DEFAULT '0',
|
||||||
`biz_deleted` tinyint(1) 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_when_deleted` bigint(20) NOT NULL DEFAULT '0',
|
||||||
`biz_has_interior` tinyint(1) NOT NULL DEFAULT '0',
|
`biz_has_interior` tinyint(1) NOT NULL DEFAULT '0',
|
||||||
`biz_interior_lights` tinyint(4) NOT NULL DEFAULT '1',
|
`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_owner` int(11) NOT NULL DEFAULT '0',
|
||||||
`clan_created` int(11) NOT NULL DEFAULT '0',
|
`clan_created` int(11) NOT NULL DEFAULT '0',
|
||||||
`clan_deleted` tinyint(4) 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_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_when_added` bigint(20) NOT NULL DEFAULT '0',
|
||||||
`clan_motd` varchar(128) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
|
`clan_motd` varchar(128) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
|
||||||
`clan_col_r` int(11) NOT NULL DEFAULT '255',
|
`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_custom_interior` tinyint(4) NOT NULL DEFAULT '0',
|
||||||
`house_deleted` tinyint(4) NOT NULL DEFAULT '0',
|
`house_deleted` tinyint(4) NOT NULL DEFAULT '0',
|
||||||
`house_when_deleted` bigint(20) 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_tax_exempt` tinyint(4) NOT NULL DEFAULT '0',
|
||||||
`house_radio_station` int(11) NOT NULL DEFAULT '0',
|
`house_radio_station` int(11) NOT NULL DEFAULT '0',
|
||||||
PRIMARY KEY (`house_id`) USING BTREE,
|
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_value` int(11) NOT NULL DEFAULT '0',
|
||||||
`item_enabled` tinyint(4) NOT NULL DEFAULT '0',
|
`item_enabled` tinyint(4) NOT NULL DEFAULT '0',
|
||||||
`item_deleted` 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_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',
|
`item_when_added` bigint(20) NOT NULL DEFAULT '0',
|
||||||
PRIMARY KEY (`item_id`),
|
PRIMARY KEY (`item_id`),
|
||||||
KEY `item_server` (`item_server`),
|
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_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_anim_pickup` varchar(64) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'none',
|
||||||
`item_type_deleted` tinyint(4) NOT NULL DEFAULT '0',
|
`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_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',
|
`item_type_when_added` bigint(20) NOT NULL DEFAULT '0',
|
||||||
PRIMARY KEY (`item_type_id`),
|
PRIMARY KEY (`item_type_id`),
|
||||||
KEY `item_type_server` (`item_type_server`),
|
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_name` varchar(50) COLLATE utf8_unicode_ci NOT NULL DEFAULT '0',
|
||||||
`job_equip_enabled` tinyint(1) NOT NULL DEFAULT '1',
|
`job_equip_enabled` tinyint(1) NOT NULL DEFAULT '1',
|
||||||
`job_equip_deleted` 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_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',
|
`job_equip_when_added` bigint(20) NOT NULL DEFAULT '0',
|
||||||
PRIMARY KEY (`job_equip_id`),
|
PRIMARY KEY (`job_equip_id`),
|
||||||
KEY `job_equip_job` (`job_equip_job`),
|
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_value` int(11) NOT NULL DEFAULT '0',
|
||||||
`job_equip_item_enabled` tinyint(1) NOT NULL DEFAULT '1',
|
`job_equip_item_enabled` tinyint(1) NOT NULL DEFAULT '1',
|
||||||
`job_equip_item_deleted` tinyint(1) NOT NULL DEFAULT '0',
|
`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_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',
|
`job_equip_item_when_added` bigint(20) NOT NULL DEFAULT '0',
|
||||||
PRIMARY KEY (`job_equip_item_id`) USING BTREE,
|
PRIMARY KEY (`job_equip_item_id`) USING BTREE,
|
||||||
KEY `job_equip_item_equip` (`job_equip_item_equip`),
|
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_vw` int(11) NOT NULL DEFAULT '0',
|
||||||
`job_loc_name` varchar(64) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
|
`job_loc_name` varchar(64) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
|
||||||
`job_loc_deleted` tinyint(4) NOT NULL DEFAULT '0',
|
`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_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',
|
`job_loc_when_added` bigint(20) NOT NULL DEFAULT '0',
|
||||||
PRIMARY KEY (`job_loc_id`),
|
PRIMARY KEY (`job_loc_id`),
|
||||||
KEY `job_loc_job` (`job_loc_job`),
|
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_wl` tinyint(4) NOT NULL DEFAULT '0',
|
||||||
`job_bl` tinyint(4) NOT NULL DEFAULT '0',
|
`job_bl` tinyint(4) NOT NULL DEFAULT '0',
|
||||||
`job_deleted` 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_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',
|
`job_when_added` bigint(20) NOT NULL DEFAULT '0',
|
||||||
PRIMARY KEY (`job_id`),
|
PRIMARY KEY (`job_id`),
|
||||||
KEY `job_server` (`job_server`),
|
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_flags` int(11) NOT NULL DEFAULT '0',
|
||||||
`job_rank_pay` 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_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_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',
|
`job_rank_when_added` bigint(20) NOT NULL DEFAULT '0',
|
||||||
PRIMARY KEY (`job_rank_id`),
|
PRIMARY KEY (`job_rank_id`),
|
||||||
KEY `fk_job_rank_job` (`job_rank_job`),
|
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_pay` int(11) NOT NULL DEFAULT '0',
|
||||||
`job_route_enabled` tinyint(4) NOT NULL DEFAULT '1',
|
`job_route_enabled` tinyint(4) NOT NULL DEFAULT '1',
|
||||||
`job_route_deleted` tinyint(4) NOT NULL DEFAULT '0',
|
`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_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',
|
`job_route_when_added` bigint(20) NOT NULL DEFAULT '0',
|
||||||
PRIMARY KEY (`job_route_id`),
|
PRIMARY KEY (`job_route_id`),
|
||||||
KEY `fk_job_route_job` (`job_route_job`),
|
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_delay` int(11) NOT NULL DEFAULT '0',
|
||||||
`job_route_loc_pay` 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_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_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_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_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 '',
|
`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_minrank` int(11) NOT NULL DEFAULT '0',
|
||||||
`job_uniform_name` varchar(50) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'Unnamed',
|
`job_uniform_name` varchar(50) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'Unnamed',
|
||||||
`job_uniform_deleted` tinyint(4) NOT NULL DEFAULT '0',
|
`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_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',
|
`job_uniform_when_added` bigint(20) NOT NULL DEFAULT '0',
|
||||||
PRIMARY KEY (`job_uniform_id`),
|
PRIMARY KEY (`job_uniform_id`),
|
||||||
KEY `job_uniform_job` (`job_uniform_job`),
|
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_ins_acct` tinyint(1) NOT NULL DEFAULT '0',
|
||||||
`veh_price` int(11) NOT NULL DEFAULT '0',
|
`veh_price` int(11) NOT NULL DEFAULT '0',
|
||||||
`veh_deleted` tinyint(1) 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_when_deleted` bigint(20) NOT NULL DEFAULT '0',
|
||||||
`veh_flags` int(11) NOT NULL DEFAULT '0',
|
`veh_flags` int(11) NOT NULL DEFAULT '0',
|
||||||
`veh_spawn_lock` tinyint(1) NOT NULL DEFAULT '0',
|
`veh_spawn_lock` tinyint(1) NOT NULL DEFAULT '0',
|
||||||
|
|||||||
2
meta.xml
2
meta.xml
@@ -1,5 +1,5 @@
|
|||||||
<meta>
|
<meta>
|
||||||
<info author="Vortrex" version="1.0" description="Asshat Gaming Roleplay - Main Script" />
|
<info author="Vortrex" version="1.0" description="Vortrex's Roleplay Resource - Main Script" />
|
||||||
|
|
||||||
<!-- Shared -->
|
<!-- Shared -->
|
||||||
<script src="scripts/shared/const.js" type="server" language="javascript" />
|
<script src="scripts/shared/const.js" type="server" language="javascript" />
|
||||||
|
|||||||
@@ -9,8 +9,8 @@
|
|||||||
|
|
||||||
// Init AFK script
|
// Init AFK script
|
||||||
function initAFKScript() {
|
function initAFKScript() {
|
||||||
logToConsole(LOG_DEBUG, "[AGRP.AFK]: Initializing AFK script ...");
|
logToConsole(LOG_DEBUG, "[V.RP.AFK]: Initializing AFK script ...");
|
||||||
logToConsole(LOG_DEBUG, "[AGRP.AFK]: AFK script initialized!");
|
logToConsole(LOG_DEBUG, "[V.RP.AFK]: AFK script initialized!");
|
||||||
}
|
}
|
||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|||||||
@@ -8,8 +8,8 @@
|
|||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
function initAnimationScript() {
|
function initAnimationScript() {
|
||||||
logToConsole(LOG_DEBUG, "[AGRP.Animation]: Initializing animation script ...");
|
logToConsole(LOG_DEBUG, "[V.RP.Animation]: Initializing animation script ...");
|
||||||
logToConsole(LOG_DEBUG, "[AGRP.Animation]: Animation script initialized!");
|
logToConsole(LOG_DEBUG, "[V.RP.Animation]: Animation script initialized!");
|
||||||
}
|
}
|
||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|||||||
@@ -29,8 +29,8 @@ class BusinessData {
|
|||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
function initBusinessScript() {
|
function initBusinessScript() {
|
||||||
logToConsole(LOG_DEBUG, "[AGRP.Business]: Initializing business script ...");
|
logToConsole(LOG_DEBUG, "[V.RP.Business]: Initializing business script ...");
|
||||||
logToConsole(LOG_INFO, "[AGRP.Business]: Business script initialized!");
|
logToConsole(LOG_INFO, "[V.RP.Business]: Business script initialized!");
|
||||||
}
|
}
|
||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|||||||
@@ -28,11 +28,11 @@ let scrollDownKey = false;
|
|||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
function initChatBoxScript() {
|
function initChatBoxScript() {
|
||||||
logToConsole(LOG_DEBUG, "[AGRP.Chat]: Initializing chat script ...");
|
logToConsole(LOG_DEBUG, "[V.RP.Chat]: Initializing chat script ...");
|
||||||
scrollUpKey = getKeyIdFromParams("pageup");
|
scrollUpKey = getKeyIdFromParams("pageup");
|
||||||
scrollDownKey = getKeyIdFromParams("pagedown");
|
scrollDownKey = getKeyIdFromParams("pagedown");
|
||||||
bindChatBoxKeys();
|
bindChatBoxKeys();
|
||||||
logToConsole(LOG_INFO, "[AGRP.Chat]: Chat script initialized!");
|
logToConsole(LOG_INFO, "[V.RP.Chat]: Chat script initialized!");
|
||||||
}
|
}
|
||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|||||||
@@ -14,14 +14,14 @@ let cursorSize = toVector2(16.0, 24.0);
|
|||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
function initCursorScript() {
|
function initCursorScript() {
|
||||||
logToConsole(LOG_DEBUG, "[AGRP.Cursor]: Initializing cursor script ...");
|
logToConsole(LOG_DEBUG, "[V.RP.Cursor]: Initializing cursor script ...");
|
||||||
let cursorStream = openFile(cursorImagePath);
|
let cursorStream = openFile(cursorImagePath);
|
||||||
if (cursorStream != null) {
|
if (cursorStream != null) {
|
||||||
cursorImage = graphics.loadPNG(cursorStream);
|
cursorImage = graphics.loadPNG(cursorStream);
|
||||||
cursorStream.close();
|
cursorStream.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
logToConsole(LOG_INFO, "[AGRP.Cursor]: Cursor script initialized!");
|
logToConsole(LOG_INFO, "[V.RP.Cursor]: Cursor script initialized!");
|
||||||
}
|
}
|
||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|||||||
@@ -8,9 +8,9 @@
|
|||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
function initEventScript() {
|
function initEventScript() {
|
||||||
logToConsole(LOG_DEBUG, "[AGRP.Event]: Initializing event script ...");
|
logToConsole(LOG_DEBUG, "[V.RP.Event]: Initializing event script ...");
|
||||||
addAllEventHandlers();
|
addAllEventHandlers();
|
||||||
logToConsole(LOG_DEBUG, "[AGRP.Event]: Event script initialized!");
|
logToConsole(LOG_DEBUG, "[V.RP.Event]: Event script initialized!");
|
||||||
}
|
}
|
||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|||||||
@@ -40,8 +40,8 @@ let creatingCharacter = false;
|
|||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
function initGUIScript() {
|
function initGUIScript() {
|
||||||
logToConsole(LOG_DEBUG, "[AGRP.GUI]: Initializing GUI script ...");
|
logToConsole(LOG_DEBUG, "[V.RP.GUI]: Initializing GUI script ...");
|
||||||
logToConsole(LOG_DEBUG, "[AGRP.GUI]: GUI script initialized!");
|
logToConsole(LOG_DEBUG, "[V.RP.GUI]: GUI script initialized!");
|
||||||
}
|
}
|
||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ let newCharacter = {
|
|||||||
|
|
||||||
function initNewCharacterGUI() {
|
function initNewCharacterGUI() {
|
||||||
logToConsole(LOG_DEBUG, `[AGRP.GUI] Creating new character GUI ...`);
|
logToConsole(LOG_DEBUG, `[AGRP.GUI] Creating new character GUI ...`);
|
||||||
newCharacter.window = mexui.window(getScreenWidth() / 2 - 130, getScreenHeight() / 2 - 115, 300, 230, 'NEW CHARACTER', {
|
newCharacter.window = mexui.window(getScreenWidth() / 2 - 150, getScreenHeight() / 2 - 115, 300, 230, 'NEW CHARACTER', {
|
||||||
main: {
|
main: {
|
||||||
backgroundColour: toColour(secondaryColour[0], secondaryColour[1], secondaryColour[2], windowAlpha),
|
backgroundColour: toColour(secondaryColour[0], secondaryColour[1], secondaryColour[2], windowAlpha),
|
||||||
transitionTime: 500,
|
transitionTime: 500,
|
||||||
@@ -42,7 +42,7 @@ function initNewCharacterGUI() {
|
|||||||
newCharacter.window.titleBarShown = false;
|
newCharacter.window.titleBarShown = false;
|
||||||
newCharacter.window.titleBarHeight = 30;
|
newCharacter.window.titleBarHeight = 30;
|
||||||
|
|
||||||
newCharacter.mainLogoImage = newCharacter.window.image(80, 20, 80, 80, mainLogoPath, {
|
newCharacter.mainLogoImage = newCharacter.window.image(100, 10, 100, 100, mainLogoPath, {
|
||||||
focused: {
|
focused: {
|
||||||
borderColour: toColour(0, 0, 0, 0),
|
borderColour: toColour(0, 0, 0, 0),
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -16,8 +16,8 @@ let itemActionDelaySize = toVector2(200, 5);
|
|||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
function initItemScript() {
|
function initItemScript() {
|
||||||
logToConsole(LOG_DEBUG, "[AGRP.Item]: Initializing item script ...");
|
logToConsole(LOG_DEBUG, "[V.RP.Item]: Initializing item script ...");
|
||||||
logToConsole(LOG_DEBUG, "[AGRP.Item]: Item script initialized!");
|
logToConsole(LOG_DEBUG, "[V.RP.Item]: Item script initialized!");
|
||||||
}
|
}
|
||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|||||||
@@ -35,8 +35,8 @@ class JobData {
|
|||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
function initJobScript() {
|
function initJobScript() {
|
||||||
logToConsole(LOG_DEBUG, "[AGRP.Job]: Initializing job script ...");
|
logToConsole(LOG_DEBUG, "[V.RP.Job]: Initializing job script ...");
|
||||||
logToConsole(LOG_DEBUG, "[AGRP.Job]: Job script initialized!");
|
logToConsole(LOG_DEBUG, "[V.RP.Job]: Job script initialized!");
|
||||||
}
|
}
|
||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|||||||
@@ -16,8 +16,8 @@ let keyBindLongHoldDuration = 1500;
|
|||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
function initKeyBindScript() {
|
function initKeyBindScript() {
|
||||||
logToConsole(LOG_DEBUG, "[AGRP.KeyBind]: Initializing key bind script ...");
|
logToConsole(LOG_DEBUG, "[V.RP.KeyBind]: Initializing key bind script ...");
|
||||||
logToConsole(LOG_DEBUG, "[AGRP.KeyBind]: Key bind script initialized!");
|
logToConsole(LOG_DEBUG, "[V.RP.KeyBind]: Key bind script initialized!");
|
||||||
}
|
}
|
||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|||||||
@@ -30,12 +30,12 @@ let jobHelpColour = toColour(234, 198, 126, 255);
|
|||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
function initLabelScript() {
|
function initLabelScript() {
|
||||||
logToConsole(LOG_DEBUG, "[AGRP.Label]: Initializing label script ...");
|
logToConsole(LOG_DEBUG, "[V.RP.Label]: Initializing label script ...");
|
||||||
propertyLabelNameFont = initLabelPropertyNameFont();
|
propertyLabelNameFont = initLabelPropertyNameFont();
|
||||||
propertyLabelLockedFont = initLabelPropertyLockedFont();
|
propertyLabelLockedFont = initLabelPropertyLockedFont();
|
||||||
jobNameLabelFont = initLabelJobNameFont();
|
jobNameLabelFont = initLabelJobNameFont();
|
||||||
jobHelpLabelFont = initLabelJobHelpFont();
|
jobHelpLabelFont = initLabelJobHelpFont();
|
||||||
logToConsole(LOG_DEBUG, "[AGRP.Label]: Label script initialized!");
|
logToConsole(LOG_DEBUG, "[V.RP.Label]: Label script initialized!");
|
||||||
}
|
}
|
||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
@@ -79,12 +79,12 @@ function renderPropertyEntranceLabel(name, position, locked, isBusiness, price,
|
|||||||
|
|
||||||
if (getGame() == V_GAME_GTA_IV) {
|
if (getGame() == V_GAME_GTA_IV) {
|
||||||
if (!natives.doesViewportExist(natives.getGameViewportId())) {
|
if (!natives.doesViewportExist(natives.getGameViewportId())) {
|
||||||
logToConsole(LOG_INFO, "[AGRP.Label]: Game viewport does not exist!");
|
logToConsole(LOG_INFO, "[V.RP.Label]: Game viewport does not exist!");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!natives.isViewportActive(natives.getGameViewportId())) {
|
if (!natives.isViewportActive(natives.getGameViewportId())) {
|
||||||
logToConsole(LOG_INFO, "[AGRP.Label]: Game viewport is not active!");
|
logToConsole(LOG_INFO, "[V.RP.Label]: Game viewport is not active!");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -220,12 +220,12 @@ function renderPropertyExitLabel(position) {
|
|||||||
|
|
||||||
if (getGame() == V_GAME_GTA_IV) {
|
if (getGame() == V_GAME_GTA_IV) {
|
||||||
if (!natives.doesViewportExist(natives.getGameViewportId())) {
|
if (!natives.doesViewportExist(natives.getGameViewportId())) {
|
||||||
logToConsole(LOG_INFO, "[AGRP.Label]: Game viewport does not exist!");
|
logToConsole(LOG_INFO, "[V.RP.Label]: Game viewport does not exist!");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!natives.isViewportActive(natives.getGameViewportId())) {
|
if (!natives.isViewportActive(natives.getGameViewportId())) {
|
||||||
logToConsole(LOG_INFO, "[AGRP.Label]: Game viewport is not active!");
|
logToConsole(LOG_INFO, "[V.RP.Label]: Game viewport is not active!");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -265,12 +265,12 @@ function renderJobLabel(name, position, jobType) {
|
|||||||
|
|
||||||
if (getGame() == V_GAME_GTA_IV) {
|
if (getGame() == V_GAME_GTA_IV) {
|
||||||
if (!natives.doesViewportExist(natives.getGameViewportId())) {
|
if (!natives.doesViewportExist(natives.getGameViewportId())) {
|
||||||
logToConsole(LOG_INFO, "[AGRP.Label]: Game viewport does not exist!");
|
logToConsole(LOG_INFO, "[V.RP.Label]: Game viewport does not exist!");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!natives.isViewportActive(natives.getGameViewportId())) {
|
if (!natives.isViewportActive(natives.getGameViewportId())) {
|
||||||
logToConsole(LOG_INFO, "[AGRP.Label]: Game viewport is not active!");
|
logToConsole(LOG_INFO, "[V.RP.Label]: Game viewport is not active!");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,9 +14,9 @@ let logoSize = toVector2(128, 128);
|
|||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
function initLogoScript() {
|
function initLogoScript() {
|
||||||
logToConsole(LOG_DEBUG, "[AGRP.Logo]: Initializing logo script ...");
|
logToConsole(LOG_DEBUG, "[V.RP.Logo]: Initializing logo script ...");
|
||||||
//logoImage = loadLogoImage();
|
//logoImage = loadLogoImage();
|
||||||
logToConsole(LOG_DEBUG, "[AGRP.Logo]: Logo script initialized!");
|
logToConsole(LOG_DEBUG, "[V.RP.Logo]: Logo script initialized!");
|
||||||
}
|
}
|
||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|||||||
@@ -22,10 +22,10 @@ let smallGameMessageTimer = null;
|
|||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
function initMessagingScript() {
|
function initMessagingScript() {
|
||||||
logToConsole(LOG_DEBUG, "[AGRP.Messaging]: Initializing messaging script ...");
|
logToConsole(LOG_DEBUG, "[V.RP.Messaging]: Initializing messaging script ...");
|
||||||
smallGameMessageFonts = loadSmallGameMessageFonts();
|
smallGameMessageFonts = loadSmallGameMessageFonts();
|
||||||
bigGameMessageFonts = loadSmallGameMessageFonts();
|
bigGameMessageFonts = loadSmallGameMessageFonts();
|
||||||
logToConsole(LOG_DEBUG, "[AGRP.Messaging]: Messaging script initialized!");
|
logToConsole(LOG_DEBUG, "[V.RP.Messaging]: Messaging script initialized!");
|
||||||
}
|
}
|
||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
@@ -75,7 +75,7 @@ function loadBigGameMessageFont() {
|
|||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
function processSmallGameMessageRendering() {
|
function processSmallGameMessageRendering() {
|
||||||
logToConsole(LOG_VERBOSE, "[AGRP.Messaging]: Processing small game message rendering ...");
|
logToConsole(LOG_VERBOSE, "[V.RP.Messaging]: Processing small game message rendering ...");
|
||||||
if (renderSmallGameMessage) {
|
if (renderSmallGameMessage) {
|
||||||
if (smallGameMessageText != "") {
|
if (smallGameMessageText != "") {
|
||||||
logToConsole(LOG_VERBOSE, `[AGRP.Messaging]: Rendering small game message: ${smallGameMessageText}`);
|
logToConsole(LOG_VERBOSE, `[AGRP.Messaging]: Rendering small game message: ${smallGameMessageText}`);
|
||||||
|
|||||||
@@ -22,10 +22,10 @@ let playerPing = {};
|
|||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
function initNameTagScript() {
|
function initNameTagScript() {
|
||||||
logToConsole(LOG_DEBUG, "[AGRP.NameTag]: Initializing nametag script ...");
|
logToConsole(LOG_DEBUG, "[V.RP.NameTag]: Initializing nametag script ...");
|
||||||
nametagFont = loadNameTagFont();
|
nametagFont = loadNameTagFont();
|
||||||
afkStatusFont = loadPausedStatusFont();
|
afkStatusFont = loadPausedStatusFont();
|
||||||
logToConsole(LOG_DEBUG, "[AGRP.NameTag]: Nametag script initialized!");
|
logToConsole(LOG_DEBUG, "[V.RP.NameTag]: Nametag script initialized!");
|
||||||
}
|
}
|
||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|||||||
@@ -8,14 +8,14 @@
|
|||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
function initNetworkEventsScript() {
|
function initNetworkEventsScript() {
|
||||||
logToConsole(LOG_DEBUG, "[AGRP.NetEvents]: Initializing server script ...");
|
logToConsole(LOG_DEBUG, "[V.RP.NetEvents]: Initializing server script ...");
|
||||||
logToConsole(LOG_DEBUG, "[AGRP.NetEvents]: Server script initialized!");
|
logToConsole(LOG_DEBUG, "[V.RP.NetEvents]: Server script initialized!");
|
||||||
}
|
}
|
||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
function addAllNetworkHandlers() {
|
function addAllNetworkHandlers() {
|
||||||
logToConsole(LOG_DEBUG, "[AGRP.Server]: Adding network handlers ...");
|
logToConsole(LOG_DEBUG, "[V.RP.Server]: Adding network handlers ...");
|
||||||
|
|
||||||
// Chat Box
|
// Chat Box
|
||||||
addNetworkEventHandler("m", receiveChatBoxMessageFromServer); // Not prefixed with VRR to make it as small as possible
|
addNetworkEventHandler("m", receiveChatBoxMessageFromServer); // Not prefixed with VRR to make it as small as possible
|
||||||
|
|||||||
@@ -23,10 +23,10 @@ let skinSelectHeading = null;
|
|||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
function initSkinSelectScript() {
|
function initSkinSelectScript() {
|
||||||
logToConsole(LOG_DEBUG, "[AGRP.SkinSelect]: Initializing skin selector script ...");
|
logToConsole(LOG_DEBUG, "[V.RP.SkinSelect]: Initializing skin selector script ...");
|
||||||
skinSelectMessageFontTop = loadSkinSelectMessageFontTop();
|
skinSelectMessageFontTop = loadSkinSelectMessageFontTop();
|
||||||
skinSelectMessageFontBottom = loadSkinSelectMessageFontBottom();
|
skinSelectMessageFontBottom = loadSkinSelectMessageFontBottom();
|
||||||
logToConsole(LOG_DEBUG, "[AGRP.SkinSelect]: Skin selector script initialized!");
|
logToConsole(LOG_DEBUG, "[V.RP.SkinSelect]: Skin selector script initialized!");
|
||||||
}
|
}
|
||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|||||||
@@ -194,8 +194,8 @@ class AccountStaffNoteData {
|
|||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
function initAccountScript() {
|
function initAccountScript() {
|
||||||
logToConsole(LOG_DEBUG, "[AGRP.Account]: Initializing account script ...");
|
logToConsole(LOG_DEBUG, "[V.RP.Account]: Initializing account script ...");
|
||||||
logToConsole(LOG_DEBUG, "[AGRP.Account]: Account script initialized!");
|
logToConsole(LOG_DEBUG, "[V.RP.Account]: Account script initialized!");
|
||||||
}
|
}
|
||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
@@ -1403,11 +1403,11 @@ function isValidEmailAddress(emailAddress) {
|
|||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
function saveAllPlayersToDatabase() {
|
function saveAllPlayersToDatabase() {
|
||||||
logToConsole(LOG_DEBUG, "[AGRP.Account]: Saving all clients to database ...");
|
logToConsole(LOG_DEBUG, "[V.RP.Account]: Saving all clients to database ...");
|
||||||
getClients().forEach(function (client) {
|
getClients().forEach(function (client) {
|
||||||
savePlayerToDatabase(client);
|
savePlayerToDatabase(client);
|
||||||
});
|
});
|
||||||
logToConsole(LOG_DEBUG, "[AGRP.Account]: All clients saved to database successfully!");
|
logToConsole(LOG_DEBUG, "[V.RP.Account]: All clients saved to database successfully!");
|
||||||
}
|
}
|
||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|||||||
@@ -8,8 +8,8 @@
|
|||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
function initAnimationScript() {
|
function initAnimationScript() {
|
||||||
logToConsole(LOG_DEBUG, "[AGRP.Animation]: Initializing animation script ...");
|
logToConsole(LOG_DEBUG, "[V.RP.Animation]: Initializing animation script ...");
|
||||||
logToConsole(LOG_DEBUG, "[AGRP.Animation]: Animation script initialized!");
|
logToConsole(LOG_DEBUG, "[V.RP.Animation]: Animation script initialized!");
|
||||||
}
|
}
|
||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|||||||
@@ -8,8 +8,8 @@
|
|||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
function initAntiCheatScript() {
|
function initAntiCheatScript() {
|
||||||
logToConsole(LOG_DEBUG, "[AGRP.AntiCheat]: Initializing anticheat script ...");
|
logToConsole(LOG_DEBUG, "[V.RP.AntiCheat]: Initializing anticheat script ...");
|
||||||
logToConsole(LOG_DEBUG, "[AGRP.AntiCheat]: Anticheat script initialized!");
|
logToConsole(LOG_DEBUG, "[V.RP.AntiCheat]: Anticheat script initialized!");
|
||||||
}
|
}
|
||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|||||||
@@ -38,8 +38,8 @@ class BanData {
|
|||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
function initBanScript() {
|
function initBanScript() {
|
||||||
logToConsole(LOG_INFO, "[AGRP.Ban]: Initializing ban script ...");
|
logToConsole(LOG_INFO, "[V.RP.Ban]: Initializing ban script ...");
|
||||||
logToConsole(LOG_INFO, "[AGRP.Ban]: Ban script initialized!");
|
logToConsole(LOG_INFO, "[V.RP.Ban]: Ban script initialized!");
|
||||||
}
|
}
|
||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|||||||
@@ -280,7 +280,7 @@ let serverBitFlagKeys = {
|
|||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
function initBitFlagScript() {
|
function initBitFlagScript() {
|
||||||
logToConsole(LOG_DEBUG, "[AGRP.BitFlag]: Initializing bit flag script ...");
|
logToConsole(LOG_DEBUG, "[V.RP.BitFlag]: Initializing bit flag script ...");
|
||||||
serverBitFlags.staffFlags = createBitFlagTable(serverBitFlagKeys.staffFlagKeys);
|
serverBitFlags.staffFlags = createBitFlagTable(serverBitFlagKeys.staffFlagKeys);
|
||||||
serverBitFlags.moderationFlags = createBitFlagTable(serverBitFlagKeys.moderationFlagKeys);
|
serverBitFlags.moderationFlags = createBitFlagTable(serverBitFlagKeys.moderationFlagKeys);
|
||||||
serverBitFlags.accountSettingsFlags = createBitFlagTable(serverBitFlagKeys.accountSettingsFlagKeys);
|
serverBitFlags.accountSettingsFlags = createBitFlagTable(serverBitFlagKeys.accountSettingsFlagKeys);
|
||||||
@@ -294,7 +294,7 @@ function initBitFlagScript() {
|
|||||||
serverBitFlags.npcTriggerResponseTypes = createBitFlagTable(serverBitFlagKeys.npcTriggerResponseTypeKeys);
|
serverBitFlags.npcTriggerResponseTypes = createBitFlagTable(serverBitFlagKeys.npcTriggerResponseTypeKeys);
|
||||||
serverBitFlags.seenActionTips = createBitFlagTable(serverBitFlagKeys.seenActionTipsKeys);
|
serverBitFlags.seenActionTips = createBitFlagTable(serverBitFlagKeys.seenActionTipsKeys);
|
||||||
serverBitFlags.jobRankFlags = createBitFlagTable(serverBitFlagKeys.jobRankKeys);
|
serverBitFlags.jobRankFlags = createBitFlagTable(serverBitFlagKeys.jobRankKeys);
|
||||||
logToConsole(LOG_INFO, "[AGRP.BitFlag]: Bit flag script initialized successfully!");
|
logToConsole(LOG_INFO, "[V.RP.BitFlag]: Bit flag script initialized successfully!");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -188,8 +188,8 @@ class BusinessGameScriptData {
|
|||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
function initBusinessScript() {
|
function initBusinessScript() {
|
||||||
logToConsole(LOG_INFO, "[AGRP.Business]: Initializing business script ...");
|
logToConsole(LOG_INFO, "[V.RP.Business]: Initializing business script ...");
|
||||||
logToConsole(LOG_INFO, "[AGRP.Business]: Business script initialized successfully!");
|
logToConsole(LOG_INFO, "[V.RP.Business]: Business script initialized successfully!");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -212,7 +212,7 @@ function loadBusinessFromId(businessId) {
|
|||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
function loadBusinessesFromDatabase() {
|
function loadBusinessesFromDatabase() {
|
||||||
logToConsole(LOG_INFO, "[AGRP.Business]: Loading businesses from database ...");
|
logToConsole(LOG_INFO, "[V.RP.Business]: Loading businesses from database ...");
|
||||||
|
|
||||||
let tempBusinesses = [];
|
let tempBusinesses = [];
|
||||||
let dbConnection = connectToDatabase();
|
let dbConnection = connectToDatabase();
|
||||||
@@ -2826,11 +2826,11 @@ function getBusinessFloorFirstFreeItemSlot(businessId) {
|
|||||||
|
|
||||||
// Caches all items for all businesses
|
// Caches all items for all businesses
|
||||||
function cacheAllBusinessItems() {
|
function cacheAllBusinessItems() {
|
||||||
logToConsole(LOG_DEBUG, "[AGRP.Business] Caching all business items ...");
|
logToConsole(LOG_DEBUG, "[V.RP.Business] Caching all business items ...");
|
||||||
for (let i in getServerData().businesses) {
|
for (let i in getServerData().businesses) {
|
||||||
cacheBusinessItems(i);
|
cacheBusinessItems(i);
|
||||||
}
|
}
|
||||||
logToConsole(LOG_DEBUG, "[AGRP.Business] Cached all business items successfully!");
|
logToConsole(LOG_DEBUG, "[V.RP.Business] Cached all business items successfully!");
|
||||||
}
|
}
|
||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|||||||
@@ -8,8 +8,8 @@
|
|||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
function initChatScript() {
|
function initChatScript() {
|
||||||
logToConsole(LOG_INFO, "[AGRP.Chat]: Initializing chat script ...");
|
logToConsole(LOG_INFO, "[V.RP.Chat]: Initializing chat script ...");
|
||||||
logToConsole(LOG_INFO, "[AGRP.Chat]: Chat script initialized successfully!");
|
logToConsole(LOG_INFO, "[V.RP.Chat]: Chat script initialized successfully!");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -109,15 +109,15 @@ class ClanMemberData {
|
|||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
function initClanScript() {
|
function initClanScript() {
|
||||||
logToConsole(LOG_INFO, "[AGRP.Clan]: Initializing clans script ...");
|
logToConsole(LOG_INFO, "[V.RP.Clan]: Initializing clans script ...");
|
||||||
logToConsole(LOG_INFO, "[AGRP.Clan]: Clan script initialized successfully!");
|
logToConsole(LOG_INFO, "[V.RP.Clan]: Clan script initialized successfully!");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
function loadClansFromDatabase() {
|
function loadClansFromDatabase() {
|
||||||
logToConsole(LOG_INFO, "[AGRP.Clan]: Loading clans from database ...");
|
logToConsole(LOG_INFO, "[V.RP.Clan]: Loading clans from database ...");
|
||||||
|
|
||||||
let tempClans = [];
|
let tempClans = [];
|
||||||
let dbConnection = connectToDatabase();
|
let dbConnection = connectToDatabase();
|
||||||
@@ -145,7 +145,7 @@ function loadClansFromDatabase() {
|
|||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
function loadClanMembersFromDatabase() {
|
function loadClanMembersFromDatabase() {
|
||||||
logToConsole(LOG_INFO, "[AGRP.Clan]: Loading clans from database ...");
|
logToConsole(LOG_INFO, "[V.RP.Clan]: Loading clans from database ...");
|
||||||
|
|
||||||
let tempClans = [];
|
let tempClans = [];
|
||||||
let dbConnection = connectToDatabase();
|
let dbConnection = connectToDatabase();
|
||||||
|
|||||||
@@ -155,8 +155,8 @@ class ClientData {
|
|||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
function initClientScript() {
|
function initClientScript() {
|
||||||
logToConsole(LOG_DEBUG, "[AGRP.Client]: Initializing client script ...");
|
logToConsole(LOG_DEBUG, "[V.RP.Client]: Initializing client script ...");
|
||||||
logToConsole(LOG_DEBUG, "[AGRP.Client]: Client script initialized!");
|
logToConsole(LOG_DEBUG, "[V.RP.Client]: Client script initialized!");
|
||||||
}
|
}
|
||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|||||||
@@ -43,8 +43,8 @@ let serverCommands = [];
|
|||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
function initCommandScript() {
|
function initCommandScript() {
|
||||||
logToConsole(LOG_INFO, "[AGRP.Command]: Initializing commands script ...");
|
logToConsole(LOG_INFO, "[V.RP.Command]: Initializing commands script ...");
|
||||||
logToConsole(LOG_INFO, "[AGRP.Command]: Initialized commands script!");
|
logToConsole(LOG_INFO, "[V.RP.Command]: Initialized commands script!");
|
||||||
}
|
}
|
||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|||||||
@@ -255,14 +255,14 @@ let globalConfig = {
|
|||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
function initConfigScript() {
|
function initConfigScript() {
|
||||||
logToConsole(LOG_INFO, "[AGRP.Config]: Initializing config script ...");
|
logToConsole(LOG_INFO, "[V.RP.Config]: Initializing config script ...");
|
||||||
logToConsole(LOG_INFO, "[AGRP.Config]: Config script initialized!");
|
logToConsole(LOG_INFO, "[V.RP.Config]: Config script initialized!");
|
||||||
}
|
}
|
||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
function loadGlobalConfig() {
|
function loadGlobalConfig() {
|
||||||
logToConsole(LOG_DEBUG, "[AGRP.Config] Loading global configuration ...");
|
logToConsole(LOG_DEBUG, "[V.RP.Config] Loading global configuration ...");
|
||||||
try {
|
try {
|
||||||
getGlobalConfig().database = loadDatabaseConfig();
|
getGlobalConfig().database = loadDatabaseConfig();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
@@ -312,7 +312,7 @@ function loadGlobalConfig() {
|
|||||||
thisResource.stop();
|
thisResource.stop();
|
||||||
}
|
}
|
||||||
|
|
||||||
logToConsole(LOG_DEBUG, "[AGRP.Config] Loaded global configuration successfully!");
|
logToConsole(LOG_DEBUG, "[V.RP.Config] Loaded global configuration successfully!");
|
||||||
}
|
}
|
||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
@@ -373,8 +373,8 @@ function loadServerConfigFromId(tempServerId) {
|
|||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
function applyConfigToServer(tempServerConfig) {
|
function applyConfigToServer(tempServerConfig) {
|
||||||
logToConsole(LOG_INFO, "[AGRP.Config]: Applying server config ...");
|
logToConsole(LOG_INFO, "[V.RP.Config]: Applying server config ...");
|
||||||
logToConsole(LOG_DEBUG, "[AGRP.Config]: Server config applied successfully!");
|
logToConsole(LOG_DEBUG, "[V.RP.Config]: Server config applied successfully!");
|
||||||
|
|
||||||
updateServerGameTime();
|
updateServerGameTime();
|
||||||
|
|
||||||
@@ -980,7 +980,7 @@ function getServerIntroMusicURL() {
|
|||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
function loadLocaleConfig() {
|
function loadLocaleConfig() {
|
||||||
logToConsole(LOG_DEBUG, "[AGRP.Config] Loading locale configuration");
|
logToConsole(LOG_DEBUG, "[V.RP.Config] Loading locale configuration");
|
||||||
let localeConfig = JSON.parse(loadTextFile(`config/locale.json`));
|
let localeConfig = JSON.parse(loadTextFile(`config/locale.json`));
|
||||||
if (localeConfig != null) {
|
if (localeConfig != null) {
|
||||||
return localeConfig;
|
return localeConfig;
|
||||||
@@ -990,7 +990,7 @@ function loadLocaleConfig() {
|
|||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
function loadEconomyConfig() {
|
function loadEconomyConfig() {
|
||||||
logToConsole(LOG_DEBUG, "[AGRP.Config] Loading economy configuration");
|
logToConsole(LOG_DEBUG, "[V.RP.Config] Loading economy configuration");
|
||||||
let economyConfig = JSON.parse(loadTextFile(`config/economy.json`));
|
let economyConfig = JSON.parse(loadTextFile(`config/economy.json`));
|
||||||
if (economyConfig != null) {
|
if (economyConfig != null) {
|
||||||
return economyConfig;
|
return economyConfig;
|
||||||
@@ -1000,7 +1000,7 @@ function loadEconomyConfig() {
|
|||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
function loadAccentConfig() {
|
function loadAccentConfig() {
|
||||||
logToConsole(LOG_DEBUG, "[AGRP.Config] Loading accents configuration");
|
logToConsole(LOG_DEBUG, "[V.RP.Config] Loading accents configuration");
|
||||||
let accentConfig = JSON.parse(loadTextFile(`config/accents.json`));
|
let accentConfig = JSON.parse(loadTextFile(`config/accents.json`));
|
||||||
if (accentConfig != null) {
|
if (accentConfig != null) {
|
||||||
return accentConfig;
|
return accentConfig;
|
||||||
@@ -1010,7 +1010,7 @@ function loadAccentConfig() {
|
|||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
function loadDiscordConfig() {
|
function loadDiscordConfig() {
|
||||||
logToConsole(LOG_DEBUG, "[AGRP.Config] Loading discord configuration");
|
logToConsole(LOG_DEBUG, "[V.RP.Config] Loading discord configuration");
|
||||||
let discordConfig = JSON.parse(loadTextFile(`config/discord.json`));
|
let discordConfig = JSON.parse(loadTextFile(`config/discord.json`));
|
||||||
if (discordConfig != null) {
|
if (discordConfig != null) {
|
||||||
return discordConfig;
|
return discordConfig;
|
||||||
@@ -1021,7 +1021,7 @@ function loadDiscordConfig() {
|
|||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
function loadDatabaseConfig() {
|
function loadDatabaseConfig() {
|
||||||
logToConsole(LOG_DEBUG, "[AGRP.Config] Loading database configuration");
|
logToConsole(LOG_DEBUG, "[V.RP.Config] Loading database configuration");
|
||||||
let databaseConfig = JSON.parse(loadTextFile("config/database.json"));
|
let databaseConfig = JSON.parse(loadTextFile("config/database.json"));
|
||||||
if (databaseConfig != null) {
|
if (databaseConfig != null) {
|
||||||
return databaseConfig;
|
return databaseConfig;
|
||||||
@@ -1032,7 +1032,7 @@ function loadDatabaseConfig() {
|
|||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
function loadKeyBindConfig() {
|
function loadKeyBindConfig() {
|
||||||
logToConsole(LOG_DEBUG, "[AGRP.Config] Loading keybind configuration");
|
logToConsole(LOG_DEBUG, "[V.RP.Config] Loading keybind configuration");
|
||||||
let keyBindConfig = JSON.parse(loadTextFile("config/keybind.json"));
|
let keyBindConfig = JSON.parse(loadTextFile("config/keybind.json"));
|
||||||
if (keyBindConfig != null) {
|
if (keyBindConfig != null) {
|
||||||
return keyBindConfig;
|
return keyBindConfig;
|
||||||
@@ -1043,7 +1043,7 @@ function loadKeyBindConfig() {
|
|||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
function loadEmailConfig() {
|
function loadEmailConfig() {
|
||||||
logToConsole(LOG_DEBUG, "[AGRP.Config] Loading email configuration");
|
logToConsole(LOG_DEBUG, "[V.RP.Config] Loading email configuration");
|
||||||
let emailConfig = JSON.parse(loadTextFile("config/email.json"));
|
let emailConfig = JSON.parse(loadTextFile("config/email.json"));
|
||||||
if (emailConfig != null) {
|
if (emailConfig != null) {
|
||||||
return emailConfig;
|
return emailConfig;
|
||||||
@@ -1126,7 +1126,7 @@ function getDatabaseConfig() {
|
|||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
function loadServerConfig() {
|
function loadServerConfig() {
|
||||||
logToConsole(LOG_DEBUG, "[AGRP.Config] Loading server configuration");
|
logToConsole(LOG_DEBUG, "[V.RP.Config] Loading server configuration");
|
||||||
|
|
||||||
if (toInteger(server.getCVar("agrp_devserver")) == 1) {
|
if (toInteger(server.getCVar("agrp_devserver")) == 1) {
|
||||||
serverConfig = loadServerConfigFromGame(getGame());
|
serverConfig = loadServerConfigFromGame(getGame());
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
let scriptVersion = "1.3";
|
let scriptVersion = "1.3";
|
||||||
let serverStartTime = 0;
|
let serverStartTime = 0;
|
||||||
let logLevel = LOG_INFO;
|
let logLevel = LOG_INFO | LOG_DEBUG | LOG_VERBOSE;
|
||||||
|
|
||||||
let playerResourceReady = new Array(server.maxClients).fill(false);
|
let playerResourceReady = new Array(server.maxClients).fill(false);
|
||||||
let playerResourceStarted = new Array(server.maxClients).fill(false);
|
let playerResourceStarted = new Array(server.maxClients).fill(false);
|
||||||
|
|||||||
@@ -14,8 +14,8 @@ let persistentDatabaseConnection = null;
|
|||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
function initDatabaseScript() {
|
function initDatabaseScript() {
|
||||||
logToConsole(LOG_INFO, "[AGRP.Database]: Initializing database script ...");
|
logToConsole(LOG_INFO, "[V.RP.Database]: Initializing database script ...");
|
||||||
logToConsole(LOG_INFO, "[AGRP.Database]: Database script initialized successfully!");
|
logToConsole(LOG_INFO, "[V.RP.Database]: Database script initialized successfully!");
|
||||||
}
|
}
|
||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
function initDeveloperScript() {
|
function initDeveloperScript() {
|
||||||
logToConsole(LOG_INFO, "[AGRP.Developer]: Initializing developer script ...");
|
logToConsole(LOG_INFO, "[V.RP.Developer]: Initializing developer script ...");
|
||||||
|
|
||||||
// Use GTAC command handlers for these since they need to be available on console
|
// Use GTAC command handlers for these since they need to be available on console
|
||||||
//addCommandHandler("sc", executeServerCodeCommand);
|
//addCommandHandler("sc", executeServerCodeCommand);
|
||||||
@@ -17,7 +17,7 @@ function initDeveloperScript() {
|
|||||||
//addCommandHandler("allcmd", simulateCommandForAllPlayersCommand);
|
//addCommandHandler("allcmd", simulateCommandForAllPlayersCommand);
|
||||||
//addCommandHandler("addloglvl", setServerLogLevelCommand);
|
//addCommandHandler("addloglvl", setServerLogLevelCommand);
|
||||||
|
|
||||||
logToConsole(LOG_INFO, "[AGRP.Developer]: Developer script initialized successfully!");
|
logToConsole(LOG_INFO, "[V.RP.Developer]: Developer script initialized successfully!");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -15,8 +15,8 @@ const V_DISCORD_WEBHOOK_ADMIN = 2;
|
|||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
function initDiscordScript() {
|
function initDiscordScript() {
|
||||||
logToConsole(LOG_INFO, "[AGRP.Discord]: Initializing discord script ...");
|
logToConsole(LOG_INFO, "[V.RP.Discord]: Initializing discord script ...");
|
||||||
logToConsole(LOG_INFO, "[AGRP.Discord]: Discord script initialized successfully!");
|
logToConsole(LOG_INFO, "[V.RP.Discord]: Discord script initialized successfully!");
|
||||||
}
|
}
|
||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|||||||
@@ -8,8 +8,8 @@
|
|||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
function initEconomyScript() {
|
function initEconomyScript() {
|
||||||
logToConsole(LOG_INFO, "[AGRP.Economy]: Initializing economy script ...");
|
logToConsole(LOG_INFO, "[V.RP.Economy]: Initializing economy script ...");
|
||||||
logToConsole(LOG_INFO, "[AGRP.Economy]: Economy script initialized successfully!");
|
logToConsole(LOG_INFO, "[V.RP.Economy]: Economy script initialized successfully!");
|
||||||
}
|
}
|
||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|||||||
@@ -15,8 +15,8 @@ const V_EMAIL_METHOD_GET_REQUEST = "http"; // Use HTTP request (httpGet to cu
|
|||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
function initEmailScript() {
|
function initEmailScript() {
|
||||||
logToConsole(LOG_INFO, "[AGRP.Email]: Initializing email script ...");
|
logToConsole(LOG_INFO, "[V.RP.Email]: Initializing email script ...");
|
||||||
logToConsole(LOG_INFO, "[AGRP.Email]: Email script initialized successfully!");
|
logToConsole(LOG_INFO, "[V.RP.Email]: Email script initialized successfully!");
|
||||||
}
|
}
|
||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|||||||
@@ -8,9 +8,9 @@
|
|||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
function initEventScript() {
|
function initEventScript() {
|
||||||
logToConsole(LOG_INFO, "[AGRP.Event]: Initializing event script ...");
|
logToConsole(LOG_INFO, "[V.RP.Event]: Initializing event script ...");
|
||||||
addAllEventHandlers();
|
addAllEventHandlers();
|
||||||
logToConsole(LOG_INFO, "[AGRP.Event]: Event script initialized!");
|
logToConsole(LOG_INFO, "[V.RP.Event]: Event script initialized!");
|
||||||
}
|
}
|
||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|||||||
@@ -86,8 +86,8 @@ let fishingParticleEffects = {
|
|||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
function initFishingScript() {
|
function initFishingScript() {
|
||||||
logToConsole(LOG_INFO, "[AGRP.Fishing]: Initializing fishing script ...");
|
logToConsole(LOG_INFO, "[V.RP.Fishing]: Initializing fishing script ...");
|
||||||
logToConsole(LOG_INFO, "[AGRP.Fishing]: Fishing script initialized successfully!");
|
logToConsole(LOG_INFO, "[V.RP.Fishing]: Fishing script initialized successfully!");
|
||||||
}
|
}
|
||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|||||||
@@ -235,7 +235,7 @@ function saveGateToDatabase(gateId) {
|
|||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
function loadGatesFromDatabase() {
|
function loadGatesFromDatabase() {
|
||||||
logToConsole(LOG_INFO, "[AGRP.Gate]: Loading gates from database ...");
|
logToConsole(LOG_INFO, "[V.RP.Gate]: Loading gates from database ...");
|
||||||
|
|
||||||
let tempGates = [];
|
let tempGates = [];
|
||||||
let dbConnection = connectToDatabase();
|
let dbConnection = connectToDatabase();
|
||||||
|
|||||||
@@ -8,8 +8,8 @@
|
|||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
function initGUIScript() {
|
function initGUIScript() {
|
||||||
logToConsole(LOG_INFO, "[AGRP.GUI]: Initializing GUI script ...");
|
logToConsole(LOG_INFO, "[V.RP.GUI]: Initializing GUI script ...");
|
||||||
logToConsole(LOG_INFO, "[AGRP.GUI]: GUI script initialized successfully!");
|
logToConsole(LOG_INFO, "[V.RP.GUI]: GUI script initialized successfully!");
|
||||||
}
|
}
|
||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|||||||
@@ -167,15 +167,15 @@ class HouseGameScriptData {
|
|||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
function initHouseScript() {
|
function initHouseScript() {
|
||||||
logToConsole(LOG_INFO, "[AGRP.House]: Initializing house script ...");
|
logToConsole(LOG_INFO, "[V.RP.House]: Initializing house script ...");
|
||||||
logToConsole(LOG_INFO, "[AGRP.House]: House script initialized successfully!");
|
logToConsole(LOG_INFO, "[V.RP.House]: House script initialized successfully!");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
function loadHousesFromDatabase() {
|
function loadHousesFromDatabase() {
|
||||||
logToConsole(LOG_INFO, "[AGRP.House]: Loading houses from database ...");
|
logToConsole(LOG_INFO, "[V.RP.House]: Loading houses from database ...");
|
||||||
let tempHouses = [];
|
let tempHouses = [];
|
||||||
let dbConnection = connectToDatabase();
|
let dbConnection = connectToDatabase();
|
||||||
let dbAssoc = [];
|
let dbAssoc = [];
|
||||||
|
|||||||
@@ -280,8 +280,8 @@ let itemRecipes = [
|
|||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
function initItemScript() {
|
function initItemScript() {
|
||||||
logToConsole(LOG_DEBUG, "[AGRP.Item]: Initializing item script ...");
|
logToConsole(LOG_DEBUG, "[V.RP.Item]: Initializing item script ...");
|
||||||
logToConsole(LOG_INFO, "[AGRP.Item]: Item script initialized successfully!");
|
logToConsole(LOG_INFO, "[V.RP.Item]: Item script initialized successfully!");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -528,15 +528,15 @@ let jobRouteLocationTypes = {
|
|||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
function initJobScript() {
|
function initJobScript() {
|
||||||
logToConsole(LOG_DEBUG, "[AGRP.Job]: Initializing job script ...");
|
logToConsole(LOG_DEBUG, "[V.RP.Job]: Initializing job script ...");
|
||||||
logToConsole(LOG_INFO, "[AGRP.Job]: Job script initialized successfully!");
|
logToConsole(LOG_INFO, "[V.RP.Job]: Job script initialized successfully!");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
function loadJobsFromDatabase() {
|
function loadJobsFromDatabase() {
|
||||||
logToConsole(LOG_DEBUG, "[AGRP.Job]: Loading jobs from database ...");
|
logToConsole(LOG_DEBUG, "[V.RP.Job]: Loading jobs from database ...");
|
||||||
|
|
||||||
let tempJobs = [];
|
let tempJobs = [];
|
||||||
let dbConnection = connectToDatabase();
|
let dbConnection = connectToDatabase();
|
||||||
|
|||||||
@@ -35,8 +35,8 @@ class KeyBindData {
|
|||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
function initKeyBindScript() {
|
function initKeyBindScript() {
|
||||||
logToConsole(LOG_DEBUG, "[AGRP.KeyBind]: Initializing key bind script ...");
|
logToConsole(LOG_DEBUG, "[V.RP.KeyBind]: Initializing key bind script ...");
|
||||||
logToConsole(LOG_INFO, "[AGRP.KeyBind]: Key bind script initialized!");
|
logToConsole(LOG_INFO, "[V.RP.KeyBind]: Key bind script initialized!");
|
||||||
}
|
}
|
||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|||||||
@@ -27,8 +27,8 @@ let englishLocale = 0;
|
|||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
function initLocaleScript() {
|
function initLocaleScript() {
|
||||||
logToConsole(LOG_DEBUG, "[AGRP.Locale]: Initializing locale script ...");
|
logToConsole(LOG_DEBUG, "[V.RP.Locale]: Initializing locale script ...");
|
||||||
logToConsole(LOG_INFO, "[AGRP.Locale]: Locale script initialized!");
|
logToConsole(LOG_INFO, "[V.RP.Locale]: Locale script initialized!");
|
||||||
}
|
}
|
||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|||||||
@@ -9,8 +9,8 @@
|
|||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
function initMessagingScript() {
|
function initMessagingScript() {
|
||||||
logToConsole(LOG_INFO, "[AGRP.Messaging]: Initializing messaging script ...");
|
logToConsole(LOG_INFO, "[V.RP.Messaging]: Initializing messaging script ...");
|
||||||
logToConsole(LOG_INFO, "[AGRP.Messaging]: Messaging script initialized successfully!");
|
logToConsole(LOG_INFO, "[V.RP.Messaging]: Messaging script initialized successfully!");
|
||||||
}
|
}
|
||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|||||||
@@ -54,8 +54,8 @@ const V_PROPERTY_TYPE_HOUSE = 2; // House
|
|||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
function initMiscScript() {
|
function initMiscScript() {
|
||||||
logToConsole(LOG_DEBUG, "[AGRP.Misc]: Initializing misc script ...");
|
logToConsole(LOG_DEBUG, "[V.RP.Misc]: Initializing misc script ...");
|
||||||
logToConsole(LOG_INFO, "[AGRP.Misc]: Misc script initialized successfully!");
|
logToConsole(LOG_INFO, "[V.RP.Misc]: Misc script initialized successfully!");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -8,14 +8,14 @@
|
|||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
function initNetworkEventsScript() {
|
function initNetworkEventsScript() {
|
||||||
logToConsole(LOG_DEBUG, "[AGRP.NetEvents]: Initializing network events script ...");
|
logToConsole(LOG_DEBUG, "[V.RP.NetEvents]: Initializing network events script ...");
|
||||||
logToConsole(LOG_INFO, "[AGRP.NetEvents]: Network events script initialized!");
|
logToConsole(LOG_INFO, "[V.RP.NetEvents]: Network events script initialized!");
|
||||||
}
|
}
|
||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
function addAllNetworkEventHandlers() {
|
function addAllNetworkEventHandlers() {
|
||||||
logToConsole(LOG_DEBUG, "[AGRP.Client]: Adding network handlers ...");
|
logToConsole(LOG_DEBUG, "[V.RP.Client]: Adding network handlers ...");
|
||||||
|
|
||||||
// KeyBind
|
// KeyBind
|
||||||
addNetworkEventHandler("v.rp.useKeyBind", playerUsedKeyBind);
|
addNetworkEventHandler("v.rp.useKeyBind", playerUsedKeyBind);
|
||||||
|
|||||||
@@ -205,8 +205,8 @@ class NPCTriggerResponseData {
|
|||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
function initNPCScript() {
|
function initNPCScript() {
|
||||||
logToConsole(LOG_DEBUG, "[AGRP.NPC]: Initializing NPC script ...");
|
logToConsole(LOG_DEBUG, "[V.RP.NPC]: Initializing NPC script ...");
|
||||||
logToConsole(LOG_INFO, "[AGRP.NPC]: NPC script initialized successfully!");
|
logToConsole(LOG_INFO, "[V.RP.NPC]: NPC script initialized successfully!");
|
||||||
}
|
}
|
||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|||||||
@@ -49,8 +49,8 @@ let paintBallItemNames = {
|
|||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
function initPaintBallScript() {
|
function initPaintBallScript() {
|
||||||
logToConsole(LOG_DEBUG, "[AGRP.PaintBall]: Initializing paintball script ...");
|
logToConsole(LOG_DEBUG, "[V.RP.PaintBall]: Initializing paintball script ...");
|
||||||
logToConsole(LOG_DEBUG, "[AGRP.PaintBall]: Paintball script initialized successfully!");
|
logToConsole(LOG_DEBUG, "[V.RP.PaintBall]: Paintball script initialized successfully!");
|
||||||
}
|
}
|
||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|||||||
@@ -21,8 +21,8 @@ const V_PROMPT_RESETKEYBINDS = 8;
|
|||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
function initPromptScript() {
|
function initPromptScript() {
|
||||||
logToConsole(LOG_INFO, "[AGRP.Prompt]: Initializing Prompt script ...");
|
logToConsole(LOG_INFO, "[V.RP.Prompt]: Initializing Prompt script ...");
|
||||||
logToConsole(LOG_INFO, "[AGRP.Prompt]: Prompt script initialized successfully!");
|
logToConsole(LOG_INFO, "[V.RP.Prompt]: Prompt script initialized successfully!");
|
||||||
}
|
}
|
||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|||||||
@@ -151,8 +151,8 @@ class PropertyLocationData {
|
|||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
function initPropertyScript() {
|
function initPropertyScript() {
|
||||||
logToConsole(LOG_INFO, "[AGRP.Property]: Initializing property script ...");
|
logToConsole(LOG_INFO, "[V.RP.Property]: Initializing property script ...");
|
||||||
logToConsole(LOG_INFO, "[AGRP.Property]: Property script initialized successfully!");
|
logToConsole(LOG_INFO, "[V.RP.Property]: Property script initialized successfully!");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -176,7 +176,7 @@ function loadPropertyFromId(propertyIndex) {
|
|||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
function loadPropertiesFromDatabase() {
|
function loadPropertiesFromDatabase() {
|
||||||
logToConsole(LOG_INFO, "[AGRP.Property]: Loading properties from database ...");
|
logToConsole(LOG_INFO, "[V.RP.Property]: Loading properties from database ...");
|
||||||
|
|
||||||
let tempProperties = [];
|
let tempProperties = [];
|
||||||
let dbConnection = connectToDatabase();
|
let dbConnection = connectToDatabase();
|
||||||
@@ -2255,11 +2255,11 @@ function getPropertyFloorFirstFreeItemSlot(propertyIndex) {
|
|||||||
|
|
||||||
// Caches all items for all businesses
|
// Caches all items for all businesses
|
||||||
function cacheAllPropertyItems() {
|
function cacheAllPropertyItems() {
|
||||||
logToConsole(LOG_DEBUG, "[AGRP.Property] Caching all business items ...");
|
logToConsole(LOG_DEBUG, "[V.RP.Property] Caching all business items ...");
|
||||||
for (let i in getServerData().properties) {
|
for (let i in getServerData().properties) {
|
||||||
cachePropertyItems(i);
|
cachePropertyItems(i);
|
||||||
}
|
}
|
||||||
logToConsole(LOG_DEBUG, "[AGRP.Property] Cached all business items successfully!");
|
logToConsole(LOG_DEBUG, "[V.RP.Property] Cached all business items successfully!");
|
||||||
}
|
}
|
||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|||||||
@@ -8,8 +8,8 @@
|
|||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
function initRaceScript() {
|
function initRaceScript() {
|
||||||
logToConsole(LOG_INFO, "[AGRP.Race]: Initializing race script ...");
|
logToConsole(LOG_INFO, "[V.RP.Race]: Initializing race script ...");
|
||||||
logToConsole(LOG_INFO, "[AGRP.Race]: Race script initialized successfully!");
|
logToConsole(LOG_INFO, "[V.RP.Race]: Race script initialized successfully!");
|
||||||
}
|
}
|
||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|||||||
@@ -29,15 +29,15 @@ class RadioStationData {
|
|||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
function initRadioScript() {
|
function initRadioScript() {
|
||||||
logToConsole(LOG_INFO, "[AGRP.Radio]: Initializing radio script ...");
|
logToConsole(LOG_INFO, "[V.RP.Radio]: Initializing radio script ...");
|
||||||
logToConsole(LOG_INFO, "[AGRP.Radio]: Radio script initialized successfully!");
|
logToConsole(LOG_INFO, "[V.RP.Radio]: Radio script initialized successfully!");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
function loadRadioStationsFromDatabase() {
|
function loadRadioStationsFromDatabase() {
|
||||||
logToConsole(LOG_INFO, "[AGRP.Radio]: Loading radio stations from database ...");
|
logToConsole(LOG_INFO, "[V.RP.Radio]: Loading radio stations from database ...");
|
||||||
let dbConnection = connectToDatabase();
|
let dbConnection = connectToDatabase();
|
||||||
let tempRadioStations = [];
|
let tempRadioStations = [];
|
||||||
let dbAssoc = [];
|
let dbAssoc = [];
|
||||||
|
|||||||
@@ -8,8 +8,8 @@
|
|||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
function initStaffScript() {
|
function initStaffScript() {
|
||||||
logToConsole(LOG_INFO, "[AGRP.Staff]: Initializing staff script ...");
|
logToConsole(LOG_INFO, "[V.RP.Staff]: Initializing staff script ...");
|
||||||
logToConsole(LOG_INFO, "[AGRP.Staff]: Staff script initialized successfully!");
|
logToConsole(LOG_INFO, "[V.RP.Staff]: Staff script initialized successfully!");
|
||||||
}
|
}
|
||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|||||||
@@ -98,33 +98,33 @@ function checkForSMTPModule() {
|
|||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
function checkForAllRequiredModules() {
|
function checkForAllRequiredModules() {
|
||||||
logToConsole(LOG_DEBUG, "[AGRP.Startup]: Checking for required modules ...");
|
logToConsole(LOG_DEBUG, "[V.RP.Startup]: Checking for required modules ...");
|
||||||
|
|
||||||
if (!checkForHashingModule()) {
|
if (!checkForHashingModule()) {
|
||||||
logToConsole(LOG_WARN, "[AGRP.Startup]: Hashing module is not loaded!");
|
logToConsole(LOG_WARN, "[V.RP.Startup]: Hashing module is not loaded!");
|
||||||
logToConsole(LOG_ERROR, "[AGRP.Startup]: This server will now shutdown.");
|
logToConsole(LOG_ERROR, "[V.RP.Startup]: This server will now shutdown.");
|
||||||
shutdownServer();
|
shutdownServer();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!checkForMySQLModule()) {
|
if (!checkForMySQLModule()) {
|
||||||
logToConsole(LOG_WARN, "[AGRP.Startup]: MySQL module is not loaded!");
|
logToConsole(LOG_WARN, "[V.RP.Startup]: MySQL module is not loaded!");
|
||||||
logToConsole(LOG_ERROR, "[AGRP.Startup]: This server will now shutdown.");
|
logToConsole(LOG_ERROR, "[V.RP.Startup]: This server will now shutdown.");
|
||||||
shutdownServer();
|
shutdownServer();
|
||||||
}
|
}
|
||||||
|
|
||||||
//if (!checkForSMTPModule()) {
|
//if (!checkForSMTPModule()) {
|
||||||
// logToConsole(LOG_WARN, "[AGRP.Startup]: SMTP Email module is not loaded!");
|
// logToConsole(LOG_WARN, "[V.RP.Startup]: SMTP Email module is not loaded!");
|
||||||
// logToConsole(LOG_WARN, "[AGRP.Startup]: Email features will NOT be available!");
|
// logToConsole(LOG_WARN, "[V.RP.Startup]: Email features will NOT be available!");
|
||||||
//}
|
//}
|
||||||
|
|
||||||
logToConsole(LOG_DEBUG, "[AGRP.Startup]: All required modules loaded!");
|
logToConsole(LOG_DEBUG, "[V.RP.Startup]: All required modules loaded!");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
function loadServerDataFromDatabase() {
|
function loadServerDataFromDatabase() {
|
||||||
logToConsole(LOG_INFO, "[AGRP.Config]: Loading server data ...");
|
logToConsole(LOG_INFO, "[V.RP.Config]: Loading server data ...");
|
||||||
|
|
||||||
// Always load these regardless of "test server" status
|
// Always load these regardless of "test server" status
|
||||||
getServerData().localeStrings = loadAllLocaleStrings();
|
getServerData().localeStrings = loadAllLocaleStrings();
|
||||||
|
|||||||
@@ -122,8 +122,8 @@ class SubAccountData {
|
|||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
function initSubAccountScript() {
|
function initSubAccountScript() {
|
||||||
logToConsole(LOG_DEBUG, "[AGRP.SubAccount]: Initializing subaccount script ...");
|
logToConsole(LOG_DEBUG, "[V.RP.SubAccount]: Initializing subaccount script ...");
|
||||||
logToConsole(LOG_INFO, "[AGRP.SubAccount]: SubAccount script initialized!");
|
logToConsole(LOG_INFO, "[V.RP.SubAccount]: SubAccount script initialized!");
|
||||||
}
|
}
|
||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
@@ -354,7 +354,7 @@ function createSubAccount(accountId, firstName, lastName) {
|
|||||||
//if(dbQuery) {
|
//if(dbQuery) {
|
||||||
if (getDatabaseInsertId(dbConnection) > 0) {
|
if (getDatabaseInsertId(dbConnection) > 0) {
|
||||||
let dbInsertId = getDatabaseInsertId(dbConnection);
|
let dbInsertId = getDatabaseInsertId(dbConnection);
|
||||||
createDefaultSubAccountServerData(dbInsertId, getServerConfig().newCharacter.skin);
|
createDefaultSubAccountServerData(dbInsertId);
|
||||||
let tempSubAccount = loadSubAccountFromId(dbInsertId);
|
let tempSubAccount = loadSubAccountFromId(dbInsertId);
|
||||||
return tempSubAccount;
|
return tempSubAccount;
|
||||||
}
|
}
|
||||||
@@ -681,15 +681,13 @@ function setFightStyleCommand(command, params, client) {
|
|||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
function createDefaultSubAccountServerData(databaseId, thisServerSkin) {
|
function createDefaultSubAccountServerData(databaseId) {
|
||||||
for (let i = 1; i <= 5; i++) {
|
let dbConnection = connectToDatabase();
|
||||||
if (i == getServerId()) {
|
let serversAssoc = fetchQueryAssoc(dbConnection, "SELECT * FROM svr_main");
|
||||||
let dbQueryString = `INSERT INTO sacct_svr (sacct_svr_sacct, sacct_svr_server, sacct_svr_skin) VALUES (${databaseId}, ${i}, ${thisServerSkin})`;
|
|
||||||
quickDatabaseQuery(dbQueryString);
|
for (let i in serversAssoc) {
|
||||||
} else {
|
let dbQueryString = `INSERT INTO sacct_svr (sacct_svr_sacct, sacct_svr_server, sacct_svr_skin) VALUES (${databaseId}, ${i}, ${serversAssoc[i]["svr_newchar_skin"]})`;
|
||||||
let dbQueryString = `INSERT INTO sacct_svr (sacct_svr_sacct, sacct_svr_server, sacct_svr_skin) VALUES (${databaseId}, ${i}, -1)`;
|
quickDatabaseQuery(dbQueryString);
|
||||||
quickDatabaseQuery(dbQueryString);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ function saveServerDataToDatabase() {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
logToConsole(LOG_DEBUG, "[AGRP.Utilities]: Saving all server data to database ...");
|
logToConsole(LOG_DEBUG, "[V.RP.Utilities]: Saving all server data to database ...");
|
||||||
|
|
||||||
try {
|
try {
|
||||||
saveAllPlayersToDatabase();
|
saveAllPlayersToDatabase();
|
||||||
@@ -84,7 +84,7 @@ function saveServerDataToDatabase() {
|
|||||||
logToConsole(LOG_ERROR, `Could not save server config to database: ${error}`);
|
logToConsole(LOG_ERROR, `Could not save server config to database: ${error}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
logToConsole(LOG_DEBUG, "[AGRP.Utilities]: Saved all server data to database!");
|
logToConsole(LOG_DEBUG, "[V.RP.Utilities]: Saved all server data to database!");
|
||||||
}
|
}
|
||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
@@ -210,7 +210,7 @@ function updatePings() {
|
|||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
function checkServerGameTime() {
|
function checkServerGameTime() {
|
||||||
//logToConsole(LOG_DEBUG | LOG_WARN, "[AGRP.Timers] Checking server game time");
|
//logToConsole(LOG_DEBUG | LOG_WARN, "[V.RP.Timers] Checking server game time");
|
||||||
|
|
||||||
//if (isGameFeatureSupported("time")) {
|
//if (isGameFeatureSupported("time")) {
|
||||||
// return false;
|
// return false;
|
||||||
|
|||||||
@@ -217,8 +217,8 @@ class TriggerResponseData {
|
|||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
function initTriggerScript() {
|
function initTriggerScript() {
|
||||||
logToConsole(LOG_INFO, "[AGRP.Trigger]: Initializing trigger script ...");
|
logToConsole(LOG_INFO, "[V.RP.Trigger]: Initializing trigger script ...");
|
||||||
logToConsole(LOG_INFO, "[AGRP.Trigger]: Trigger script initialized successfully!");
|
logToConsole(LOG_INFO, "[V.RP.Trigger]: Trigger script initialized successfully!");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -169,15 +169,15 @@ class VehicleData {
|
|||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
function initVehicleScript() {
|
function initVehicleScript() {
|
||||||
logToConsole(LOG_INFO, "[AGRP.Vehicle]: Initializing vehicle script ...");
|
logToConsole(LOG_INFO, "[V.RP.Vehicle]: Initializing vehicle script ...");
|
||||||
logToConsole(LOG_INFO, "[AGRP.Vehicle]: Vehicle script initialized successfully!");
|
logToConsole(LOG_INFO, "[V.RP.Vehicle]: Vehicle script initialized successfully!");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
function loadVehiclesFromDatabase() {
|
function loadVehiclesFromDatabase() {
|
||||||
logToConsole(LOG_INFO, "[AGRP.Vehicle]: Loading vehicles from database ...");
|
logToConsole(LOG_INFO, "[V.RP.Vehicle]: Loading vehicles from database ...");
|
||||||
let dbConnection = connectToDatabase();
|
let dbConnection = connectToDatabase();
|
||||||
let tempVehicles = [];
|
let tempVehicles = [];
|
||||||
let dbAssoc;
|
let dbAssoc;
|
||||||
@@ -204,14 +204,14 @@ function saveAllVehiclesToDatabase() {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
logToConsole(LOG_DEBUG, "[AGRP.Vehicle]: Saving all server vehicles to database ...");
|
logToConsole(LOG_DEBUG, "[V.RP.Vehicle]: Saving all server vehicles to database ...");
|
||||||
let vehicles = getServerData().vehicles;
|
let vehicles = getServerData().vehicles;
|
||||||
for (let i in vehicles) {
|
for (let i in vehicles) {
|
||||||
if (vehicles[i].needsSaved) {
|
if (vehicles[i].needsSaved) {
|
||||||
saveVehicleToDatabase(i);
|
saveVehicleToDatabase(i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
logToConsole(LOG_INFO, "[AGRP.Vehicle]: Saved all server vehicles to database!");
|
logToConsole(LOG_INFO, "[V.RP.Vehicle]: Saved all server vehicles to database!");
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user