Jump to content

= [ مشكله ] =


Recommended Posts

-- #Client
  addEventHandler ( "onClientGUIClick",root, function (  )
  if guiGridListGetSelectedItem(GUIEditor.gridlist[1]) ~= -1  then 
    local player1 = guiGridListGetItemText(GUIEditor.gridlist[1], guiGridListGetSelectedItem(GUIEditor.gridlist[1]), 1)  
	 if source == GUIEditor.button[1] then
	   editdays = guiGetText (GUIEditor.edit[1])
	     if editdays ~= "" then 
	         editsbab = guiGetText (GUIEditor.edit[2])
	            if editsbab ~= "" then 
                   triggerServerEvent( 'aAdminEx1', localPlayer,player1,editdays,editsbab)
			   end
		    end
	     end
       end
  end
)

-- #Server


addEvent('aAdminEx1',true ) 
addEventHandler( 'aAdminEx1',root,
    function ( player1,editdays,editsbab )
     local player2 = getPlayerFromName(player1)
       if (player2) then
	  local acc = getPlayerAccount(player2)
      local account = getAccountName(acc)
          if account then
            if isObjectInACLGroup ( "user."..account, aclGetGroup ( "Admin" ) ) then return end 
             aclGroupAddObject (aclGetGroup( "Admin" ), "user."..account) 

              setTimer ( function (account)
                if not isObjectInACLGroup ( "user."..account, aclGetGroup ( "Admin" ) ) then return end 
                 aclGroupRemoveObject ( aclGetGroup( "Admin" ),"user."..account )
             end,editdays*1000*60*24,1,account)
         end
     end
end
)

وش المشكله هنا مايرقيني

 

Edited by iMr ~ MnHmAr
Link to comment

بدل ملف سيرفر بهاذا

addEvent('aAdminEx1',true ) 
addEventHandler( 'aAdminEx1',root,
    function ( player1,editdays,editsbab )
     local player2 = getPlayerFromName(player1)
       if (player2) then
	  local acc = getAccountName(player2)
      local account = getPlayerAccount(acc) 
          if account then
            if isObjectInACLGroup ( "user."..account, aclGetGroup ( "Admin" ) ) then return end 
             aclGroupAddObject (aclGetGroup( "Admin" ), "user."..account) 

              setTimer ( function (account)
                if not isObjectInACLGroup ( "user."..account, aclGetGroup ( "Admin" ) ) then return end 
                 aclGroupRemoveObject ( aclGetGroup( "Admin" ),"user."..account )
             end,editdays*1000*60*24,1,account)
         end
     end
end
)

المشكلة عندك في التحقق من الحساب

Link to comment
23 hours ago, MR.Mosa said:

بدل ملف سيرفر بهاذا


addEvent('aAdminEx1',true ) 
addEventHandler( 'aAdminEx1',root,
    function ( player1,editdays,editsbab )
     local player2 = getPlayerFromName(player1)
       if (player2) then
	  local acc = getAccountName(player2)
      local account = getPlayerAccount(acc) 
          if account then
            if isObjectInACLGroup ( "user."..account, aclGetGroup ( "Admin" ) ) then return end 
             aclGroupAddObject (aclGetGroup( "Admin" ), "user."..account) 

              setTimer ( function (account)
                if not isObjectInACLGroup ( "user."..account, aclGetGroup ( "Admin" ) ) then return end 
                 aclGroupRemoveObject ( aclGetGroup( "Admin" ),"user."..account )
             end,editdays*1000*60*24,1,account)
         end
     end
end
)

المشكلة عندك في التحقق من الحساب

خطا اخوي انت عاكسها +_=

الصحيح

addEvent('aAdminEx1',true ) 
addEventHandler( 'aAdminEx1',root,
    function ( player1,editdays,editsbab )
     local player2 = getPlayerFromName(player1)
       if (player2) then
      getPlayerAccount
	  local acc = getPlayerAccount(player2)
      local account = getAccountName(acc) 
          if account then
            if isObjectInACLGroup ( "user."..account, aclGetGroup ( "Admin" ) ) then return end 
             aclGroupAddObject (aclGetGroup( "Admin" ), "user."..account) 

              setTimer ( function (account)
                if not isObjectInACLGroup ( "user."..account, aclGetGroup ( "Admin" ) ) then return end 
                 aclGroupRemoveObject ( aclGetGroup( "Admin" ),"user."..account )
             end,editdays*1000*60*24,1,account)
         end
     end
end
)

 

Link to comment
2 minutes ago, Master_MTA said:

خطا اخوي انت عاكسها +_=

الصحيح


addEvent('aAdminEx1',true ) 
addEventHandler( 'aAdminEx1',root,
    function ( player1,editdays,editsbab )
     local player2 = getPlayerFromName(player1)
       if (player2) then
      getPlayerAccount --- هاي شو بتسوي ^
	  local acc = getPlayerAccount(player2)
      local account = getAccountName(acc) 
          if account then
            if isObjectInACLGroup ( "user."..account, aclGetGroup ( "Admin" ) ) then return end 
             aclGroupAddObject (aclGetGroup( "Admin" ), "user."..account) 

              setTimer ( function (account)
                if not isObjectInACLGroup ( "user."..account, aclGetGroup ( "Admin" ) ) then return end 
                 aclGroupRemoveObject ( aclGetGroup( "Admin" ),"user."..account )
             end,editdays*1000*60*24,1,account)
         end
     end
end
)

 

شوف كودك منيح

Link to comment
On ١١‏/١٢‏/٢٠١٦ at 10:29 PM, coNolel said:

كيف انت حاط اذا معه ادمن بيعطيه ادمن واذا معه الأدمن بيسحب منه الأدمن  ??

aclGroupRemoveObject

حاول تغير من الرتب لانها غالبا هي المشكلة 

 

اقرأ الكود كامل, مافيه ولا خطأ

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