nowofresh Posted January 9, 2011 Posted January 9, 2011 Hey, I try to create new login, using mysql plugin to mta. My currently table based on paradise. Passwords are code by SALT and, how to decode it and check with what player wrote ? function checkUser() export = exports.sql:query_assoc_single( "SELECT * FROM wcf1_user WHERE username = " .. tonumber( username ) ) username = null if(source == source.loginbutton) then local wpisanynick = guiGetText(source.loginLabel) end if wpisanynick == username then outputChatBox ( "[Good login]" ) else outputChatBox ( "[bad login]" ) end end Can u get me fast MTA-SQL tutorial ? Hey,
nowofresh Posted January 9, 2011 Author Posted January 9, 2011 ... Can u edit, my script to client and server ? function checkUser() eksportuj = exports.sql:query_assoc_single( "SELECT * FROM wcf1_user WHERE username = " .. tonumber( username ) ) if(source == source.loginbutton) then local wpisanynick = guiGetText(source.loginLabel) end if wpisanynick == username then outputChatBox ( "[Login jest dobry]" ) else outputChatBox ( "[Login jest zly]" ) end end
Castillo Posted January 9, 2011 Posted January 9, 2011 you already triple posted.. use the "EDIT" button you can use triggerServerEvent
Timic Posted January 12, 2011 Posted January 12, 2011 client-only: https://wiki.multitheftauto.com/wiki/TriggerServerEvent server-only: https://wiki.multitheftauto.com/wiki/TriggerClientEvent
12p Posted January 12, 2011 Posted January 12, 2011 Go check some login systems in Community, then try to understand them, and then do one by yourself.
dragonofdark Posted January 12, 2011 Posted January 12, 2011 I saw that someone talked about MySQL in mabako's mta:paradise... So, I have a question. I want to install MTA:paradise on my server (hosted on gta-multi) so : - I reinstall the server (to be sure to have no wrong file). - I put paradise files on the server. - I modify the settings.xml and now I have that : <settings> <setting name="*deathpickups.only_current" value="[ false ]" /> <setting name="@sql.user" value="174_groupe-tgmc"/> <setting name="@sql.password" value="MYPASS"/> <setting name="@sql.database" value="174_groupe-tgmc"/> <setting name="@sql.hostname" value="localhost"/> <setting name="@sql.port" value="3306"/> <!-- Only use this on Linux if the normal connection does fail even though using the correct username & password. --> <setting name="@sql.socket" value="/var/run/mysqld/mysqld.sock"/> <!-- Registration --> <setting name="@players.allow_registration" value="1"/><!-- Change to 0 to disable registration and show an error message --> <setting name="@players.registration_error_message" value="Il vous est impossible de vous enrengistrer pour le moment."/> </settings> - The mtaserver.conf is, for me, okay. The module section is that : <!-- Specifies the module(s) which are loaded with the server. To load several modules, add more <module> parameter(s). Optional parameter. --> <module src="mta_mysql.so"/> <module src="sha.so"/> <module src="ml_sockets.so"/> --> But when I start the server, It stops automatically and I've that in the server.log : =========================================================== = Multi Theft Auto: San Andreas v1.0.4-release-2155 =========================================================== = Server name : The Gamer/Modder Community RP = Server IP address: 188.165.225.144 = Server port : 6505 = = Log file : ..175/174/MTA/mods/deathmatch/logs/server.log = Maximum players : 16 = MTU packet size : 1264 = HTTP port : 23003 =========================================================== [2011-01-13 00:42:38] Resources: 30 loaded, 0 failed [2011-01-13 00:42:38] Server password set to 'PRIVATE' [2011-01-13 00:42:38] Querying game-monitor.com master server... success! [2011-01-13 00:42:38] Querying backup master server... success! [2011-01-13 00:42:38] MODULE: Loaded "MySQL 5.0 database module" (0.41) by "Alberto Alonso <[email protected]>" [2011-01-13 00:42:38] MODULE: Loaded "SHA Module" (1.02) by "mabako" [2011-01-13 00:42:38] MODULE: Loaded "Sockets Module" (0.10) by "Gamesnert, mabako, MCvarial & x86" [2011-01-13 00:42:38] Starting resources.... [2011-01-13 00:42:38] ERROR: Unable to start resource sql; Start up of resource cancelled by script [2011-01-13 00:42:38] ERROR: Unable to start resource irc; Start up of resource cancelled by script [2011-01-13 00:42:38] ERROR: Unable to start resource players; Start up of resource cancelled by script [2011-01-13 00:42:38] ERROR: Unable to start resource vehicles; Start up of resource cancelled by script [2011-01-13 00:42:38] ERROR: Unable to start resource interiors; Start up of resource cancelled by script [2011-01-13 00:42:38] ERROR: Unable to start resource items; Start up of resource cancelled by script [2011-01-13 00:42:38] ERROR: Unable to start resource shops; Start up of resource cancelled by script [2011-01-13 00:42:39] ERROR: Unable to start resource maps; Start up of resource cancelled by script [2011-01-13 00:42:39] ERROR: Unable to start resource teleports; Start up of resource cancelled by script [2011-01-13 00:42:39] ERROR: Unable to start resource bank; Start up of resource cancelled by script [2011-01-13 00:42:39] ERROR: Unable to start resource factions; Start up of resource cancelled by script [2011-01-13 00:42:39] ERROR: Unable to start resource 3dtext; Start up of resource cancelled by script [2011-01-13 00:42:39] Server started and is ready to accept connections! [2011-01-13 00:42:39] Type 'help' for a list of commands. [2011-01-13 00:42:39] _ _ _ [2011-01-13 00:42:39] | | | (_) [2011-01-13 00:42:39] _ __ ___ | |_ __ _ _ __ __ _ _ __ __ _ __| |_ ___ ___ [2011-01-13 00:42:39] | '_ ` _ \| __/ _` | | '_ \ / _` | '__/ _` |/ _` | / __|/ _ \ [2011-01-13 00:42:39] | | | | | | || (_| | | |_) | (_| | | | (_| | (_| | \__ \ __/ [2011-01-13 00:42:39] |_| |_| |_|\__\__,_| | .__/ \__,_|_| \__,_|\__,_|_|___/\___| [2011-01-13 00:42:39] | | [2011-01-13 00:42:39] |_| v1.00 [2011-01-13 00:42:39] Server stopped! [2011-01-13 00:42:39] Stopping resources................... [2011-01-13 00:42:39] Closing SQLite3 database [2011-01-13 00:42:39] Closing SQLite3 database Could anyone help me on this ? (I've searched for the problem but I can't find) Thanks in advance, dragonofdark
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now