Jump to content

undefined

Members
  • Posts

    500
  • Joined

  • Last visited

Everything posted by undefined

  1. You misunderstood me. You called Login.callBack function, but you don't use Login.callBack function's arguements. callRemote("http://127.0.0.1/controller/api/getUserInformations", Login.callBack, client, email, password); It should be as follows: callRemote("http://127.0.0.1/controller/api/getUserInformations", Login.callBack(arg1, arg2), client, email, password);
  2. Is not it? dbQuery(connectDB, "CREATE TABLE IF NOT EXISTS hud_option (hudColor STRING, hudOption STRING")
  3. Hi guys. Im work on my save system. But I have a problem. I get this error: ERROR: mas\DB\hud_option.lua:29: Database query failed: no such table: hud_option ERROR: mas\DB\hud_option.lua:29: attempt to index field '?' (a nil value) Here is my DB:(Empty) And here is my code: Code Removed Help pls...
  4. Thank you TAPL. It's solved.
  5. OK. I removed this code. Now, outputChatBox(tostring(#getAccountStats(account))) -- said - 1 outputChatBox(tostring(#getAccountStats(account)[1])) -- said - 0 outputChatBox(tostring(getAccountStats(account)[1])) -- said - table: 05764310 outputChatBox(tostring(getAccountStats(account)[1].stats)) -- said - 100
  6. I did your said. But it's not work. My all code. Code Removed Server Said: [ [ [ 24, 569 ], [ 69, 0 ], [ 70, 0 ], [ 71, 0 ], [ 72, 0 ], [ 73, 0 ], [ 74, 0 ], [ 75, 0 ], [ 76, 0 ], [ 77, 0 ], [ 78, 0 ], [ 79, 0 ] ] ] It's a string. But I need table.
  7. Hi guys. I'm new on SQL. I am begin to write save system. But i have a problem local money, skin, armor, stats = 500, 286, 100, {{24,569}, {69,0},{70,0},{71,0},{72,0},{73,0},{74,0},{75,0},{76,0},{77,0},{78,0},{79,0}} executeSQLCreateTable("playersData", "account_name TEXT, money INTEGER, skin INTEGER, armor INTEGER, stats INTEGER") executeSQLQuery("INSERT INTO playersData(account_name,money,skin,armor,stats) VALUES(?,?,?,?,?)", tostring(account_name),money,skin,armor,stats) I'm do this but when I use this, outputChatBox(executeSQLQuery("SELECT stats FROM playersData WHERE account_name=?", tostring(account_name))[1].stats) this saying 100. But it must be table. Why number -,- Help me
  8. I decided to start MySQL. But I get an error. Where is the problem? (Windows)
  9. Solidsnake14's exp system: https://community.multitheftauto.com/index.php?p=resources&s=details&id=1253
  10. Hi guys. Im work on fuel system. Im being this code because I want to make this easily. But I have a problem with gas station. I did this but pumps(1686) are stays behind the gas station(10789). How can I get it forward? My Code: createObject(10789, 0, 0, 4.8, 0, 0, 195) addEventHandler("onResourceStart", resourceRoot, function() for i, object in ipairs(getElementsByType("object")) do if getElementModel(object) == 10789 then local x, y, z = getElementPosition(object) local rx, ry, rz = getElementRotation(object) local rot = math.rad(rz-90) local x1, x2, x3, x4 = tonumber(x-9.5*math.sin(rot)), tonumber(x-3.8*math.sin(rot)), tonumber(x+3.8*math.sin(rot)), tonumber(x+9.5*math.sin(rot)) local y1, y2, y3, y4 = tonumber(y+9.5*math.cos(rot)), tonumber(y+3.8*math.cos(rot)), tonumber(y-3.8*math.cos(rot)), tonumber(y-9.5*math.cos(rot)) createObject(1686, x1, y1, z-2.4, 0, 0, rz-90) createObject(1686, x2, y2, z-2.4, 0, 0, rz-90) createObject(1686, x3, y3, z-2.4, 0, 0, rz-90) createObject(1686, x4, y4, z-2.4, 0, 0, rz-90) end end end)
  11. If you want to set alpha for all 336 code object, you can use loop. e.g: for index, object in ipairs(getElementsByType ("object")) do if getElementModel(object) == 336 then setElementAlpha(object, 255) end end If not, create object with variable and try this; object = createObject(blablabla) setElementAlpha(object, 255)
  12. Send your errors and warnings
  13. If the script on the client-side; Change targetPlayer to localPlayer or getLocalPlayer() If not; get first arguement(targetPlayer) on the function e.g: function tetoad(targetPlayer) -- Blablabla If you make this, i think it will work.
  14. "*max_member" value="2" /> How i can get meta settings at the client side?
  15. Thank you IIYAMA. It's solved...
  16. Hi guys. Im work on the party system. local test = { test2 = { ["userdata: 46f6s68"] = { leader = "ZoRRoM^", member = {} }, ["userdata: 54fghd9"] = { leader = "Narkoz", member = {} } } } outputChatBox(#test.test2) Im try it for the get count table. But it's not work. It's have 2 count. But #test.test2 say's 0. How to fix it?
  17. It's not useful. And im solved it with this code: local name = string.gsub(getPlayerName(player), "#%x%x%x%x%x%x", "") table.insert(nonparty, name) It's strange! Thanks...
  18. It's give other error again. I think, it's give error for string.gsub because when the i remove this, it's work.
  19. local nonparty = {} for _, player in ipairs(getElementsByType("player")) do if getElementData(player, "loggedin") then if type(getElementData(player, "party")) == "boolean" then table.insert(nonparty, string.gsub(getPlayerName(player), "#%x%x%x%x%x%x", "")) -- Line 71 end end end What is the problem?
  20. undefined

    Big Letter

    The first letter of sentences, how big do I do? string.upper() is change to all
  21. Thank you Anubhav. It's solved!
×
×
  • Create New...