Resource:CallingFunctions: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
(Created page with "{{Needs Example}} This resource was made off of the functions: CallClientFunction and CallServerFunction ==Calling Functions== <section name="callSF" class="Server" show...")
 
No edit summary
Line 6: Line 6:


==Calling Functions==
==Calling Functions==
<section name="callSF" class="Server" show="false">
<section name="callSF" class="server" show="true">
<syntaxhighlight lang="lua"> void exports.callingFunctions:callSF( string funcname, [ var arg1, ... ] ) </syntaxhighlight>
<syntaxhighlight lang="lua"> void exports.callingFunctions:callSF( string funcname, [ var arg1, ... ] ) </syntaxhighlight>
=Required=
=Required=
Line 16: Line 16:
</syntaxhighlight>
</syntaxhighlight>
</section>
</section>
<section name="callCF" class="Client" show="false">
<section name="callCF" class="client" show="true">
<syntaxhighlight lang="lua"> void exports.callingFunctions:callCF( string funcname, [ var arg1, ... ] ) </syntaxhighlight>
<syntaxhighlight lang="lua"> void exports.callingFunctions:callCF( string funcname, [ var arg1, ... ] ) </syntaxhighlight>
=Required=
=Required=

Revision as of 03:11, 23 May 2012

Accessories-text-editor.png Script Example Missing Function Resource:CallingFunctions needs a script example, help out by writing one.

Before submitting check out Editing Guidelines Script Examples.

This resource was made off of the functions: CallClientFunction and CallServerFunction

Calling Functions

Click to collapse [-]
callSF
 void exports.callingFunctions:callSF( string funcname, [ var arg1, ... ] ) 

Required

  • funcname: The name of the function that should be called serverside. May also be a function in a table, e.g. "math.round".

Optional

  • agr1-argn: The arguments that should be passed to the function.

Example


Click to collapse [-]
callCF
 void exports.callingFunctions:callCF( string funcname, [ var arg1, ... ] ) 

Required

  • Client: The element of the player who should be affected.
  • funcname: The name of the function that should be called serverside. May also be a function in a table, e.g. "math.round".

Optional

  • agr1-argn: The arguments that should be passed to the function.

Example