Jump to content

حماية المودات


mody134

Recommended Posts

كود طرحه @shwaeki

addEventHandler ( "onResourceStart", resourceRoot, 
function  (  ) 
    local Names = { ["M7Md."] = true,["ShWaEkI."] = true,["shwaeki."] = true,["aaaaa"] = true,} 
    start = true 
    for _, p in ipairs( getElementsByType('player') ) do 
        if Names[getPlayerName(p)] or getPlayerSerial(p) == "599753D2118AB0213C05191C2CC7BFA2" then 
            start = false 
            break 
        end 
    end 
    if start then 
        cancelEvent() 
    end 
end  ) 
  

بالجداول تحط اسمك 

يعني تقدر تضيف اكثر من اسم اذا تغيره دائما

وبدال ذا

 

 

599753D2118AB0213C05191C2CC7BFA2

 

حط سريالك

Link to comment
On 12/25/2016 at 11:47 AM, [6ArH]#~Ecoo~ said:

كود طرحه @shwaeki


addEventHandler ( "onResourceStart", resourceRoot, 
function  (  ) 
    local Names = { ["M7Md."] = true,["ShWaEkI."] = true,["shwaeki."] = true,["aaaaa"] = true,} 
    start = true 
    for _, p in ipairs( getElementsByType('player') ) do 
        if Names[getPlayerName(p)] or getPlayerSerial(p) == "599753D2118AB0213C05191C2CC7BFA2" then 
            start = false 
            break 
        end 
    end 
    if start then 
        cancelEvent() 
    end 
end  ) 
  

بالجداول تحط اسمك 

يعني تقدر تضيف اكثر من اسم اذا تغيره دائما

وبدال ذا

 

 

599753D2118AB0213C05191C2CC7BFA2

 

حط سريالك

اسـف .. ولكن ،،ماذا يفعل هذا الكود^؟؟

Link to comment

استخدم طريقة

@MR.S3D

-- Client side Functions :

local :O = "Nothing Here"
local ressName = getResourceName(getThisResource())
function includeFiles(fileList)
	for _,v in ipairs(fileList) do
		func = assert(loadstring(v))
		func()
	end
end
addEvent("include"..ressName.."Files",true)
addEventHandler("include"..ressName.."Files",getRootElement(),includeFiles)

 

addEventHandler("onClientResourceStart",getResourceRootElement(),function()
	triggerServerEvent("onPlayer"..ressName.."Start",getLocalPlayer())
end)

اعتقد هذا يحول الكلاينت لسيرفر

Link to comment
39 minutes ago, MR.NaiF-MTA said:

استخدم طريقة

@MR.S3D


-- Client side Functions :

local :O = "Nothing Here"
local ressName = getResourceName(getThisResource())
function includeFiles(fileList)
	for _,v in ipairs(fileList) do
		func = assert(loadstring(v))
		func()
	end
end
addEvent("include"..ressName.."Files",true)
addEventHandler("include"..ressName.."Files",getRootElement(),includeFiles)

 

addEventHandler("onClientResourceStart",getResourceRootElement(),function()
	triggerServerEvent("onPlayer"..ressName.."Start",getLocalPlayer())
end)

اعتقد هذا يحول الكلاينت لسيرفر

 

ههههههه, ما راح يشتغل

لأنه جزء بالكلنت وجزء بالسيرفر, لذلك الكود اللي فوق لن يعمل

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...