Jump to content

k0ed298

Members
  • Posts

    94
  • Joined

  • Last visited

Everything posted by k0ed298

  1. i need the code/cmd for it thats what i said.
  2. Im using like vedic/vg scripts. You can on these scripts , i just need the cmd for it
  3. i did /addatm and i cant deposit money. Whats the cmd for a atm where u can deposit money.
  4. i know how to do it but when i try to do it for the interiors or the factions that error comes up ,
  5. says this , SQL query: -- -- Dumping data for table `factions` -- INSERT INTO `factions` (`id`, `name`, `bankbalance`, `type`, `rank_1`, `rank_2`, `rank_3`, `rank_4`, `rank_5`, `rank_6`, `rank_7`, `rank_8`, `rank_9`, `rank_10`, `rank_11`, `rank_12`, `rank_13`, `rank_14`, `rank_15`, `rank_16`, `wage_1`, `wage_2`, `wage_3`, `wage_4`, `wage_5`, `wage_6`, `wage_7`, `wage_8`, `wage_9`, `wage_10`, `wage_11`, `wage_12`, `wage_13`, `wage_14`, `wage_15`, `wage_16`, `motd`) VALUES (74, 'Eastside Rollin 20s Bloods', 0, 0, 'Inactive', 'R.I.P. Nigga', 'New Kid', 'Hood Bitch', 'Pasty White Bitch', 'Hangaround', 'Slanga', 'Hoo Rider', 'Young Gangsta', 'Gangsta Nigga', 'Original Gangsta', 'Street Lieutenant', 'Hood King', 'I <3 Popcorns Sister', '', '', 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 'Lock and Handbrake Faction Bikes after use. | Vent Channel PW: Pasty | There is a chem set at the NPC do not take it, it is only to be used at the NPC.'), (57, 'First Bank of Los Santos', 824[...] MySQL said: #1062 - Duplicate entry '1' for key 'id'
  6. but when i do that. It overwrites the whole sql or it doesnt work. How do i just export a table like eg " accounts " and import it into a another sql . Without whiping everything.
  7. i figured out the mysql problem in the console i just need help on moving tables and that from one sql to another threw phpmyadmin
  8. like on the phpmyadmin , how you have all the tables and that like e.g the accounts with everyones usernames and that , i need to move interiors tables from on sql to another
  9. How do i move information from one SQL to another ?
  10. i fixed it. But i need to know how to get information from one sql to another. :l
  11. And nope doesnt work. Can one of yous add me on skype ? deroboyy97 , and team viewer me ?
  12. Why "test" ? the database is called vgtest D:
  13. How do u install it ? My friend did it for me . And he wont help me . Do you have skype ? .
  14. that error still comes up and these still come up . ERROR: exports: Call to non-running server resource <mysql> [string]] Error: unable to connect to mysql: <1044> Access denied for user"@' localhost to database 'mta'
  15. Its there. I will download it again .
  16. Nope. Thats why im asking for help. Obviously.
  17. i changed it but it comes up with MODULE: Unable to load modules/libmysql.dll ERROR: exports: Call to non-running server resource <mysql> [string]] Error: unable to connect to mysql: <1044> Access denied for user"@' localhost to database 'mta' And the database isnt "mta" is vgtest . Do you have skype ?
  18. MYSQL wont work and i have done everything and i cant get the logs. It comes up with mysql errors in the console but doesnt show them in logs . But here are my mysql files. Tell me if ive missed anything ; s_mysql file : username = get( "username" ) or "root" password = get( "password" ) or "" db = get( "database" ) or "vgtest" host = get( "hostname" ) or "* my ip address.. Is acutally here but i dont want u to seee * " port = tonumber( get( "port" ) ) or 3306 function getMySQLUsername(root) return username end function getMySQLPassword() return password end function getMySQLDBName() return db end function getMySQLHost() return host end function getMySQLPort() return port end function lazyQuery(message) local filename = "/lazyqueries.log" local file = createFileIfNotExists(filename) local size = fileGetSize(file) fileSetPos(file, size) fileWrite(file, message .. "\r\n") fileFlush(file) fileClose(file) return true end function createFileIfNotExists(filename) local file = fileOpen(filename) if not (file) then file = fileCreate(filename) end return file end connection file -- connection settings local hostname = get( "hostname" ) or "localhost" local username = get( "username" ) or "root" local password = get( "password" ) or "" local database = get( "database" ) or "vgtest" local port = tonumber( get( "port" ) ) or 3306 -- global things. local MySQLConnection = nil local resultPool = { } local queryPool = { } local sqllog = false local countqueries = 0 -- connectToDatabase - Internal function, to spawn a DB connection function connectToDatabase(res) MySQLConnection = mysql_connect(hostname, username, password, database, port) if (not MySQLConnection) then if (res == getThisResource()) then cancelEvent(true, "Cannot connect to the database.") end return nil end return nil end addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), connectToDatabase, false) -- destroyDatabaseConnection - Internal function, kill the connection if theres one. function destroyDatabaseConnection() if (not MySQLConnection) then return nil end mysql_close(MySQLConnection) return nil end addEventHandler("onResourceStop", getResourceRootElement(getThisResource()), destroyDatabaseConnection, false) -- do something usefull here function logSQLError(str) local message = str or 'N/A' outputDebugString("MYSQL ERROR "..mysql_errno(MySQLConnection) .. ": " .. mysql_error(MySQLConnection)) exports['logs']:logMessage("MYSQL ERROR [QUERY] " .. message .. " [ERROR] " .. mysql_errno(MySQLConnection) .. ": " .. mysql_error(MySQLConnection), 24) end function getFreeResultPoolID() local size = #resultPool if (size == 0) then return 1 end for index, query in ipairs(resultPool) do if (query == nil) then return index end end return (size + 1) end ------------ EXPORTED FUNCTIONS --------------- function ping() if (mysql_ping(MySQLConnection) == false) then -- FUU, NO MOAR CONNECTION destroyDatabaseConnection() connectToDatabase(nil) if (mysql_ping(MySQLConnection) == false) then logSQLError() return false end return true end return true end function escape_string(str) if (ping()) then return mysql_escape_string(MySQLConnection, str) end return false end function query(str) if sqllog then exports['logs']:logMessage(str, 24) end countqueries = countqueries + 1 if (ping()) then local result = mysql_query(MySQLConnection, str) if (not result) then logSQLError(str) return false end local resultid = getFreeResultPoolID() resultPool[resultid] = result queryPool[resultid] = str return resultid end return false end function unbuffered_query(str) if sqllog then exports['logs']:logMessage(str, 24) end countqueries = countqueries + 1 if (ping()) then local result = mysql_unbuffered_query(MySQLConnection, str) if (not result) then logSQLError(str) return false end local resultid = getFreeResultPoolID() resultPool[resultid] = result queryPool[resultid] = str return resultid end return false end function query_free(str) local queryresult = query(str) if not (queryresult == false) then free_result(queryresult) return true end return false end function rows_assoc(resultid) if (not resultPool[resultid]) then return false end return mysql_rows_assoc(resultPool[resultid]) end function fetch_assoc(resultid) if (not resultPool[resultid]) then return false end return mysql_fetch_assoc(resultPool[resultid]) end function free_result(resultid) if (not resultPool[resultid]) then return false end mysql_free_result(resultPool[resultid]) table.remove(resultPool, resultid) table.remove(queryPool, resultid) return nil end -- incase a nub wants to use it, FINE function result(resultid, row_offset, field_offset) if (not resultPool[resultid]) then return false end return mysql_result(resultPool[resultid], row_offset, field_offset) end function num_rows(resultid) if (not resultPool[resultid]) then return false end return mysql_num_rows(resultPool[resultid]) end function insert_id() return mysql_insert_id(MySQLConnection) or false end function query_fetch_assoc(str) local queryresult = query(str) if not (queryresult == false) then local result = fetch_assoc(queryresult) free_result(queryresult) return result end return false end function query_rows_assoc(str) local queryresult = query(str) if not (queryresult == false) then local result = rows_assoc(queryresult) free_result(queryresult) return result end return false end function query_insert_free(str) local queryresult = query(str) if not (queryresult == false) then local result = insert_id() free_result(queryresult) return result end return false end function escape_string(str) return mysql_escape_string(MySQLConnection, str) end function debugMode() if (sqllog) then sqllog = false else sqllog = true end return sqllog end function returnQueryStats() return countqueries -- maybe later more end function getOpenQueryStr( resultid ) if (not queryPool[resultid]) then return false end return queryPool[resultid] end
  19. Los santo's MTA Roleplay. This is a new roleplay server. LSPD and admin spots are open. There are a few bugs but i am fixing them Server will be running from 8am - 10pm australian time. To check to see if the server is running go to here. : http://mtalossantosrp.freeforums.org/post13.html#p13 If you have and questions are want to become an admin or LSPD officer go here : http://mtalossantosrp.freeforums.org Ip is 192.168.0.3:22003 , or 121.218.196.203 . Thankyou
  20. what is the id for the police skin ?
  21. what is the id for police clothes? and how do i give them to the plauyer
×
×
  • Create New...