Vice City: Multiplayer

VC:MP Discussion => General Discussion => Topic started by: Athanatos on October 4th, 2019, 01:17 PM

Title: [0.4rel006]VC:MP API Extended
Post by: Athanatos on October 4th, 2019, 01:17 PM



An extension to the VC:MP's API that makes creating plugins hopefully easier by wrapping the original VC:MP API into a namespace with some classes, so the code will be hopefully easier to understand, read and write!

(Small note: the following code examples may not work, because they are not tested.)

How to setup


Code: (C++) [Select]
<field type> FieldName_g();
void FieldName_s(<field_type> param);
Atleast in my opinion, its good enough.
Code: (C++) [Select]
char* Name = VCMP::Player::FindPlayer(id)->Name_g();
VCMP::Server::Message(strcat(strcat("[#ff0000]Player ",Name)," joined our server!"));
delete Name;

Personal note

   I made this in hope to help persons that want to create their gamemode/plugins in C++ .  Writing this <plugin/extension/addition> took me less than a month as a total time, see the repositories.
   Any feedback, suggestions, they are all welcome since I didn't test this. (Before you say: omg you dont test your shit) I'm going to use this to remake my VC:MP server (RCNR).

   And if you say that the using the original SDK is a better idea, there are some proofs it isnt:
1.) Code is more organised than in the original SDK.
2.) This extension is made, as I said before to help persons that want to start making a server strictly in C++.
3.) This extensions also takes care of some of the possible errors can that happen runtime (if a player exists or not, etc).

Github Repository

Title: Re: [0.4rel006]VC:MP API Extended
Post by: DarkRaZoR^ on October 4th, 2019, 05:31 PM
C++'s my language! (y)
Title: Re: [0.4rel006]VC:MP API Extended
Post by: Athanatos on July 23rd, 2021, 11:44 AM
-> Begins to use this for some project
-> API doesn't compile
-> Looks at code

"What the fuck is this sh*t?"

What the fuck I was high on while writing this????

Did I even check if it compiles back then?