AR/getBanNick: Difference between revisions
Jump to navigation
Jump to search
(→Syntax) |
|||
Line 17: | Line 17: | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
function outputBan(ban) | function outputBan(ban) | ||
local banned = getBanNick(ban) -- | local banned = getBanNick(ban) -- احضار اسم المتبند | ||
local banner = getBanAdmin(ban) -- | local banner = getBanAdmin(ban) -- احضار اسم االادمن الي بنده | ||
local reason = getBanReason(ban) -- | local reason = getBanReason(ban) -- احضار سبب تندين الاعب | ||
outputChatBox("-----BAN-----",getRootElement(),255,0,0) | outputChatBox("-----BAN-----",getRootElement(),255,0,0) | ||
if (banned) then | if (banned) then | ||
outputChatBox("Player banned: "..banned,getRootElement(),255,0,0) -- | outputChatBox("Player banned: "..banned,getRootElement(),255,0,0) -- يحط بالشات اسم المتبند | ||
end | end | ||
if (banner) then | if (banner) then | ||
outputChatBox("Banner: "..banner,getRootElement(),255,0,0) -- | outputChatBox("Banner: "..banner,getRootElement(),255,0,0) -- يحط اسم الادمن الي بنده | ||
end | end | ||
if (reason) then | if (reason) then | ||
outputChatBox("Reason: "..reason,getRootElement(),255,0,0) -- | outputChatBox("Reason: "..reason,getRootElement(),255,0,0) -- احضار سبب الباند | ||
end | end | ||
end | end | ||
addEventHandler("onBan",getRootElement(),outputBan) -- | addEventHandler("onBan",getRootElement(),outputBan) -- لما يتبند شخص تبدا الوظيفه | ||
</syntaxhighlight> | </syntaxhighlight> | ||
==See Also== | ==See Also== | ||
{{AR/Admin_functions}} | {{AR/Admin_functions}} |
Revision as of 19:11, 20 October 2012
This function will return the nickname (nickname that the player had when he was banned) of the specified ban.
Syntax
string getBanNick ( ban theBan )
Required Arguments
- theBan: الباند الي تبي تجيب النك حقه
Returns
Returns a string of the nickname if everything was successfull, false if invalid arguments are specified if there was no nickname specified for the ban element.
Example
function outputBan(ban) local banned = getBanNick(ban) -- احضار اسم المتبند local banner = getBanAdmin(ban) -- احضار اسم االادمن الي بنده local reason = getBanReason(ban) -- احضار سبب تندين الاعب outputChatBox("-----BAN-----",getRootElement(),255,0,0) if (banned) then outputChatBox("Player banned: "..banned,getRootElement(),255,0,0) -- يحط بالشات اسم المتبند end if (banner) then outputChatBox("Banner: "..banner,getRootElement(),255,0,0) -- يحط اسم الادمن الي بنده end if (reason) then outputChatBox("Reason: "..reason,getRootElement(),255,0,0) -- احضار سبب الباند end end addEventHandler("onBan",getRootElement(),outputBan) -- لما يتبند شخص تبدا الوظيفه