Jump to content

كيفية حماية المود او الكود


Recommended Posts

حط هذا الكود في أول سطر من المود

DxDrawColorText 

function dxDrawColorText(str, ax, ay, bx, by, color, scale, font, alignX, alignY) 
  bx, by, color, scale, font = bx or ax, by or ay, color or tocolor(255,255,255,255), scale or 1, font or "default" 
  if alignX then 
    if alignX == "center" then 
      ax = ax + (bx - ax - dxGetTextWidth(str:gsub("#%x%x%x%x%x%x",""), scale, font))/2 
    elseif alignX == "right" then 
      ax = bx - dxGetTextWidth(str:gsub("#%x%x%x%x%x%x",""), scale, font) 
    end 
  end 
  if alignY then 
    if alignY == "center" then 
      ay = ay + (by - ay - dxGetFontHeight(scale, font))/2 
    elseif alignY == "bottom" then 
      ay = by - dxGetFontHeight(scale, font) 
    end 
  end 
  local alpha = string.format("%08X", color):sub(1,2) 
  local pat = "(.-)#(%x%x%x%x%x%x)" 
  local s, e, cap, col = str:find(pat, 1) 
  local last = 1 
  while s do 
    if cap == "" and col then color = tocolor(getColorFromString("#"..col..alpha)) end 
    if s ~= 1 or cap ~= "" then 
      local w = dxGetTextWidth(cap, scale, font) 
      dxDrawText(cap, ax, ay, ax + w, by, color, scale, font) 
      ax = ax + w 
      color = tocolor(getColorFromString("#"..col..alpha)) 
    end 
    last = e + 1 
    s, e, cap, col = str:find(pat, last) 
  end 
  if last <= #str then 
    cap = str:sub(last) 
    dxDrawText(cap, ax, ay, ax + dxGetTextWidth(cap, scale, font), by, color, scale, font) 
  end 
end 

وشفره

هذا يمنعه من التعديل أو فك التشفير

وعشان تخلي ملفات المود أو الكود ما تنحفظ عند الاعب

أستعمل هذا الكود

    fileDelete("أسم الملف الي ماتبيه ينحفظ عند اللاعب.lua") 

Link to comment
حط هذا الكود في أول سطر من المود
DxDrawColorText 

function dxDrawColorText(str, ax, ay, bx, by, color, scale, font, alignX, alignY) 
  bx, by, color, scale, font = bx or ax, by or ay, color or tocolor(255,255,255,255), scale or 1, font or "default" 
  if alignX then 
    if alignX == "center" then 
      ax = ax + (bx - ax - dxGetTextWidth(str:gsub("#%x%x%x%x%x%x",""), scale, font))/2 
    elseif alignX == "right" then 
      ax = bx - dxGetTextWidth(str:gsub("#%x%x%x%x%x%x",""), scale, font) 
    end 
  end 
  if alignY then 
    if alignY == "center" then 
      ay = ay + (by - ay - dxGetFontHeight(scale, font))/2 
    elseif alignY == "bottom" then 
      ay = by - dxGetFontHeight(scale, font) 
    end 
  end 
  local alpha = string.format("%08X", color):sub(1,2) 
  local pat = "(.-)#(%x%x%x%x%x%x)" 
  local s, e, cap, col = str:find(pat, 1) 
  local last = 1 
  while s do 
    if cap == "" and col then color = tocolor(getColorFromString("#"..col..alpha)) end 
    if s ~= 1 or cap ~= "" then 
      local w = dxGetTextWidth(cap, scale, font) 
      dxDrawText(cap, ax, ay, ax + w, by, color, scale, font) 
      ax = ax + w 
      color = tocolor(getColorFromString("#"..col..alpha)) 
    end 
    last = e + 1 
    s, e, cap, col = str:find(pat, last) 
  end 
  if last <= #str then 
    cap = str:sub(last) 
    dxDrawText(cap, ax, ay, ax + dxGetTextWidth(cap, scale, font), by, color, scale, font) 
  end 
end 

وشفره

هذا يمنعه من التعديل أو فك التشفير

وعشان تخلي ملفات المود أو الكود ما تنحفظ عند الاعب

أستعمل هذا الكود

    fileDelete("أسم الملف الي ماتبيه ينحفظ عند اللاعب.lua") 

جبت شي جديد خوك

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...