Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Topics - Vortrex

Module Releases / Terminal Bell Module
May 18, 2022, 10:23:42 PM
This is a simple terminal bell module for those who want to use it for their server. Most of the functions have been lightly tested, but if you run into any issues please report them on the GitHub issues page for the repository.


Place into your server's "modules" folder and put "<module src="<I>module_folder_name/module_file_name</I>" />" into the modules section of your server XML. Be sure to include the folder your modules are stored in (it's relative to the main server directory) and do **not** include a file extension.
    <module src="modules/mod_bell" />

JavaScript Example:
if(chatMessage.indexOf("!admin") != -1) {

Available Functions:
bool = module.bell.ring(void);
Module Releases / SMTP Module
May 18, 2022, 10:21:41 PM
This is a simple SMTP module for those who want to use it for their server. Most of the functions have been lightly tested, but if you run into any issues please report them on the GitHub issues page for the repository.


Place into your server's "modules" folder and put "<module src="<I>module_folder_name/module_file_name</I>" />" into the modules section of your server XML. Be sure to include the folder your modules are stored in (it's relative to the main server directory) and do **not** include a file extension.
    <module src="modules/mod_smtp" />

JavaScript Example:
module.smtp.send(", 465, true, "yourusername", "yourpassword", "[email protected]", "Firstname Lastname", "Testing", "Testing the email module!", "[email protected]", "Firstname Lastname");
Available Functions:
void module.smtp.send(string host, int port, bool useTLS, string smtpUser, string smtpPassword, string toEmail string toName, string subject, string body, string fromEmail, string fromName);
Deleted Posts / Public Relations Manager Application
October 03, 2021, 12:56:22 AM
Discord (including #ID):
Timezone (GMT):

Why do you want to be the GTAC public relations manager?
Are you familiar with and capable of using popular social media platforms (i.e. Twitter, Reddit, Instagram, Facebook, etc)?
Have you handled public relations and/or social media for any project in the past?

Have you ever been or are you currently a tester, contributor, moderator, developer, VIP, or any other special role in another GTA multiplayer mod?
If yes, please explain which multiplayer mod and what roles:
Server Chat / Connected Roleplay
July 16, 2021, 08:00:33 AM

base price[/i] and this number will never change. Next, the base price is multiplied by the server's current inflation value. All servers start with an inflation value of 1 at launch, and will slowly increase over time, simulating overall economy inflation. Next, the inflated price is then multiplied by the demand factor. The demand factor is determined by how much demand there is for the item you want. Every 10 of the item ordered increases the demand value by 0.1, and this will slowly go back down over time. If another business just ordered 100 of the item you want, the demand has forced the item's order price to double (went from 1 to 2) to simulate the things involved with increased demand, such as increased manufacturing and shipping this item for import to your business. After that, the inflated and demand-simulated value is then multiplied by a risk value. Each item has a certain risk level and like the base price, it never changes. For illegal items, the risk value will be lower for less-risky items and higher as they get worse. For example, a deagle versus an AK-47 both have different risk levels because an AK-47 is rarer, far deadlier, harder to source, and more difficult to conceal through customs. This simulates the "risk" of ordering items like these. For legal items, there is no risk so the price doesn't increase. Finally, the order cost is multiplied by the amount you want to order. An example of this formula in action is below ... shown for an order for 10 AK-47's with no inflation (value of 1) ... The demand is increased by 0.1 since you're ordering 10 of them:
QuoteBase price $1,000 * inflation 1 * demand 1.1 * risk 5 * amount 10

= $5,500 each

= $55,000 total

So as you can see, the total cost to order 10 AK-47's in this scenario is fifty-five thousand dollars. Remember, an AK-47 is a deadly and uncommon weapon (and illegal!) so it's a costly (and risky) thing to do business with.

Now, let's try this example in the same scenario, but with a higher demand: Another business ordered 10 AK's right before you did. This means the demand will be increased by 0.1 on top of your 0.1 increase since you're ordering 10, so AK-47's now cost $6,000 each because of the base price of $1000, multiplied by risk of 5, then increased by 0.2, which is 20 percent, due to demand). This brings your total order to $60,000.

Announcements / Moderator Application
April 13, 2021, 04:52:42 AM
Discord (including #ID):
Timezone (GMT):
Why do you want to be a moderator?

Do you have any experience with scripting?
If yes, give a brief description of your history in scripting, and what languages you've used:

Have you ever been or are you currently a tester, contributor, moderator, developer, VIP, or any other special role in another GTA multiplayer mod?
If yes, please explain which multiplayer mod and what roles:
Scripting Releases / [JS] SUMO/Derby Gamemode
August 31, 2020, 08:02:16 PM
Here's a simple SUMO/Derby gamemode.

Works for any game, but maps are only included for GTA III and GTA San Andreas.

The goal is to be the last player alive! Use your vehicle and knock off or destroy all your opponents vehicles to win!

Bots spawn at match start to fill empty slots, and will attempt to block your vehicle or ram you.


This source is free for anybody to use as they see fit. You can freely modify, copy, and redistribute it.

Credits aren't required, but are greatly appreciated.
Module Releases / GeoIP Module
March 14, 2020, 10:55:56 AM
Here is a GeoIP module for those who want to use it for their server.


First you'll need an MMDB database file from MaxMind. You'll need to make an account, receive a license key, and then download the database file (it's free). After you have the database file, copy/upload to your server, and use the name for it in the file arg for the GeoIP functions below. Directory starts with the main server folder, but relative paths are supported.

Place into your server's "modules" folder and put "<module src="mod_geoip" />" into the modules section of your server XML. Be sure to include the name of your modules folder (it's relative to the main server directory) and do **not** include an extension. It should look similar to this:
    <module src="modules/mod_geoip" />

JavaScript Example
addEventHandler("OnPlayerJoined", function(event, client) {
let countryName = module.geoip.getCountryName("geoip-city.mmdb", client.ip);
console.log( + " connected from " + countryName);

Lua Example
addEventHandler("OnPlayerJoined", function(event, client)
local countryISO = module.geoip.getCountryName("geoip-city.mmdb", client:ip)
print(client:name .. " connected from " .. countryName)

All functions below return strings.
// Country info
module.geoip.getCountryName(string dbFile, string ipAddress)
module.geoip.getCountryISO(string dbFile, string ipAddress)

// Continent info
module.geoip.getContinentName(string dbFile, string ipAddress)
module.geoip.getContinentCode(string dbFile, string ipAddress)

// For states, provinces, etc
module.geoip.getSubdivisionName(string dbFile, string ipAddress)
module.geoip.getSubdivisionISO(string dbFile, string ipAddress)

// Misc
module.geoip.getCityName(string dbFile, string ipAddress)
module.geoip.getPostalCode(string dbFile, string ipAddress)
Archive / [ADDED] Server properties
February 21, 2020, 04:00:36 PM
We could use some more server properties. I know some have to be read-only, but it'd be nice to see as many as possible being writable. Some ideas:server.password


server.setCVar(name, value)
server.getCVar(name, val)
General Chat / Wiki Page Templates
January 24, 2020, 02:22:11 PM
The GTA Connected wiki provides several templates to make adding and editing pages easier. Below are a list of commonly used templates with descriptions of accepted values and information. Any field that is indicated as required must be provided or the wiki page will show that documentation for it wasn't added. Please don't leave any pages you add or edit with blank or missing required template values.


the property name ... this is only the name, don't use quotes or include the parent object
what the property returns as a type (int, string, etc)
Boolean indicating whether or not this property's value can be set
Explain what the property does if it's value is set, and what is returned if the value is only read
Explain what the property returns if used as a getter
Any extra information that scripters should be aware of goes here.


The method name ... this is only the name, don't use quotes or parentheses
What the method returns as a type (int, string, etc)
explain what the method does when used
explain what the method returns. Use void if it doesn't return anything
Any extra information that scripters should be aware of goes here.
first argument as [type name description]. Example: "string dataName The string name of the data."
Same as parameter1 but with the second parameter's information
Same as parameter1 but with the third parameter's information
General Chat / Wiki Editing
January 24, 2020, 06:27:27 AM
On January 24, 2020 the GTAC team has decided to make the wiki editable to approved users so that the community can submit examples and documentation for scripting. The wiki has templates available to make adding a page easy. More info available for these on this forum topic.

In order to maintain a clean and accurate wiki, the following rules have been created:
  • Pages created must be named for the top-most level of inheritance (example: would be
  • Do not create pages for functions/properties/etc that don't exist.
  • No spam or irrelevant/unrelated information
  • Arguments must be listed with accurate types and easy to understand names
  • No discriminatory information or insult

Inheritance heirarchy and variable types can be found   here

Discriminatory information as listed above includes (but is not limited to) any derogatory or negative mention of the basis of race, color, religion, creed, gender, gender expression, age, national origin, ancestry, disability, marital status, sexual orientation, or military status.
Scripting Help / Which language should you use?
November 17, 2019, 12:01:06 AM
I've been asked this question several times in the discord so I decided to just write a topic to save time having to re-explain it. Plus nobody likes walls of text and it's a lot cleaner on the forum.

So I'll start by saying that if you have experience with any of the three scripting languages supported by GTAC (JavaScript, Lua, and Squirrel), then the easy answer is to use that. Familiarity is best and you'll probably be more productive with a language you already know. If you don't have any scripting experience, or never tried any of those three languages, continue reading.

Let's start with JavaScript. JavaScript is my favorite of the three. It has a massive "community" behind it, and usually within the top languages on sites where you can get help or find resources (Stack Overflow, GitHub, etc). JavaScript is everywhere now, handling both back and front end operations, which is a far cry from it's origins as a way to run simple client-side operations within a web page. For future programming aspirations outside of GTA Connected, this is the language to use. JavaScript resources also start and execute faster than the other two languages on GTA Connected.

Sounds too good to be true right? You bet it is. Despite all the advantages, there are some cons to using it. It's the most complex of the three, and it's quirks make it a poor starter language to learn. JS used to be a big mess but gradually becoming more refined thanks to standards like ECMAScript.

Squirrel is barely known outside of GTA multiplayer mods (and even <I>within</I> them) and a couple other tiny projects. However, I find Squirrel's syntax to be the easiest, but I'm already fluent with it and have been for many years. It has a simple table-oriented structure and basically grabs many of the good parts from other languages. Squirrel was used on a couple other GTA multiplayer mods, like Liberty Unleashed and IV-MP, although both are now defunct. VC-MP is the only active mod that supports Squirrel, and you can find many resources there.

The only issue is that very little documentation exists for it and can make the learning curve a bit more complex. This can be alleviated a bit, thanks to many similarities to JavaScript, which has documentation everywhere. If you're not already using another language and don't plan on doing any scripting outside of GTA Connected, then I definitely recommend Squirrel.

Lua is the language I'm least adept with, and although I know it fairly well and have experience scripting on other mods with it, I don't really like using it. There are others who prefer Lua and you'll find no shortage of Lua scripters that can be found around GTA multiplayer modifications. On top of that, there are many useful resources in Lua from other GTA mods like FiveM and MTA SA. Lua's operators are generally more oriented around words instead of symbols, so in a sense it looks more like something you'd read/write rather than code. If you need help, Mex is our local Lua guru here at GTA Connected, bringing his ample experience from MTA:SA, VCO, and SOL-O (VCO and SOL-O both long gone) and his VLE resource is still the most advanced and sophisticated that I've ever seen in my many years within various GTA multiplayers.

But like the other languages it's not without it's shortcomings. It's not widely supported around the web and not many other projects have support for it. The syntax of Lua is the least similar to the others that GTA Connected provides, which makes converting or borrowing code from them (or vice verse) generally difficult and slow.

I hope you found this information useful.
Module Releases / SQlite Module
October 11, 2019, 11:44:21 PM
This is a simple SQlite module for those who want to use it for their server. This module was created by Jack Powell, but since he's busy working on GTAC updates, he gave me permission to make a topic and provide releases. Original GitHub repo here


Place into your server's "modules" folder and put "<module src="module_file_name.dll" />" into the modules section of your server XML. For Windows, this will end in a .dll extension, and for Linux it'll be a .so extention, and needs to match your server's architecture. It should look similar to this:
    <module src="gtac_sqlite_x64.dll" />
Here's a few events for entering and exiting vehicles and spheres:
addEvent("OnPedEnterSphere", 2);
addEvent("OnPedExitSphere", 2);
addEvent("OnPedEnterVehicle", 3);
addEvent("OnPedExitVehicle", 2);

addEventHandler("OnEntityProcess", function(event, entity) {
if(entity.isType(ELEMENT_PLAYER) || entity.isType(ELEMENT_CIVILIAN)) {
getElementsByType(ELEMENT_VEHICLE).forEach(function(vehicle) {
if(entity.vehicle == vehicle) {
if(entity.getData("in.vehicle") == null) {
triggerEvent("OnPedEnteredVehicle", entity, entity, vehicle, getPedVehicleSeat(entity));
triggerEvent("OnPedEnteredVehicle", vehicle, entity, vehicle, getPedVehicleSeat(entity));
entity.setData("in.vehicle", vehicle);
} else {
if(entity.getData("in.vehicle") == vehicle) {
triggerEvent("OnPedExitedVehicle", entity, entity, entity.getData("in.vehicle"));
triggerEvent("OnPedExitedVehicle", vehicle, entity, entity.getData("in.vehicle"));

getElementsByType(ELEMENT_MARKER).forEach(function(sphere) {
if(sphere.position.distance(entity.position) <= sphere.radius) {
if(entity.getData("in.sphere") == null) {
triggerEvent("OnPedEnterSphere", entity, entity, sphere);
triggerEvent("OnPedEnterSphere", sphere, entity, sphere);
entity.setData("in.sphere", true);
} else {
if(entity.getData("in.sphere") != null) {
triggerEvent("OnPedExitSphere", entity, entity, sphere);
triggerEvent("OnPedExitSphere", sphere, entity, sphere);

function getPedVehicleSeat(ped) {
for(let i=0;i<=3;i++) {
if(ped.vehicle.getOccupant(i) == ped) {
return i;
return 0;

Just throw that into any client script. Once in place, you can use event handlers with it like you normally would.

Event names are OnPedEnterSphere and OnPedExitSphere for the spheres and OnPedEnterVehicle and OnPedExitVehicle for vehicles.

These are bindable, so you can use bindEventHandler with any ped object, if you want.

Handler arguments are the same for both sphere events: (Ped, Sphere)

For vehicle events, the enter event is: (Ped, Vehicle, Seat) and the exit event is (Ped, Vehicle)

addEventHandler("OnPedExitSphere", function(event, ped, sphere) {
message("Ped " + String( + " entered sphere + " + String(, COLOUR_YELLOW);

// In this section, "sphere" references an existing sphere in the game world.
bindEventHandler("OnPedEnterSphere", sphere, function(event, ped, sphere) {
message("Ped " + String( + " entered sphere + " + String(, COLOUR_YELLOW);

addEventHandler("OnPedExitVehicle", function(event, ped, vehicle) {
message("Ped " + String( + " exited vehicle + " + String(, COLOUR_YELLOW);
Scripting Releases / [JS] Police Pursuit
July 15, 2019, 11:59:16 PM
What is it?

Just a couple simple snippets to make police cars chase you if you have a wanted level.

How it works:

If you have a wanted level, and a police car streams in with a police officer NPC driving it, they'll pursue you. Their speed depends on your wanted level. Obviously having a wanted level of 1 will make it easy to escape, while higher levels get more difficult.


This doesn't spawn any extra vehicles or add higher levels of law enforcement with more vehicles. It only uses what exists to pursue suspects.

Code: Side[/url] Side[/url]
Scripting Releases / [JS] Get Vehicles Within Range
July 06, 2019, 11:56:44 PM
Works both client and server-side.
function getVehiclesInRangeOfPos(pos, distance) {
    return getVehicles().filter(x => x.position.distance(pos) <= range);
Scripting Releases / [JS] Get Closest Vehicle
July 06, 2019, 11:54:58 PM
Works both client and server side.function getClosestVehicle(pos) {
    return getVehicles().reduce((i, j) => (i.position.distance(pos) <= j.position.distance(pos)) ? i : j);
General Chat / WYSIWYG Editor!
June 30, 2019, 02:48:01 AM
QuoteWow we got a WYSIWYG editor now!

That's so bold

Well I think it's very Italian

That's italics you idiot

Ya'll black.

Careful now, that's a grey area.

http]'s cute. I link to Lorem Ipsum[/url]
General Chat / What is GTA Connected?
June 14, 2019, 08:03:24 AM
Grand Theft Auto Connected (sometimes called GTA Connected or GTA:C for short) is a scriptable multiplayer modification (MP mod) that supports multiple GTA games, including GTA III, GTA Vice City, GTA San Andreas, and GTA IV.

It's basically the one mod to rule them all.

Before GTA Connected, each GTA game had a different modification to play online. These were created by different teams with a different development process and structure. The problem with that is you have to download each mod separately and you end up with a very different experiences when playing each of them. Also, some mods were more unstable than others, and some have poor sync. For server owners and scripters this also meant you had to completely rewrite your scripts to work on another mod to have a server for another game. Thus, GTA Connected was created under the idea of "why play all these different mods when you only need one?"

It's the same experience across every game. Same amazing sync, same stability and security, same "feel" to the games. No need to deal with different mods. Just download GTAC, choose a game, connect, and play! (You'll need to have a copy of the game you want to play on your PC, of course). For scripters, it's the ultimate dream: You only need to write your scripts once. The functions and structures are identical for every game (with a few minor exceptions). Need an example? Check out "Vortrex's Freeroam Server" on any of the games GTA Connected supports ... It runs the exact same scripts for each game all from the same server directory.
General Staff Chat / Testing Mentions
May 15, 2019, 10:41:34 PM