xiRocKyz

Members
  • Content Count

    1,853
  • Joined

  • Days Won

    8

xiRocKyz last won the day on May 28

xiRocKyz had the most liked content!

Community Reputation

310 Superstar

About xiRocKyz

  • Rank
    Jacker

Recent Profile Visitors

5,072 profile views
  1. اتوقع هذا الي تبيه, جرب : allowedwps = { [1] = true, [2] = true, [3] = true, [5] = true, [6] = true, [7] = true, [8] = true, } addEventHandler("onClientPlayerWeaponSwitch", root, function(previous_weapon, next_weapon) if getElementData(localPlayer, "nodm") == true then if not allowedwps[next_weapon] then cancelEvent() local current_weapon = (next_weapon+1)%13 while current_weapon ~= next_weapon do if allowedwps[current_weapon] then setPedWeaponSlot(localPlayer, current_weapon) break end current_weapon = (current_weapon+1)%13 end end end end)
  2. function replaceText() local text = guiGetText(source) local replacedText = text:gsub("[^A-Za-z0-9%._@]", "") if text ~= replacedText then guiSetText(source, replacedText) end end addEventHandler("onClientGUIChanged", login_edit, replaceText, false)
  3. getTickCount interpolateBetween
  4. Which code were you using, maybe you used the first code that I gave you not the second.
  5. Sorry, I missed up a little bit on the previous code and I didn't notice. Use this code instead : addEventHandler("onResourceStart", resourceRoot, function() local accounts = getAccounts() local accountsList = {} for index = 1, #statsList do accountsList[statsList[index][1]] = {} end for index = 1, #accounts do local account = accounts[index] for index = 1, #statsList do local key = statsList[index][1] local data = exports["ZA-account"]:getAccountData(account, key) local name = exports["ZA-account"]:getAccountData(account, "nick") if tonumber(data) then table.insert(accountsList[key], {name, tonumber(data)}) end end end for index = 1, #statsList do local accountsCount = #accountsList[statsList[index][1]] local accounts = {} if accountsCount >= 1 then table.sort(accountsList[statsList[index][1]], function(a, b) return a[2] > b[2] end) accounts = {unpack(accountsList[statsList[index][1]], 1, math.min(20, accountsCount))} end statsList[index][4] = accounts end end)
  6. addEventHandler("onResourceStart", resourceRoot, function() local accounts = getAccounts() local accountsList = {} local keys = {} for index = 1, #statsList do accountsList[statsList[index][1]] = {} table.insert(keys, statsList[index][1]) end for index = 1, #accounts do local account = accounts[index] local toRemove = {} for index = 1, #keys do local key = keys[index] local data = exports["ZA-account"]:getAccountData(account, key) local name = exports["ZA-account"]:getAccountData(account, "nick") if tonumber(data) then table.insert(accountsList[key], {name, tonumber(data)}) if accountsList[key] >= 20 then table.insert(toRemove, index) end end end for index = 1, #toRemove do table.remove(keys, toRemove[index]) end end for index = 1, #statsList do table.sort(accountsList[statsList[index][1]], function(a, b) return a[2] > b[2] end) statsList[index][4] = accountsList[statsList[index][1]] end end)
  7. If you want to whitelist the values that is in the table use this code: local zifr = {"1", "2", "3", "4", "5", "6", "7", "8", "9", "0"} function editCheck() local chars = table.concat(zifr, ""):gsub("[%(%)%.%%%+%-%*%?%[%^%$]", "%%%1") local editText = guiGetText(source) local replacedText = editText:gsub("[^"..chars.."]", "") if editText ~= replacedText then guiSetText(source, replacedText) playSoundFrontEnd(2) end end addEventHandler("onClientGUIChanged", editMoney, editCheck, false) If you want to simply whitelist all the numbers use this code: function editCheck() local editText = guiGetText(source) local replacedText = editText:gsub("[^0-9]", "") if editText ~= replacedText then guiSetText(source, replacedText) playSoundFrontEnd(2) end end addEventHandler("onClientGUIChanged", editMoney, editCheck, false) * Both codes are not tested
  8. * Not tested local blacklisted = {"A", "a"} local edit = guiCreateEdit(...) function editCheck() local chars = table.concat(blacklisted, ""):gsub("[%(%)%.%%%+%-%*%?%[%^%$]", "%%%1") local editText = guiGetText(source) local replacedText = editText:gsub("["..chars.."]", "") if editText ~= replacedText then guiSetText(source, replacedText) end end addEventHandler("onClientGUIChanged", edit, editCheck, false)
  9. xiRocKyz

    سؤال

    فيه اكثر من طريقة outputChatBox(table.concat(myTable[1], ", "), source, 255, 0, 0) outputChatBox(myTable[1][1]..", "..myTable[1][2], source, 255, 0, 0)
  10. xiRocKyz

    سؤال

    مثالك غلط
  11. يمكن يقصد 1660 ti
  12. راجع معلوماتك https://wiki.multitheftauto.com/wiki/Element_tree
  13. الكرت عادي وش المشكلة 😂 و اصلا وش دخل عنق الزجاجة في مشكلته يمكن انت فاهم عنق الزجاجة غلط، لصاحب الموضوع تأكد دائما انك محدث النظام و كرت الشاشة