Scripting/Squirrel/Functions/SetGameModeText: Difference between revisions

From Vice City Multiplayer
Jump to navigation Jump to search
Caution icon
This wiki is using an old backup from 2020
Some information may be old/missing
(Created page with "This function will set the gamemode text to be shown in the client browser. == Syntax == <pre>SetGameModeText( gamemodetext )</pre> == Arguments == * ''string'' '''gamemod...")
 
No edit summary
 
(3 intermediate revisions by 3 users not shown)
Line 3: Line 3:
== Syntax ==
== Syntax ==


<pre>SetGameModeText( gamemodetext )</pre>
<pre>SetGameModeName( gamemodetext )</pre>


== Arguments ==
== Arguments ==
Line 11: Line 11:
== Example ==
== Example ==


{{Scripting/Needs_Example}}
<source lang=squirrel>
function onPlayerCommand ( player , cmd , text )
{
if ( cmd == "gamemodename" )
{
if ( !text ) MessagePlayer("/gamemodename [ Gamemode name ]" , player)
else SetGameModeName( text.tostring( ) ), MessagePlayer( "You changed the gamemode's name to " +text + "!" , player);
}
</source>


=== Notes ===
=== Notes ===
Call [[onPlayerCommand]] was used in this example.




Line 19: Line 28:


{{Scripting/Squirrel/Functions/Server_Settings}}
{{Scripting/Squirrel/Functions/Server_Settings}}
[[Category:Scripting/Squirrel/Functions/Server_Settings _Functions]]

Latest revision as of 21:48, 30 January 2017

This function will set the gamemode text to be shown in the client browser.

Syntax

SetGameModeName( gamemodetext )

Arguments

  • string gamemodetext - The game mode name to be set

Example

function onPlayerCommand ( player , cmd , text )
{
 if ( cmd == "gamemodename" )
 {
 if ( !text ) MessagePlayer("/gamemodename [ Gamemode name ]" , player)
 else SetGameModeName( text.tostring( ) ), MessagePlayer( "You changed the gamemode's name to " +text + "!" , player);
 }

Notes

Call onPlayerCommand was used in this example.


Related Functions