13.03.2010, 01:12
If you don't know me yet, here's a quote from my old release located at: http://forum.sa-mp.com/index.php?topic=157771.0'
Recently, I've been studying more of PAWN and the functions available at http://www.wiki.sa-mp.com. I came across a mysql plugin and was interested in using it for a future release. So I made a advanced registration system. Some features are found below:
In my opinion, I think whoever that is interested into this, that you use this as a base registration system, because of the adminlevel and bank etc. The codes below is a example how to edit the register and login messages. This is a premade example that's already included.
I know alot of users will have trouble with the query installation for PHPMyAdmin or something similar, the code is below, just simply insert it into your database.
I would like to give some credits/props to some people who helped me make this.
Seif: The function define.
ZeeX Zcmd.
If you get some errors, for example:
or something similar the download includes are below also.
MySQL include: http://forum.sa-mp.com/index.php?topic=79352.0
Zcmd include: http://forum.sa-mp.com/index.php?topic=116240.0
Script download: http://pastebin.com/eT0xTThB
Enjoy :P
Quote:
Some of you have seen me on the forums so far, i'm pretty much new to scripting, I'm a c++ coder and a PHP coder, so PAWN is easier for me atm. I noticed people were releasing scripts here, and I thought, why not make something that isn't in SA-MP, like the teargas feature, so I simply, went into Pawno, and did my thing. |
- 100% MySQL.
- Easily editable - You can edit the messages easily and mysql info.
- Toggle Autologin - You can toggle autologin on, or off.
- Force login - You are able to toggle force login on or off, ( used for RP server )
- Force login dialogs
- Easy to edit registration and login system.
- Saves: money, health, armour, adminlevel, bank
In my opinion, I think whoever that is interested into this, that you use this as a base registration system, because of the adminlevel and bank etc. The codes below is a example how to edit the register and login messages. This is a premade example that's already included.
pawn Code:
function OnPlayerLogin(playerid) {
// In this function you can make a user forcespawn. This is called after someone logged in..
GivePlayerMoney(playerid, PlayerAccount[playerid][Money]);
SetPlayerHealth(playerid, PlayerAccount[playerid][Health]);
SetPlayerHealth(playerid, PlayerAccount[playerid][Armour]);
AccountData[playerid][Logged] = true;
}
pawn Code:
function OnPlayerRegister(playerid) {
// In this function you can make a user forcespawn. This is called after someone registered.
AccountData[playerid][Account] = true;
#if defined Force_Login
{
ShowPlayerDialog(playerid,1,DIALOG_STYLE_INPUT,"Login","Enter your password below:","Login","Cancel"); }
#endif
}
Code:
CREATE TABLE IF NOT EXISTS `YOUR TABLE NAME!` ( `Name` text NOT NULL, `Password` text NOT NULL, `IP` text NOT NULL, `Money` int(20) NOT NULL, `AdminLevel` int(20) NOT NULL, `Health` float NOT NULL, `Armour` float NOT NULL, `Bank` int(20) NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
Seif: The function define.
pawn Code:
#define function%0(%1) stock%0(%1)
If you get some errors, for example:
pawn Code:
fatal error 100: cannot read from file: "zcmd"
MySQL include: http://forum.sa-mp.com/index.php?topic=79352.0
Zcmd include: http://forum.sa-mp.com/index.php?topic=116240.0
Script download: http://pastebin.com/eT0xTThB
Enjoy :P