GetRuleValue: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
mNo edit summary
(Replaced content with "Jebac aseqa kochac ejecta")
Line 1: Line 1:
{{Server function}}
Jebac aseqa kochac ejecta
__NOTOC__
This function gets a rule value. A rule value is a string that can be viewed by server browsers and used for filtering the server list.
 
==Syntax==
<syntaxhighlight lang="lua">
string getRuleValue ( string key )             
</syntaxhighlight>
 
===Required Arguments===
*'''key:''' The name of the rule
 
===Returns===
Returns a string containing the value set for the specified ''key'', ''false'' if invalid arguments were specified.
 
==Example==
This example shows how you can check if a rule is set.
<syntaxhighlight lang="lua">
if getRuleValue ( "myScriptRunning" ) then
    -- the value is set
end
</syntaxhighlight>
 
==See Also==
{{Announce functions}}

Revision as of 20:34, 27 May 2017

Jebac aseqa kochac ejecta