+Source|> Posted August 22, 2017 Share Posted August 22, 2017 ranks = { {"Console"}, {"Admin"}, } for i,v in ipairs ( ranks ) do if isObjectInACLGroup( "user."..accName, aclGetGroup ( v ) ) then triggerClientEvent( player, "openadminp", player ) end end ما اشتغل Link to comment
Abdul KariM Posted August 22, 2017 Share Posted August 22, 2017 ماهب معرفة player + accName كيف بيشتغل و Link to comment
+Source|> Posted August 22, 2017 Author Share Posted August 22, 2017 23 minutes ago, Abdul KariM said: ماهب معرفة player + accName كيف بيشتغل و معرفه الكود كان شغال قبل ما اضيف اللوب والجدول وعطيتك بس جزء من الكود Link to comment
Abdul KariM Posted August 22, 2017 Share Posted August 22, 2017 ماينفع كذا قلت لك فوق عندك اشياء ماهب معرفة يعني لازم تحط كودك كامل عشان اعرف الخطأ ولا في شي بالدي بوق ؟ Link to comment
+Source|> Posted August 22, 2017 Author Share Posted August 22, 2017 1 hour ago, Abdul KariM said: ماينفع كذا قلت لك فوق عندك اشياء ماهب معرفة يعني لازم تحط كودك كامل عشان اعرف الخطأ ولا في شي بالدي بوق ؟ ranks = { -- الرتب اللي تفتح اللوحه {"Console"}, {"AP"}, } function cOpen (player) local accName = getAccountName( getPlayerAccount(player) ) for i, v in ipairs ( ranks ) do if isObjectInACLGroup( "user."..accName, aclGetGroup ( v ) ) then triggerClientEvent( player, "openadminp", player ) end end end addCommandHandler( "open" , cOpen ) هل من اجابة يا قوم ؟؟؟؟؟؟؟؟؟ Link to comment
+Source|> Posted August 22, 2017 Author Share Posted August 22, 2017 2 hours ago, A7MEDENO said: ranks = { -- الرتب اللي تفتح اللوحه {"Console"}, {"AP"}, } function cOpen (player) local accName = getAccountName( getPlayerAccount(player) ) for i, v in ipairs ( ranks ) do if isObjectInACLGroup( "user."..accName, aclGetGroup ( v ) ) then triggerClientEvent( player, "openadminp", player ) end end end addCommandHandler( "open" , cOpen ) هل من اجابة يا قوم ؟؟؟؟؟؟؟؟؟ |M.r|LooFe| #x1AhMeD,-09 #MR.NaiF Link to comment
Master_MTA Posted August 22, 2017 Share Posted August 22, 2017 ranks = { -- الرتب اللي تفتح اللوحه {"Console"}, {"AP"}, } function cOpen (player) local accName = getAccountName( getPlayerAccount(player) )or nil if accName==nil then return outputChatBox('you should register',player) end for i=1,#ranks do if isObjectInACLGroup( "user."..accName, aclGetGroup ( ranks[i][1]) ) then triggerClientEvent( player, "openadminp", player ) end end end addCommandHandler( "open" , cOpen ) مع اني تفلسفت شوي بالكود كان يمديني اسهله لكن مزاجي رايق شوي زي ما تقول 2 Link to comment
SycroX Posted August 23, 2017 Share Posted August 23, 2017 (edited) ranks = { "Console", "AP" } function cOpen(player) local Account = getPlayerAccount(player) if Account and not isGuestAccount(Account) then local AccountName = getAccountName(Account) for _,value in ipairs(ranks) do if isObjectInACLGroup("user."..AccountName, aclGetGroup(value))) then triggerClientEvent( player, "openadminp", player ) end end end end addCommandHandler( "open", cOpen) Edited August 23, 2017 by #x1AhMeD,-09 1 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