Squirrel/Server/Functions/Scripts/UnregisterRemoteFunc

From Liberty Unleashed Wiki
(Difference between revisions)
Jump to: navigation, search
(Created page with "{{Squirrel/Title|UnregisterRemoteFunc}} This function unregister a remote function previus registered by RegisterRemoteFunc == Syntax == <code>UnregisterRemoteFunc ( string ...")
 
 
Line 12: Line 12:
 
== Example ==
 
== Example ==
  
Unregister the remove function 'HelloWorld!' previus registered by RegisterRemoteFunc typing /unregister
+
Unregister the function 'HelloWorld!' previus registered by RegisterRemoteFunc typing /unregister
  
 
<code lang="squirrel">
 
<code lang="squirrel">

Latest revision as of 01:13, 26 August 2014

Home   |   Squirrel Scripting   |   Server Functions   |   Server Events   |   Client Functions   |   Client Events

This function unregister a remote function previus registered by RegisterRemoteFunc

[edit] Syntax

  1. UnregisterRemoteFunc ( string Function )

[edit] Arguments

  • Function - The function to unregister

[edit] Example

Unregister the function 'HelloWorld!' previus registered by RegisterRemoteFunc typing /unregister

  1.  
  2. function onPlayerCommand ( pPlayer, szCommand, szParams ) {
  3.  
  4. switch ( szCommand ) {
  5.  
  6. case "unregister": {
  7.  
  8. UnregisterRemoteFunc ( "HelloWorld!" );
  9.  
  10. return;
  11. }
  12. }
  13. }
  14.  

[edit] Notes

The function UnregisterRemoteFunc and call onPlayerCommand were used in in this example. More info about them in corresponding pages.

[edit] Related Functions

Personal tools
Namespaces

Variants
Actions
Navigation
scripting
Toolbox