Scripting/Squirrel/Functions/Player.IP: 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
Line 16: Line 16:
=== Notes ===
=== Notes ===


The functions [[Scripting/Squirrel/Functions/MessagePlayer|MessagePlayer]], [[Scripting/Squirrel/Functions/Player.Name|Player.Name]] and call [[Scripting/Squirrel/Events/Player/onPlayerCommand|onPlayerCommand]] were used in in this example. More info about them in corresponding pages.
Function [[Scripting/Squirrel/Functions/MessagePlayer|MessagePlayer]], [[Scripting/Squirrel/Functions/Player.Name|Player.Name]] and call [[Scripting/Squirrel/Events/Player/onPlayerCommand|onPlayerCommand]] were used in in this example. More info about them in corresponding pages.


== Related Functions ==
== Related Functions ==


{{Scripting/Squirrel/Functions/Player Functions}}
{{Scripting/Squirrel/Functions/Player Functions}}

Revision as of 21:53, 5 March 2015

This instance variable returns player's IP address.

Syntax

string player.IP

Example

function OnPlayerCommand( player , cmd , text )
{
	if ( cmd == "myip" ) MessagePlayer( " Your IP is " + player.IP , player );
}

Notes

Function MessagePlayer, Player.Name and call onPlayerCommand were used in in this example. More info about them in corresponding pages.

Related Functions

Player Game Functions

These functions exist for compatibility with the R2 Squirrel server.