Vice City: Multiplayer

Server Development => Scripting and Server Management => Script Showroom => Topic started by: DMWarrior on Aug 20, 2019, 12:25 PM

Title: An attempt to "refactor" VC:MP Blank Server
Post by: DMWarrior on Aug 20, 2019, 12:25 PM
Hello.

I just found VC:MP 0.4 Blank Server (https://forum.vc-mp.org/?topic=33.0) and decided to take a look at how to setup a VC:MP server. But while it's good enough for running locally and see if everything runs fine, I felt annoyed with some parts when I was trying to get started. Some of my thoughts:


I also feel that reading documentation in portuguese instead of english would be more comfortable for me, so I decided to look through all the code and try to document, comment and explain the best I could with this language in mind.

And here's my result:
Download Link (reupload) (https://dl.dropboxusercontent.com/s/2v38vt81nbnymnq/VCMP%200.4%20Blank%20Server%20Plus%20%28portuguese%29%20-%2020rd%20Oct%2C%202019.zip)

Here are some of my changes:

There were at least 3 things I wanted to do, but didn't:

Everything is written in portuguese, but I encourage anyone else to do the same in english as well. I know there's nothing special about adding a bunch of vague descriptions on top of functions, but it does help, specially for actual working code like SendDataToClient() and SendDataToServer(). When they're commented that way, people can see what everything does straight away. Some functions may also be confusing to differentiate, like onGameResize() and GUI::gameResize().

Some of my thoughs on Blank Server are mostly opinion-based. This is also  basically the same code, just commented out (and in another language).

Even though you don't understand portuguese, please give a look. I hope you like my try on "refactoring" Blank Server's code (more like "rewriting everything specifically for me to understand", but yeah...).

Blank Server is great for what's intended to be: a quick and easy way to test and start a server. It's just a little messy, but good enough to get you started. So thanks to Sebastian for providing it.
Title: Re: An attempt to "refactor" VC:MP Blank Server
Post by: NicusorN5 on Aug 20, 2019, 02:08 PM
I was thinking of doing something like this, but you nailed it! Great one!
Title: Re: An attempt to "refactor" VC:MP Blank Server
Post by: MatheuS on Aug 20, 2019, 02:21 PM
Very good!


Portuguese: isso vai ser bom pra ajudar alguns novatos que ainda não sabem como montar um servidor para o VCMP.
Title: Re: An attempt to "refactor" VC:MP Blank Server
Post by: Sebastian on Aug 20, 2019, 03:24 PM
That's one great thing you have done here.

I used to know what every event is for, so never thought of explaining them.
Seems like newer players didn't need them either, even if they do haha. It is a good add-on.
Title: Re: An attempt to "refactor" VC:MP Blank Server
Post by: KingDark on Dec 31, 2019, 08:54 PM

The link does not work, it takes you to the page, but the file you want to download has been deleted
Title: Re: An attempt to "refactor" VC:MP Blank Server
Post by: Mursaleen5544 on Jan 03, 2020, 11:53 AM
I needed this one please upload asap.
Title: Re: An attempt to "refactor" VC:MP Blank Server
Post by: DMWarrior on Jan 07, 2020, 12:35 PM
Reuploaded the file and updated the download link:
Download Link (reupload) (https://dl.dropboxusercontent.com/s/2v38vt81nbnymnq/VCMP%200.4%20Blank%20Server%20Plus%20%28portuguese%29%20-%2020rd%20Oct%2C%202019.zip)