Player::ip: Difference between revisions

From RAGE Multiplayer Wiki
No edit summary
No edit summary
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
This property returns players ip adress.
This property returns the player's IP address.


'''Note: this property is read-only.'''
'''Note: this property is read-only.'''
== Getter ==
* {{RageType|string}} The player's IP Address
== Example ==
== Example ==
<div class="header" style="background-color: #408DAE; color: #FFFFFF; border: 2px solid #408DAE;">
{{ServersideCode|
<div style="margin: 10px 10px 10px 10px;"><b>Server-Side</b></div>
<pre>
<syntaxhighlight lang="javascript">
const player = mp.players.at(0);
let playerIP = player.ip
 
</syntaxhighlight>
const playerIP = player.ip;
</div>
player.outputChatBox("Your IP is: " + playerIP);
</pre>
}}
 
==See Also==
==See Also==
{{Player_block}}
{{Player_block}}
[[Category:Player API]]
[[Category:Server-side Property]]

Latest revision as of 05:28, 31 May 2019

This property returns the player's IP address.

Note: this property is read-only.

Getter

  • string The player's IP Address

Example

Server-Side
const player = mp.players.at(0);

const playerIP = player.ip;
player.outputChatBox("Your IP is: " + playerIP);

See Also