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