Scripting/Squirrel/Functions/Player.World: 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
No edit summary
No edit summary
 
(2 intermediate revisions by one other user not shown)
Line 8: Line 8:
== Example ==
== Example ==
<pre>
<pre>
function onPlayerCommand( player, cmd, text )
{
if (cmd == "world")
if (cmd == "world")
{
{
MessagePlayer( "** Your world is " + player.World, player );</pre>
MessagePlayer( "** Your world is " + player.World, player );
}
}
}</pre>
== Related Functions ==
{{Scripting/Squirrel/Functions/Player Functions}}
[[Category:Scripting/Squirrel/Functions/Player_Functions]]

Latest revision as of 18:58, 30 January 2017

Syntax

player.World;

Description

player.World is a function which be used to determine to what world is the player belonging to.


Example

function onPlayerCommand( player, cmd, text )
{
if (cmd == "world")
{
MessagePlayer( "** Your world is " + player.World, player );
}
}

Related Functions

Player Game Functions

These functions exist for compatibility with the R2 Squirrel server.