AR/aclDestroy

From Multi Theft Auto: Wiki
Jump to navigation Jump to search

(MultiTheftAuto\server\mods\deathmatch) الموجود في "acl.xml" من ملف "ACL" تقوم هذه الوظيفة بحذف

تركيب الجملة(الوظيفة)

bool aclDestroy ( acl theACL )

Required Arguments

  • theACL: إسم الأسل الذي تريد حذفه

مثال

في هذا مثال اذا كتبت امر في كونسل (اف8) يقوم ب حذف الصلاحية من ACL :

function deleteSomeACL ( thePlayer, cmdname, theACL )
    if aclGet ( theACL ) then --يتحقق اذا كان الصلاحية موجود في ACL
        --واذا لم يكن موجود
        local deleted = aclDestroy ( theACL ) --نقوم ب محاولة حذف الصلاحية من ACL
        if deleted then --نتحقق اذا تم حذف الصلاحية من ACL
            --نرسل له في الشات انه تم حذف الصلاحية بنجاح
            outputChatBox ( "ACL " ..theACL.. " Succesfully removed!", thePlayer )
        else --واذا كان يوجد خطأ
            --اذا كان يوجد خطأ اثناء الازالة
            outputChatBox ( "Error while removing ACL " ..theACL.. "!", thePlayer )
        end
    else --وهنا يعطيه خطأ ب ان الصلاحية غير موجودة او تم حذفه من قبل
        outputChatBox ( "Error: Invalid ACL Name specified, or the ACL doesn't exist.", thePlayer )
    end
end
addCommandHandler ( "deleteACL", deleteSomeACL ) --Add the commandhandler

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

شاهد ايضا