- 
                Posts1,273
- 
                Joined
- 
                Last visited
- 
                Days Won1
Everything posted by GTX
- 
	A. Same answer Q. Same question
- 
	I'd like to use these, but in this case I will use mysql_connect, mysql_query... I can't find solution why it returns nil...
- 
	A. Take a plane. Q. Will you?
- 
	A. 0.00000001€ Q. Why do you care?
- 
	Hello. I was trying to make "protection" for my script. function CHECKING() result = mysql_query(connect_mysql_check, "SELECT name FROM granted") if (result) then while true do local row = mysql_fetch_assoc(result) if not row then break end if getParticalServerName(row.name) then CONNECT() else WRONG() end end end mysql_free_result(result) end connect_mysql_check = mysql_connect(host, user, password, database_, 3306, "/var/run/mysqld/mysqld.sock") if not connect_mysql_check then outputChatBox("#FF8800[TOPTIMES] #FF6565Could not connect with MySQL Server.", getRootElement(), 255, 255, 255, true) else setTimer(CHECKING, 500, 1) end local row = mysql_fetch_assoc(result) at line 4 returns nil. Why?
- 
	Ah, I was a bit confused... Thank you!
- 
	Ah yes, I noticed. Thank you! But it still doesn't write to servers.txt
- 
	Oh, forgot to ment. Well, it doesn't write anything in servers.txt. Also, doesn't return "1".
- 
	Hello. I wanted to insert server name to servers.txt file. And now I had problem: LUA: function result(str) outputChatBox("#FF8800[TOPTIMES] #FF6565Fetching data...", getRootElement(), 255, 255, 255, true) if str ~= nil then if str == "ua" then outputChatBox("#FF8800[TOPTIMES] #FF6565Your license is not valid! Please, contact GTX#!", getRootElement(), 255, 255, 255, true) if str == "1" then outputChatBox("#FF8800[TOPTIMES] #FF6565Data fetched! Welcome!", getRootElement(), 255, 255, 255, true) if str == "0" then outputChatBox("#FF8800[TOPTIMES] #FF6565Terminating script...", getRootElement(), 255, 255, 255, true) outputChatBox("#FF8800[TOPTIMES] #FF6565STEALERS ARE NOT WELCOME!", getRootElement(), 255, 255, 255, true) outputChatBox("#FF8800[TOPTIMES] #FF6565PLEASE, RE-LICENSE THIS BY ASKING GTX#!", getRootElement(), 255, 255, 255, true) stopResource(getThisResource()) end end end end end function check_license() --outputChatBox"sending" callRemote("http://128.204.203.114/mta/toptimes_protection.php", result, getServerName()) --outputChatBox(getServerName()) --outputChatBox"sent" end addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), check_license) PHP (SDK): <?php include("sdk/mta_sdk.php"); $table = mta::getInput(); $text = $table[1]; if(isset($text)){ $file = "servers.txt"; $fh = fopen($file, 'a+'); $stringData = $text; fwrite($fh, $stringData."\n"); fclose($file); } $code = "1"; mta::doReturn($code); ?>
- 
	Yes, I installed MySQL server first. I'm running my server on Debian 64bit. MySQL works fine without innodb, networking and locking.
- 
	I tried to reinstall, reboot and it didn't work. I'm hosting on domVPS.com.
- 
	He already posted his ACL, and he added the sql resource to ACL. As far as I remember, admin doesn't rights to command "shutdown"
- 
	Did you wrote correct password? Try by creating new user.
- 
	Did you put libmysql.dll into your folder where MTA Server.exe is?
- 
	Hello. I got problem with MySQL. I don't know if it's a bug or problem but it outputs this when I start the server: ERROR: Unable to connect to mysql: (2002) Can't connect to local MySQL Server trought socket '/var/lib/mysql/mysql.sock' (2) It's running on a VPS, I guess I installed MySQL correctly. Any idea? Thanks in advance.
- 
	Oh yes, I forgot to remove it. Thank you both!
- 
	Hello, I don't know why this is but I got problem "attempt to concatenate a boolean value" function getRaceAlivePlayers() local result = {} local _getAlivePlayers = getElementsByType("player") for i, v in ipairs(_getAlivePlayers) do if getElementData(v, "state") == "alive" then table.insert(result, v) end end return result end function get() local ap = 0 local _getAlivePlayers = getElementsByType("player") for index, player in ipairs(_getAlivePlayers) do if getElementData(player, "state") == "alive" then ap = ap + 1 end end return ap end -- -- addEventHandler("onPlayerWasted", root, function() if get() == 1 then outputChatBox(getPlayerFromName(tostring(getRaceAlivePlayers()[1])) .. " has won") end end ) Thanks in advance
- 
	Car mod: https://community.multitheftauto.com/index.php?p= ... ls&id=4080
- 
	Type /debugscript 3 and tell us what's the problem
- 
	What the... Use [lua] [ /lua] tags and also we will not do it for you, learn LUA.
- 
	I'm just wondering, because I have no idea how to get attacker!

 
            
        