Squirrel/Server/Functions/Server/SetMapName

From Liberty Unleashed Wiki
(Difference between revisions)
Jump to: navigation, search
(Created page with '{{Squirrel/Title|SetMapName}} Changes the map name of the server. == Syntax == <code>bool SetMapName( string name )</code> == Arguments == * '''name''' - The name you want to…')
 
m (Notes: Fixed broken link to onPlayerCommand)
Line 26: Line 26:
 
=== Notes ===
 
=== Notes ===
  
The call [[Squirrel/Events/Player/OnPlayerCommand|OnPlayerCommand]] was also used in the example. More info about this in the corresponding page.
+
The call [[Squirrel/Server/Events/Player/onPlayerCommand|onPlayerCommand]] was also used in the example. More info about this in the corresponding page.
  
 
== Related Functions ==
 
== Related Functions ==
  
 
{{Squirrel/Functions/Server}}
 
{{Squirrel/Functions/Server}}

Revision as of 20:33, 7 September 2011

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

Changes the map name of the server.

Syntax

  1. bool SetMapName( string name )

Arguments

  • name - The name you want to change it to

Example

This example will change the mapname of the server when someone types '/changename Liberty City'

  1.  
  2. function OnPlayerCommand( id, cmd, text )
  3. {
  4. if ( cmd == "changename" )
  5. {
  6. SetMapName( text );
  7. }
  8. }
  9.  

Notes

The call onPlayerCommand was also used in the example. More info about this in the corresponding page.

Related Functions

Template:Squirrel/Functions/Server

Personal tools
Namespaces

Variants
Actions
Navigation
scripting
Toolbox