Includes/Plugins
y_ini: If you do not know how to use y_ini, read this thread. Not using the latest version of YSI! Update if you'd like to!
sscanf (include and plugin): You can read more about how it works in this thread.
zcmd: I prefer using zcmd, that's it. You can use y_commands If you do not like to use zcmd. this thread.
Whirlpool: Read about it in this thread. Used to hash the user's password in two situations: when the user registers and when he changes his password through the /changepass [newpassword] command.
Gamemodes Features
As this is a base gamemode for you to start your server, it doesn't contain as much as you might think it does. It contains the essential, the base. It contains an effective login and registration system using the powerful saving system that Y_INI is.Blog
The passwords are hashed using the Whirlpool plugin, which is a very powerful and secure plugin, consistently used throughout it's release in order not to compromise the user's security. No player should worry about having his account compromised anymore!
At the time, you're able to save the user's password, money, skin, kills and deaths. In a more completed version of GSI, I'll add position saving and gun saving aswell. It's not that hard to do, but it saves your time and allows you to work on other features.
You do not need to screw with your server.cfg anymore. A simple system to modify the server hostname, it's map, the weburl and everything else has been implemented within the gamemode itself, allowing easy costumization as seen below.
pawn Код:#define SERVER_NAME "San Andreas Online"
#define SERVER_VERSION "0.1a"
#define SERVER_WEB "www.******.com"
#define SERVER_MAP "San Andreas"
#define SERVER_HNAME "San Andreas Online [0.3z]"
#define SERVER_MODE "SAOnline 1.0"
main( ) {
new rconcmd[32]; // You can change the size relying to the size of your defines.
format(rconcmd, sizeof(rconcmd), "weburl %s", SERVER_WEB);
SendRconCommand(rconcmd);
format(rconcmd, sizeof(rconcmd), "hostname %s", SERVER_NAME);
SendRconCommand(rconcmd);
format(rconcmd, sizeof(rconcmd), "gamemodetext %s", SERVER_MODE);
SendRconCommand(rconcmd);
format(rconcmd, sizeof(rconcmd), "mapname %s", SERVER_MAP);
SendRconCommand(rconcmd);
}
Changelog (DD-MM-YYYY)
08-07-2014: Work on the gamemode began.
10-07-2014: Scrapped the inital idea of using mSelection for skin selection after OnPlayerSpawn, because it'd somehow limit the costumization of the gamemode.
11-07-2014: Finished the registration and login system.
14-07-2014: Added some commentaries throughout the gamemode.
15-07-2014: Gamemode released on the SA:MP forums. The first version of GSI has been released.
To-do list
Saving the player's position on disconnect.Download
Saving the user's weapons.
Adding a house system and a business system (to be released in an upcoming version of GSI).
Taking this gamemode as a base, I hope to create a roleplay, cops and robbers gamemode from it and release it on the forums.
SendRconCommand("weburl "SERVER_WEB"");
Could've just did this and saved a bit of memory:
pawn Код:
|
I advertise you use GitHub, that way you can be more helped to do this.
Think in that. - nice job, put some pictures in future. |