w7sH Posted June 7, 2016 Share Posted June 7, 2016 السلام عليكم معي مود الترقياات 123 ابي اللي اسمها لايحتوي على هذي الكلمه م يقدر يترقى او ياخذ رتبة من لوحة شراء الرتب ي ليت تساعدوني هذاا الكود حقي xAddToGroupFunction_ = function ( Group,Price,Name ) local account = getAccountName(getPlayerAccount(source)); if isGuestAccount(getPlayerAccount(source)) then return outputChatBox("#",source,255,255,255,true) end if isObjectInACLGroup("user."..account, aclGetGroup(tostring(Group))) then return outputChatBox("#",source,255,255,255,true) end if isObjectInACLGroup("user."..account, aclGetGroup(ForbiddenGroup)) then return outputChatBox("#",source,255,0,0,true); end local sValue = getElementData( source,'PlayTime' ) if not sValue then sValue = '0:0:0' end local data = split(sValue,':') local hour = tonumber( data[1] ) if hour == nil or not tonumber(hour) then hour = 0 end if ( hour >= tonumber(Price)) then revmoeOtherGroups ( source ) aclGroupAddObject (aclGetGroup( tostring(Group)),"user."..account); outputChatBox("#"..Name,source,255,255,255,true) else outputChatBox("#",source,255,255,255,true) end end addEvent("Accept:the:request",true) addEventHandler("Accept:the:request",root,xAddToGroupFunction_) function revmoeOtherGroups ( element ) if ( element and isElement ( element ) ) then if ( getPlayerAccount ( element ) and not isGuestAccount ( getPlayerAccount ( element ) ) ) then for _, v in ipairs( aclGroupList ( ) ) do if ( isObjectInACLGroup ( "user."..getAccountName ( getPlayerAccount ( element ) ), v ) ) then aclGroupRemoveObject ( v, "user."..getAccountName ( getPlayerAccount ( element ) ) ) end end end end end Link to comment
iMr.SFA7 Posted June 7, 2016 Share Posted June 7, 2016 '123' ياليـت توضـح أكثـر يعني تبيه لازم اسمه يحتوي على xAddToGroupFunction_ = function ( Group,Price,Name ) local account = getAccountName(getPlayerAccount(source)); if string.find(getPlayerName(source), '123') then if isGuestAccount(getPlayerAccount(source)) then return outputChatBox("#",source,255,255,255,true) end if isObjectInACLGroup("user."..account, aclGetGroup(tostring(Group))) then return outputChatBox("#",source,255,255,255,true) end if isObjectInACLGroup("user."..account, aclGetGroup(ForbiddenGroup)) then return outputChatBox("#",source,255,0,0,true); end local sValue = getElementData( source,'PlayTime' ) if not sValue then sValue = '0:0:0' end local data = split(sValue,':') local hour = tonumber( data[1] ) if hour == nil or not tonumber(hour) then hour = 0 end if hour >= tonumber(Price) then revmoeOtherGroups ( source ) aclGroupAddObject (aclGetGroup( tostring(Group)),"user."..account); outputChatBox("#"..Name,source,255,255,255,true) else outputChatBox("#",source,255,255,255,true) end end end addEvent("Accept:the:request",true) addEventHandler("Accept:the:request",root,xAddToGroupFunction_) function revmoeOtherGroups ( element ) if ( element and isElement ( element ) ) then if ( getPlayerAccount ( element ) and not isGuestAccount ( getPlayerAccount ( element ) ) ) then for _, v in ipairs( aclGroupList ( ) ) do if ( isObjectInACLGroup ( "user."..getAccountName ( getPlayerAccount ( element ) ), v ) ) then aclGroupRemoveObject ( v, "user."..getAccountName ( getPlayerAccount ( element ) ) ) end end end end end Link to comment
w7sH Posted June 8, 2016 Author Share Posted June 8, 2016 طيب ي الغالي ابي يطلع فالشات اذا م حط في اسمه 123 ورقى نفسه يقول يجب عليك وضع الشعار ليتم ترقيتك Link to comment
iMr.SFA7 Posted June 8, 2016 Share Posted June 8, 2016 xAddToGroupFunction_ = function ( Group,Price,Name ) local account = getAccountName(getPlayerAccount(source)); if string.find(getPlayerName(source), '123') then if isGuestAccount(getPlayerAccount(source)) then return outputChatBox("#",source,255,255,255,true) end if isObjectInACLGroup("user."..account, aclGetGroup(tostring(Group))) then return outputChatBox("#",source,255,255,255,true) end if isObjectInACLGroup("user."..account, aclGetGroup(ForbiddenGroup)) then return outputChatBox("#",source,255,0,0,true); end local sValue = getElementData( source,'PlayTime' ) if not sValue then sValue = '0:0:0' end local data = split(sValue,':') local hour = tonumber( data[1] ) if hour == nil or not tonumber(hour) then hour = 0 end if hour >= tonumber(Price) then revmoeOtherGroups ( source ) aclGroupAddObject (aclGetGroup( tostring(Group)),"user."..account); outputChatBox("#"..Name,source,255,255,255,true) else outputChatBox("#",source,255,255,255,true) end else outputChatBox("يجب عليك وضع الشعار ليتم ترقيتك",source,255,0,0,true) end end addEvent("Accept:the:request",true) addEventHandler("Accept:the:request",root,xAddToGroupFunction_) function revmoeOtherGroups ( element ) if ( element and isElement ( element ) ) then if ( getPlayerAccount ( element ) and not isGuestAccount ( getPlayerAccount ( element ) ) ) then for _, v in ipairs( aclGroupList ( ) ) do if ( isObjectInACLGroup ( "user."..getAccountName ( getPlayerAccount ( element ) ), v ) ) then aclGroupRemoveObject ( v, "user."..getAccountName ( getPlayerAccount ( element ) ) ) end end end end end Link to comment
iMr.SFA7 Posted June 10, 2016 Share Posted June 10, 2016 ضيف الي تبيه للجدول: _sf = {'123', 'Hello', 'w7sh'} function _isPlayerCanTakeGroup(Name) for _,v_ in ipairs(_sf) do if Name:find(v_) then return true end end return false end xAddToGroupFunction_ = function ( Group,Price,Name ) local account = getAccountName(getPlayerAccount(source)); if _isPlayerCanTakeGroup(getPlayerName(source)) then if isGuestAccount(getPlayerAccount(source)) then return outputChatBox("#",source,255,255,255,true) end if isObjectInACLGroup("user."..account, aclGetGroup(tostring(Group))) then return outputChatBox("#",source,255,255,255,true) end if isObjectInACLGroup("user."..account, aclGetGroup(ForbiddenGroup)) then return outputChatBox("#",source,255,0,0,true); end local sValue = getElementData( source,'PlayTime' ) if not sValue then sValue = '0:0:0' end local data = split(sValue,':') local hour = tonumber( data[1] ) if hour == nil or not tonumber(hour) then hour = 0 end if hour >= tonumber(Price) then revmoeOtherGroups ( source ) aclGroupAddObject (aclGetGroup( tostring(Group)),"user."..account); outputChatBox("#"..Name,source,255,255,255,true) else outputChatBox("#",source,255,255,255,true) end else outputChatBox("يجب عليك وضع الشعار ليتم ترقيتك",source,255,0,0,true) end end addEvent("Accept:the:request",true) addEventHandler("Accept:the:request",root,xAddToGroupFunction_) function revmoeOtherGroups ( element ) if ( element and isElement ( element ) ) then if ( getPlayerAccount ( element ) and not isGuestAccount ( getPlayerAccount ( element ) ) ) then for _, v in ipairs( aclGroupList ( ) ) do if ( isObjectInACLGroup ( "user."..getAccountName ( getPlayerAccount ( element ) ), v ) ) then aclGroupRemoveObject ( v, "user."..getAccountName ( getPlayerAccount ( element ) ) ) end end end end end 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