[0.4rel006]VC:MP API Extended

Started by NicusorN5, Oct 04, 2019, 12:17 PM

Previous topic - Next topic




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

  • Clone or fork this repository..
  • Open the VS 2019 project
  • Well that's it, have fun.


  • Getters and setters are mostly named like this:
Code (C++) Select
<field type> FieldName_g();
void FieldName_s(<field_type> param);
Atleast in my opinion, its good enough.
  •   Read only fields are often simple functions.
  •   Some fields use dynamic memory, so make sure to free the memory when needed. Example:
Code (C++) Select
char* Name = VCMP::Player::FindPlayer(id)->Name_g();
VCMP::Server::Message(strcat(strcat("[#ff0000]Player ",Name)," joined our server!"));
delete Name;
  • Bug reports and feedback are highly appreciated!

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




-> 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?