28.06.2014, 19:29
Hello everbody!
From BSRP
Today I present: The gamemode BSQL as:
Blank Structured Query Language
A MySQL base script
Script made for RolePlay/FR/Stunt
Encrypted player password with md5
Exactly: 250 lines (with lines of information that you can remove)
Time spent in script: 2 hours 30 minutes
Next version will have vehicles
Details:
This gamemode has a internal path in the includes where gets the information to setuptables and get the player variables to the database
Reference 2348: їWhat is MD5?:
This kind of encrypt has been utilized in a wide variety of cryptographic applications, and is also commonly used to verify data integrity.
Reference 3487: Set the database name in the script: In the gamemode script look for a #define SQL_DB "here put the name of your db"
FAQ:



From BSRP
Today I present: The gamemode BSQL as:
Blank Structured Query Language
A MySQL base script
Script made for RolePlay/FR/Stunt
Encrypted player password with md5
Exactly: 250 lines (with lines of information that you can remove)
Time spent in script: 2 hours 30 minutes
Next version will have vehicles
Details:
- Login/Register in Dialog
- Includes organized to create tables with only start the GameMode
- Save/Load Accounts system
- Encryptation of the Player Password with md5 (Reference:#2348)
- Verifies if a player is Registered before to spawn
- (June/28/2014) v0.1: Gamemode base Player: Register/Login Save/Load finished.
- Before of use:
- MySQL knowledge
- Keep credits at least in the script
- A host server EX: Wamp or Xampp
- Create a database in phpmyadmin
- Set the database name in the script (change the user/password) if is localhost leave as is 127.0.0.1
- Includes needed:
- a_samp
- CreateUT forward UserStats (Located in includes in the folders 'CTABLES" and "ITABLES" respectively)
- sscanf2
- zcmd
- Plugins needed:
- mysql (.dll for windows or .so for linux)
- sscanf (.dll for windows or .so for linux)
This gamemode has a internal path in the includes where gets the information to setuptables and get the player variables to the database
- Inside of the file CreateUT.inc where the callback has some lines with this: mysql_query("ALTER TABLE "@TABLEUSERS" ADD "@P_Staff" INT(20) NOT NULL");
@TABLEUSERS is for add the information (in this case) @P_Staff with Intenger of 20 characters long and the row will not be NULL.
You may can edit/add/remove files in any moment the information @P_Staff come from the include /ITABLES/UserStats.inc (You may can edit/add/remove things from here - If you want to add for example a Key for a car (roleplay servers)
- 1) Step: You need to define the information in the include /ITABLES/UserStats.inc #define @P_CarKey "Automobile1" in the bottom
- 2) Step: You need to add now the information to /CTABLES/CreateUT.inc like the previously example
- 3) Step: The definition must look like this: mysql_query("ALTER TABLE "@TABLEUSERS" ADD "@P_CarKey" INT(20) NOT NULL"); New information must be added in the last.
- 4) Step: Now you have set and saved the includes go to the script in the enumerator pInfo add in the last (for example) the variable Auto_1
- 5) Step: To save the Key of a car in the user's account go to the stock SavePlayerAccount and you have add to something like this in the last:
pawn Код:format(Buffer, sizeof(Buffer), "UPDATE "@TABLEUSERS" SET "@P_CarKey"='%d' WHERE "@USQLID" ='%d'",
PlayerInfo[playerid][Auto_1],PlayerInfo[playerid][pSQLID]);
mysql_query(Buffer); - 6) Step To load the Key of the car when a player connects go to the stock LoadPlayerAccount and you have to add the new variable
pawn Код:if (row == 9) PlayerInfo[playerid][pMoney] = strval(Field);//this get money of the player
//if the last row is 9 now the next will be the 10 and thus continuously. You have to add this;
if (row == 10) PlayerInfo[playerid][Auto_1] = strval(Field);//this get Key of the car that has the player
Reference 2348: їWhat is MD5?:
This kind of encrypt has been utilized in a wide variety of cryptographic applications, and is also commonly used to verify data integrity.
Reference 3487: Set the database name in the script: In the gamemode script look for a #define SQL_DB "here put the name of your db"
FAQ:
- їHow do I start this gamemode? First at all you need to have installed and running the host server previously required (Wamp or Xamp).
- їWhy the console closes immediately? Go and open server.cfg and change the password (Default: changeme).
- їWhy appear this in console [gamemodes/mysql.amx]: Run time error 19: "File or function is not found"?
May you do not have the two plugins [sscanf.dll and mysql.dll or .so] (accord to your system) in the folder /plugins. - їHow do I create a database in phpmyadmin? Go to http://127.0.0.1/phpmyadmin/ Click in "databases" later in the Create database in the field put (example: samp) samp will be the name of your database select collation and create later set this name in the script (Reference:#3487)
- Click here to download full pack (includes/plugins)
- Click here to download only pawn file [Not recommended if you want compile]
- Click here to download only GM includes
- SA-MP Server 0.3z R2-2 (By SA-MP Team)
- sscanf Include/Plugin (By ******)
- ****** Thread Click here
- Windows Plugin: http://dl.dropbox.com/u/21683085/sscanf.rar
- Linux Plugin: http://ubuntuone.com/1NN2QHc7w1kGpBbntSAz7N
- Include sscanf2: http://pastebin.com/aY2cnzhr
- ****** Thread Click here
- MySQL Include/Plugin (By BlueG)
- BlueG Thread Click here
- Windows Plugin http://files.g-stylezzz.com/mysql/re...-win32_vs9.rar
- Libmysqlclient Windows: http://files.g-stylezzz.com/libmySQL.dll
- Linux Plugin http://files.g-stylezzz.com/mysql/re...entos/mysql.so
- Libmysqlclient Linux CentOS: http://www.mow.vg/files/libmysqlclient.so.15
- Include a_mysql: http://files.g-stylezzz.com/mysql/rel/a_mysql.inc
- BlueG Thread Click here
- Include zcmd (By Zeex)
- Include zcmd: http://solidfiles.com/d/879d1213462f...16d464e90c8cf9



Credits:
Kalcor
Jex_Lafer (Dev Script)
BlueG (MySQL Plugin/Include)
****** (sscanf2 Plugin/Include)
Zeex (zcmd Include)
Jex_Lafer (Dev Script)
BlueG (MySQL Plugin/Include)
****** (sscanf2 Plugin/Include)
Zeex (zcmd Include)