Scripting/Squirrel/Functions/SetServerPassword

From Vice City Multiplayer
Revision as of 09:39, 15 November 2014 by Ysc3839 (talk | contribs)
Jump to navigation Jump to search
Caution icon
This wiki is using an old backup from 2020
Some information may be old/missing

This function will set the server password.

Syntax

SetPassword( password )

Arguments

  • string password - The password to set

This command will change the server password when a player types '/setpass anystring'.

function onPlayerCommand( player, cmd, text )
{
     if ( cmd == "setpass" )
     {
          SetPassword( text );
     }
}

Notes

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

Related Functions