AR/removeBan: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
Line 1: Line 1:
__NOTOC__  
__NOTOC__  
{{Server function}}
{{Server function}}
This function will remove a specific [[ban]].
هذه الوظيفة تزيل الباند من السيرفر


==Syntax==  
==Syntax==  
Line 9: Line 9:


===Required Arguments===  
===Required Arguments===  
*'''theBan:''' The [[ban]] to be removed.
*'''theBan:''' الباند المراد ازالته


===Optional Arguments===  
===Optional Arguments===  

Revision as of 00:55, 11 December 2012

هذه الوظيفة تزيل الباند من السيرفر

Syntax

bool removeBan ( ban theBan, [ player responsibleElement ] )

Required Arguments

  • 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: The element that is responsible for removing the ban element. This can be a player or the root (getRootElement()).

Returns

Returns true if the ban was removed succesfully, false if invalid arguments are specified.

Example

This example removes all the bans when the resource is started and outputs to everyone the players.

addEventHandler("onResourceStart",resourceRoot,function()
	bans = getBans
	for i,d in ipairs(bans)do
		nick = getBanNick(d)
		if(removeBan(d))then
			ouputChatBox(nick.."has been removed from ban",root)
		end
	end
end)

See Also