29.07.2007, 21:58
Recently I was working on wrapping 99% of PAWN SA-MP API functions and callbacks to C++ allowing to easily write gamemodes completely with C++. (I dislike PawnFunction(), don't complain). This resulted in a quite cute to my mind modular system, with clean code code and easy to use. It's Windows-only compatible now as I have never programmed for unix\linux\bsd 
It even has some features
:
The base of extensible modular system for programming gamemodes with C++.
Dynamic reloading of gamemode.dll on the fly. No need to quit the game or restart the server. Great for debug.
Built-in support for MySQL using open-source LibMySQL provided by MySQL dev team.
Embed insecure but very simple network protocol over TCP\IP.
Two code screenshots:
http://scary-zet.fatal.ru/stuff/samw_src1.png
http://scary-zet.fatal.ru/stuff/samw_src2.png
I decided to release the source code of the current alpha of my SA-MP C++ Wrapper. I define the license as GNU GPL.
Download: http://www.solyariscat.com/zet/
It also contains preconfigured sa-mp server inside.
There is the solution for Microsoft Visual Studio in the archive.
The system doesn't support multiple gamemodes on a server currently. However, this can be implemented.
Not all SA-MP API functions are ported. Review the samp.h for details. Don't complain.
A plugin for sa-mp server is wrapper.dll. The gamemode logic is defined by gamemode.dll.
empty.pwn server script is not empty due to testing reasons. Clean it if you wish.
wrapper.amx filterscript is required for SA-MP C++ Wrapper to work.
Put the code into the Gamemode project. Compile and enjoy. Both Wrapper and Gamemode will be compiled right into plugins folder if you don't change the folders structure.
When you re-compile your gamemode.dll, there's no need to shutdown the server or quit the game if you're online.
Review sys::CMySQL for MySQL support.
Review protocol::CSocket and protocol::XPacket for network support.
The version of code is alpha. It may contain bugs. Use it at your own risk.
Feedback is appreciated.

It even has some features





Two code screenshots:
http://scary-zet.fatal.ru/stuff/samw_src1.png
http://scary-zet.fatal.ru/stuff/samw_src2.png
I decided to release the source code of the current alpha of my SA-MP C++ Wrapper. I define the license as GNU GPL.
Download: http://www.solyariscat.com/zet/
It also contains preconfigured sa-mp server inside.










The version of code is alpha. It may contain bugs. Use it at your own risk.
Feedback is appreciated.