AR/removeBan: Difference between revisions
		
		
		
		
		
		Jump to navigation
		Jump to search
		
				
		
		
	
No edit summary  | 
				No edit summary  | 
				||
| Line 17: | Line 17: | ||
Returns ''true'' if the [[ban]] was removed succesfully, ''false'' if invalid arguments are specified.  | Returns ''true'' if the [[ban]] was removed succesfully, ''false'' if invalid arguments are specified.  | ||
==  | ==مثال==  | ||
هذا المثال يزيل كل باندات السيرفر ويخرج بالشات تنبيه للاعبين  | هذا المثال يزيل كل باندات السيرفر ويخرج بالشات تنبيه للاعبين  | ||
<syntaxhighlight lang="lua">addEventHandler("onResourceStart",resourceRoot,  | <syntaxhighlight lang="lua">addEventHandler("onResourceStart",resourceRoot,  | ||
Revision as of 13:13, 21 August 2016
هذه الوظيفة تزيل الباند من السيرفر
تركيب الجملة البرمجية
bool removeBan ( ban theBan, [ player responsibleElement ] )
العناصر المطلوبة
- theBan: الباند المراد ازالته
 
Optional Arguments
NOTE: When using optional arguments, you might need to supply all arguments before the one you wish to use. For more information on optional arguments, see optional arguments.
- responsibleElement: root الشيء المسؤل عن الباند , يمكنه ان يكون لاعب أو
 
Returns
Returns true if the ban was removed succesfully, false if invalid arguments are specified.
مثال
هذا المثال يزيل كل باندات السيرفر ويخرج بالشات تنبيه للاعبين
addEventHandler("onResourceStart",resourceRoot,
    function()
        local bans = getBans --[[ نختصر
        getBans
        بـ
        bans
        وهو أحضار جميع باندات السيرفر
        ]]
	for i,d in ipairs(bans)do -- نخرج جميع الباندات
	    local nick = getBanNick(d) -- حرف الدي هو جميع الباندات للمعلومية
            --[[ نختصر
            getBanNick
            بـ
            nick
            وهو أحضار اسم اللاعبين المتبندين 
            ]]
	    if(removeBan(d))then -- اذا تم ازالة جميع الباندات
	        outputChatBox(nick.."has been removed from ban",root) -- يخرج بالشات اسماء اللذين تم ازالة بانداتهم
	    end
	end
    end
)