Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 05/01/20 in all areas

  1. Example: function string_padding_dword(s) local l = 4 - string.len(s) % 4 return s .. string.rep(string.char(l), l) end function string_unpadding_dword(s) return string.sub(s, 0, string.len(s) - string.byte(s, string.len(s))) end function FileProtection(path, key) local file = fileOpen(path) local size = fileGetSize(file) local FirstPart = fileRead(file, 65536) fileSetPos(file, 65536) local SecondPart = fileRead(file, size - 65536) fileClose(file) file = fileCreate(path..'rw') fileWrite(file, encodeString('tea', string_padding_dword(FirstPart), { key = key })..SecondPart) fileClose(file) return true end function FileUnProtection(path, key) local file = fileOpen(path) local size = fileGetSize(file) local FirstPart = fileRead(file, 65536 + 4) fileSetPos(file, 65536 + 4) local SecondPart = fileRead(file, size - (65536 + 4)) fileClose(file) -- file = fileCreate(path..'rw') -- fileWrite(file, string_padding_dword( decodeString('tea', FirstPart, { key = key }) )..SecondPart) -- fileClose(file) return string_padding_dword( decodeString('tea', FirstPart, { key = key }) )..SecondPart end -- example FileProtection('infernus.dff', 'GT4BAE') -- FileUnProtection(path, key) local txd = engineLoadTXD('infernus.txd') engineImportTXD(txd, 401) local dff = engineLoadDFF( FileUnProtection('infernus.dff', 'GT4BAE') ) engineReplaceModel(dff, 401)
    1 point
  2. تمام اخوي شكرأ والله يعطيك العافية كفوو ضبط
    1 point
  3. Try to sync table, something like this: -- SHARED local thisIsClientSide = isElement(localPlayer) -- it returns true if script running on client side and localPlayer defined local t = {} function f(i, v) print((thisIsClientSide and "Client:" or "Server:").." f => i:"..i..", v:"..v) -- debug t[i] = v -- send sync to different side if not source then -- if source is exists, don't need to send back to different side, because we got it from there (otherwise we would make a loop) if thisIsClientSide then triggerServerEvent("f:sync", resourceRoot, i, v) else triggerClientEvent("f:sync", resourceRoot, i, v) end end end addEvent("f:sync", true) addEventHandler("f:sync", root, f)
    1 point
  4. منور بتوفيق يالغالي عجبني التصميم موقع حقك وش استخدمت؟ html,css,js,Lua بس؟
    1 point
  5. That's because there is a very limited, although somewhat functional basic anti-cheat in netc.dll for forks and custom clients. Even though it offers a really weak security (it's not secure at all) and still requires you to supplement it with your own anti-cheat. Because of popular demand for information regarding this, I added this wiki page: https://wiki.multitheftauto.com/wiki/Anti-cheat_support_for_custom_builds I hope it helps.
    1 point
  6. 1 point
  7. You can bring one object a little further forward than the other. I'm not talking of moving it a large amount, maybe just 0.09 of one GTA unit. That usually solves it for me. Otherwise you can place another object on top of the overlap and make that object non-collidable.
    1 point
×
×
  • Create New...