z24d Posted September 7, 2015 Author Share Posted September 7, 2015 الحين ماعرفت اسوي ملف اكس ام ال واحط فيه جدول ولا اخلي المود يسوي ؟ Link to comment
iMr.SFA7 Posted September 7, 2015 Share Posted September 7, 2015 الحين ماعرفت اسوي ملف اكس ام ال واحط فيه جدول ولا اخلي المود يسوي ؟ لا المفروض أنت تسويه والمفروض بعد أنك تحذف أول وظيفة في كودكـ Link to comment
z24d Posted September 7, 2015 Author Share Posted September 7, 2015 local Superman = {} -- Static global values local rootElement = getRootElement() local thisResource = getThisResource() -- Resource events addEvent("superman:start", true) addEvent("superman:stop", true) -- -- Start/stop functions -- function Superman.Start() local self = Superman addEventHandler("superman:start", rootElement, self.clientStart) addEventHandler("superman:stop", rootElement, self.clientStop) end addEventHandler("onResourceStart", getResourceRootElement(thisResource), Superman.Start, false) function Superman.clientStart() setElementData(client, "superman:flying", true) end function Superman.clientStop() setElementData(client, "superman:flying", false) end local groupsTable = { "oneradmin", "Head.Admin", "Console", "big.Admin", "Master", "Moafek", "Sozr", "FDR", } addEventHandler("onPlayerLogin", root, function(_, acc) local XML = xmlLoadFile ( "Save.xml" ) if XML then local Child = xmlFindChild ( XML, "Ranks", 0 ) if Child then local Get = xmlNodeGetValue ( Child ) local accName = getAccountName(acc) for _, groupName in ipairs(Get) do local group = aclGetGroup(groupName) if group then if isObjectInACLGroup("user."..accName, group) then setElementData(source, "isAdmin", true) break end end end end end) [/lua] Link to comment
z24d Posted September 7, 2015 Author Share Posted September 7, 2015 بس كذا شلون بيجيب ال Child Link to comment
iMr.SFA7 Posted September 7, 2015 Share Posted September 7, 2015 عدل وظيفة تسجيل الدخول -- # Server Side : addEventHandler("onPlayerLogin", root, function(_,acc) local XML = xmlLoadFile ( "save.xml" ) if XML then local Child = xmlFindChild ( XML, "Group", 0 ) if Child then local Get = xmlNodeGetValue ( Child ) local accName = getAccountName(acc) local group = aclGetGroup(Get) if group then if isObjectInACLGroup("user."..accName, group) then setElementData(source, "isAdmin", true) outputChatBox ("Done",source) end end end end end) save.xml Console أضف تعريف ملف الأكس أم ال للميتا "save.xml" /> Link to comment
z24d Posted September 7, 2015 Author Share Posted September 7, 2015 يآخي أنت انسان بطل بس شلون يعني Console Moderator يضبط؟ Link to comment
iMr.SFA7 Posted September 7, 2015 Share Posted September 7, 2015 تسلمم يذيب الله يسلمكـ Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now