Jump to content

HireAmine

Members
  • Posts

    14
  • Joined

  • Last visited

HireAmine's Achievements

Square

Square (6/54)

0

Reputation

  1. how can i use link instead of file path. i have an script and i need to draw a panel with dxDrawImage and i want to use like instead of filepath please help me
  2. it didnt work its not saving now if you can please make a script that save my money and position with mysql and i will try to understand it please
  3. it didnt work still the sam error if you can please make a script that save my money and position with mysql and i will try to understand it please
  4. I found the sulotion, the error is that you are drawing number, not text, and to turn number to string use: tostring( your varuable ) like in get player money it will return number not string, and with your bank money too and any string because if you want to draw anything or outputChatBox it needs string, it cannot show number. I hope you understand! tell me if it works
  5. HireAmine

    HELP ME

    make sure that the meta is working
  6. How i can save player money and location when the player leave the server i tried a code before but it didnt work. it says on line 9 getPlayerMoney(expected player element) PLEASE HEEEELP this error takes me 5 days --local connection = exports.db:getConnection() local account = "" local player = "" function writedata(query) local connection = exports.db:getConnection()--I have another script that exports the connection local result = dbPoll(query, 0) if (#result > 0 ) then local up = dbQuery(connection, "UPDATE players SET money = ? WHERE account = ? ", getPlayerMoney(player), account)--Update player money if found result dbFree(up) elseif (#result == 0 ) then local insert = dbQuery(connection, "INSERT INTO players (account, money) VALUES(?, ?) ", account, getPlayerMoney(player))--insert player money if found result end end --addEventHandler("onPlayerLogout", root, function(acc) --local connection = exports.db:getConnection()--I have another script that exports the connection --player = source--reset the player element variables --account = acc --d--bQuery(writedata, connection, "SELECT * FROM players ", source, accout) --end) function quit() local connection = exports.db:getConnection()--I have another script that exports the connection player = source--reset the player element variables account = getPlayerAccount(source) dbQuery(writedata, connection, "SELECT * FROM players ", source, accout) setElementData(source, "d", 45) end addEventHandler("onPlayerQuit", root, quit) function returnn(select) local connection = exports.db:getConnection()--I have another script that exports the connection local result = dbPoll(select, 0) for i, v in pairs(result) do if v.money then--check if there is a value setPlayerMoney(player, v.money)--set the player money end end end addEventHandler("onPlayerLogin", root, function(_, acc) local connection = exports.db:getConnection()--I have another script that exports the connection account = acc--reset the account variable player = source--reset the player element variable local select = dbQuery(returnn, connection, "SELECT * FROM players") end)
  7. in line 7 you should put Dinheiro_Banco instead of Banco
  8. HireAmine

    Files

    for dff and txd you can lock them for lua script you will need to change it to luac for xml it wont be created in client folder for the rest i dont know
  9. can you send us the code to check where is the problem
  10. --local connection = exports.db:getConnection() account = "" player = "" function writedata(query) local connection = exports.db:getConnection()--I have another script that exports the connection local result = dbPoll(query, 0) if (#result > 0 ) then local up = dbQuery(connection, "UPDATE players SET money = ? WHERE account = ? ", getPlayerMoney(player), account)--Update player money if found result dbFree(up) elseif (#result == 0 ) then local insert = dbQuery(connection, "INSERT INTO players (account, money) VALUES(?, ?) ", account, getPlayerMoney(player))--insert player money if found result end end addEventHandler("onPlayerQuit", root, function(quitType, reason, responsibleElement) local connection = exports.db:getConnection()--I have another script that exports the connection player = source--reset the player element variable account = getPlayerAccount(source)--reset the account variable dbQuery(writedata, connection, "SELECT * FROM players ", source) end) function returnn(select) local connection = exports.db:getConnection()--I have another script that exports the connection local result = dbPoll(select, 0) for i, v in pairs(result) do if v.money then--check if there is a value setPlayerMoney(player, v.money)--set the player money end end end addEventHandler("onPlayerLogin", root, function(_, acc) local connection = exports.db:getConnection()--I have another script that exports the connection account = acc--reset the account variable player = source--reset the player element variable local select = dbQuery(returnn, connection, "SELECT * FROM players") end) The error is the console said that: Bad Agrument @ 'getPlayerMoney' [expected player at agrument ]
  11. but how i can get the width and the Heigh of the element in the screen ? maybe math between the camera and the distance
  12. i mean 3d object in the real word in the gameplay
  13. how to detect if the cursor is on element. please help.
×
×
  • Create New...