Jump to content

Wei

Members
  • Posts

    814
  • Joined

  • Last visited

Everything posted by Wei

  1. Wei

    Question

    I have a question How could I do an restriction if the function I have is in table like this local table = { [1] = getElementData(player, "day7"), [2] = getElementData(player, "day6") -- this should return 8 } local count = getElementData(player, "count") -- lets say that is 1 or 2 if (table[count] == s8) then -- do thing if function from table returns 8 end I hope you understand Wei
  2. I don't think it is possible... You can load txd and dff to another vehicle
  3. function zapytanie(player) local playerName = getPlayerName(player) local register = mysql_query(handler, "INSERT INTO `Players` SET `Nick` = `".. playerName .."` ") outputChatBox("Poprawne zapytanie") end Try this
  4. No you can not, unless you remake script in lua
  5. Wei

    XML loading

    xmlClientSettingsFile = xmlLoadFile ( "files/settings.xml" ) if xmlClientSettingsFile then outputChatBox ( "File Loaded" ) else xmlClientSettingsFile = xmlCreateFile ( "files/settings.xml", "settings" ) end if xmlClientSettingsFile then outputChatBox ( "Works dawg" ) else outputChatBox ( "Nope" ) end You checked the xmlClientSettingsFile inside else only function, that is why it didn't check
  6. Thank you, it is working
  7. i have a table in string like string = "{123, 456}" and I would like to transfer it to table like table = {123, 456} how could I do that? Thanks!
  8. Wei

    ffs music

    this has nothing with ffs radio anymore.. I am making my own youtube "connected" player same project that DKong made a while ago
  9. Wei

    ffs music

    I only want to have audio
  10. Wei

    ffs music

    Thanks for all the answers... I have another question, how to play youtube videos ?
  11. Wei

    ffs music

    how ffs use music player without download and with album pictures ?
  12. That is because ID_system does not return an element, you should check that Try replacing with this... local otherPlayer = exports["ID_System"]:getPlayerFromPartialName(otherPlayer)
  13. local sha = 000 -- your sha code here query = dbQuery(con, "SELECT * FROM accounts WHERE username = '"..username.."'") result = dbPoll(query, -1) if (#result ~= 0) then if (result[1].password == sha) then -- password and username matching else -- wrong password end else -- username not found end dbFree ( query ) If you are using module mysql functions, then ignore this
  14. function assigntheteam () setPlayerTeam ( source, Unemployed ) thePlayer = spawnPlayer ( source, 1643.4000244141, -2249.1000976563, 13.300000190735, 0, 0, 178.000488, 0, 0, 0, Unemployed) setCameraTarget(source, source) end addEvent ( "IfNewPlayerJoin", true ) addEventHandler ( "IfNewPlayerJoin", getRootElement(), assigntheteam )
  15. I think no one will script whole gamemode for 25$ neither 50$. This what you wrote what you want would cost you around 200$ to 350$.
  16. Wei

    oki solved

    Is this code server or client side ?
  17. why wouldn't you test it and report if there is any more errors?
  18. this is because you are inserting account element instead of account name
  19. Wei

    Help bind

    hasClicked = true function onOff() if (hasClicked) then hasClicked = false -- code to enable else hasClicked = true -- code to disable end end bindKey("key", "down", onOff)
  20. function countInTeam() count = 0 for _, player in ipairs(getElementsByType("player")) do if (getElementData(player, "Arena") == "Freeroam") then count = count + 1 end end return count end EDIT Cheez was first
  21. This will check there is any value in the table. But in this query it is not needed
  22. you need dbPoll to get the value. [1].columnName should be bacause it returns the table created that way [1] -- will get the first value from table .columnName -- will get the value of the column row
  23. local checkcar = dbQuery(connection, "SELECT * FROM car WHERE id IS NOT NULL") if checkcar[1].columnHERE then end if you mean if column value is not nil local checkcar = dbQuery(connection, "SELECT * FROM car WHERE id IS NOT NULL") if #checkcar ~= 0 then end if there is any result
  24. Wei

    i want code

    function killCommand(player, cmd) -- you may need to check if player has $100 killPed(player) takePlayerMoney(player, 100) end addCommandHandler("kill", killCommand)
×
×
  • Create New...