AR/aclCreateGroup

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

هذا الوظيفة تقوم بصنع مجموعة في الاسل . ويمكن اضافة كائن الى المجموعة مثل لاعب أو مود .

تركيب الوظيفة :

aclgroup aclCreateGroup ( string groupName )

الفراغات المطلوبة

  • groupName: اسم القروب الذي تريد صنعه

مثال

هذا المثال يضيف امر اضافة كائن الى القروب والتي يمكنك بسهولة إضافة كائنات جديدة لمراقبة الدخول المجموعات قائمة محددة.

function addACLGroupObject ( thePlayer, commandName, groupName, objectName )
    local ourGroup = aclGetGroup ( groupName )
    -- يتحقق اذا لم يكن اسم القروب موجود ويقوم بصنع اسم قروب جديد
    if not ourGroup then
        ourGroup = aclCreateGroup ( groupName )
    end

    -- يتحقق اذا لم يعطه اسم الكائن
    if not objectName then
        -- يتم تحذيره في الشات
        return outputChatBox ( "You need to specify the object!", thePlayer )
    end

    -- واذا تم وضع اسم القروب سوف يتم صنعه
    aclGroupAddObject ( ourGroup, objectName )
    -- يتم حفظها في الاسل بعد تعديلها
    aclSave ()
end
addCommandHandler ( "addobjecttogroup", addACLGroupObject )

تمت إعادة تعديل الترجمة من قبل : ^iiEcoo'x_)

انظر ايضاً الى