GetBanUsername: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
(Learn to indent code and create examples which actually use a function correctly, not confuse people.)
No edit summary
Line 1: Line 1:
__NOTOC__  
__NOTOC__  
{{Server function}}
{{Server function}}
This function will return the username of the specified [[ban]] pointer.
This function will return the username of the specified [[ban]].


==Syntax==  
==Syntax==  

Revision as of 10:15, 3 May 2011

This function will return the username of the specified ban.

Syntax

string getBanUsername ( ban theBan )

Required Arguments

  • theBan: The ban in which you wish to retrieve the username of.

Returns

Returns a string of the username if everything was successful, false if invalid arguments are specified if there was no username specified for the ban.

Example

function retrieveBan(theBan)
    local ban = getBanUsername(theBan)
    if ban then
        outputChatBox("The following bans username is: "..ban, getRootElement(), 255,255,255, true)
    end
end

See Also