Jump to content

وين الخطا ؟


Sfa7

Recommended Posts

السلام عليكم

وش الخطا ي شباب

addEvent("givemod",true) 
addEventHandler("givemod",root, 
function  (text) 
    if isObjectInACLGroup ("user."..getAccountName( getPlayerAccount(text) ), aclGetGroup ( "Moderator" ) ) then  
        aclGroupAddObject (aclGetGroup("Moderator"), "user."..getAccountName( getPlayerAccount(text) )) 
        outputChatBox("لقد اصبحت مشرف", source, 0, 255, 0, false ) 
    end 
end) 

Link to comment
addEvent("givemod",true) 
addEventHandler("givemod",root, 
function  (text) 
        aclGroupAddObject (aclGetGroup("Moderator"), "user."..getAccountName( getPlayerAccount(getPlayerFromName(text)) )) 
        outputChatBox("لقد اصبحت مشرف", source, 0, 255, 0, false ) 
end) 

Edited by Guest
Link to comment

كفوو ضبط

طيب لو ابي العكس

هذا الكود يضيف

ابي كود يسحب

سويت كذا وماضبط

if aclGroupRemoveObject (aclGetGroup("Moderator"), "user."..getAccountName( getPlayerAccount(getPlayerFromName(text)) )) then 

Link to comment
كفوو ضبط

طيب لو ابي العكس

هذا الكود يضيف

ابي كود يسحب

سويت كذا وماضبط

if aclGroupRemoveObject (aclGetGroup("Moderator"), "user."..getAccountName( getPlayerAccount(getPlayerFromName(text)) )) then 

if aclGroupRemoveObject (aclGetGroup("Moderator"), "user."..accountName)( getPlayerAccount(getPlayerFromName(text)) )) then 

أعتقد كذا

جرب

Link to comment
accountName = ?

مثال من الويكي

function deladm (playerSource, commandName, accountName) 
    if accountName then --Make the script able to detect if a user is given. 
        aclGroupRemoveObject (aclGetGroup("Admin"), "user."..accountName) --Removing the admin. 
        outputChatBox ("ACL: Account '"..accountName.."' succesfully removed as admin.", playerSource) -- Giving you a messsage. 
        outputChatBox ("ACL: Someone have removed you as admin.", accountName) -- giving the poor removed guy a message. 
    else --Make the Syntax display. 
        outputChatBox ("ACL: No account name specified.", playerSource) 
        outputChatBox ("ACL: Syntax: /deladmin [accountName]", playerSource) 
    end 
end 
addCommandHandler ("deladmin", deladm) 

Link to comment
addEvent("removemod",true) 
addEventHandler("removemod",root, 
function  (text) 
          p = getPlayerFromName ( text ) 
         if isPlayerInACLGroup ( p, "Moderator" ) then 
        aclGroupRemoveObject (aclGetGroup("Moderator"), "user."..getAccountName( getPlayerAccount(p) ) ) 
        outputChatBox(" * لقد تم حذفك من المشرفين", p, 0, 255, 255, false ) 
     else 
        outputChatBox(" * انت لست مشرف !", p, 255, 0, 0, false ) 
    end 
end) 
  
  
isPlayerInACLGroup = function ( player, group ) 
    if player and group then 
        if type( group ) ~= 'string' then 
            return false 
        end 
        for _,aclG in next, aclGroupList ( ) do 
            local name = aclGroupGetName ( aclG ); 
            if name ~= group then 
                return false 
            end 
        end 
        if isElement ( player ) then 
            local account = getPlayerAccount ( player ); 
            if account == nil or isGuestAccount ( account ) then 
                return false 
            end 
            local accountName = getAccountName ( account ); 
            if isObjectInACLGroup ( 'user.'..accountName, aclGetGroup ( group ) ) then 
                return true 
            else 
                return false 
            end 
        else 
            return false 
        end 
    else 
        return false 
    end 
end 
  

Link to comment

اخي جعفر

انا مقدر لك تعبك ولكن كودك احسه لحس اوم مخي

وسوا لمخي فورمات كمان

انا كل الي ابيه

انك تضبطلي هل كود

addEvent("removeall",true) 
addEventHandler("removeall",root, 
function (text) 
    aclGroupRemoveObject (aclGetGroup("Police"), "user."..getAccountName( getPlayerAccount(getPlayerFromName(text)) ))  
    aclGroupRemoveObject (aclGetGroup("Moderator"), "user."..getAccountName( getPlayerAccount(getPlayerFromName(text))))  
end) 

عشان اكون فاهم انا وش جالس اسوي ><

انا كل الي ابيه انه يسحب رتبتين مع بعض

Link to comment

ججرب ذآ طيب

addEvent( "removeall", true ) 
addEventHandler( "removeall", root, 
    function( account ) 
        for _, aclGroup in ipairs ( { 'Police', 'Moderator' } ) do 
            if isObjectInACLGroup ( 'user.' ..getAccountName( getPlayerAccount( getPlayerFromName( account ) ) ) , aclGetGroup ( aclGroup ) ) then 
                aclGroupRemoveObject( aclGetGroup ( aclGroup ), 'user.'..getAccountName( getPlayerAccount( getPlayerFromName( account ) ) ) ); 
            end 
        end 
    end 
); 

+

لا تنسى تضيف السكريبت في قروب الادمن

Link to comment

اخوي بلاوي شف

addEvent("removeall",true) 
addEventHandler("removeall",root, 
function( account ) 
        for _, aclGroup in ipairs ( { 'vip', 'Moderator' } ) do 
            if isObjectInACLGroup ( 'user.' ..getAccountName( getPlayerAccount( getPlayerFromName( account ) ) ) , aclGetGroup ( aclGroup ) ) then 
                aclGroupRemoveObject( aclGetGroup ( aclGroup ), 'user.'..getAccountName( getPlayerAccount( getPlayerFromName( account ) ) ) ); 
                outputChatBox("test", source, 0, 255, 0, true ) -- للتاكد ان السكربت شغالل  
            end 
        end 
    end 
); 

الكلنت

triggerServerEvent("removeall",localPlayer) 

+ السكربت شغال 100 % 100

فقط هذا هو الي مايشتغل وضفته لـ قروب ادمن

ونفس الشي مايشتغل

Link to comment
addEvent("removeall",true) 
addEventHandler("removeall",root, 
function( account ) 
        for _, aclGroup in ipairs ( { 'vip', 'Moderator' } ) do 
            if isObjectInACLGroup ( 'user.' ..getAccountName( getPlayerAccount( source ) ) , aclGetGroup ( aclGroup ) ) then 
                aclGroupRemoveObject( aclGetGroup ( aclGroup ), 'user.'..getAccountName( getPlayerAccount( source ) ) ); 
                outputChatBox("test", source, 0, 255, 0, true ) -- للتاكد ان السكربت شغالل 
            end 
        end 
    end 
); 

Link to comment

جرب هذا و شوف ان ما اشتغل قل لي وش يطلع بالشات

addEvent("removeall", true) 
addEventHandler("removeall", root, 
function(name) 
    local player = getPlayerFromName(name) 
    outputChatBox("Test: 1", source) 
    if player then 
        outputChatBox("Test: 2", source) 
        local account = getPlayerAccount(player) 
        if account and not isGuestAccount(account) then 
            outputChatBox("Test: 3", source) 
            local accountName = getAccountName(account) 
            for _, aclGroup in ipairs ({"vip", "Moderator"}) do 
                outputChatBox("Test: 4", source) 
                if isObjectInACLGroup("user."..accountName, aclGetGroup(aclGroup)) then 
                    aclGroupRemoveObject(aclGetGroup(aclGroup), "user."..accountName) 
                    outputChatBox("Test: 5", source) 
                end 
            end 
        end 
    end 
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...