Jump to content
Sign in to follow this  
mcfly_98

Determine Players IP

Recommended Posts

Hiho,

i just started with some practise in Arma 2 scripting.

The task is to read the players ip and write it to the report file.

But can't find any information where the ip adress ist stored. I tried

diag_log player;

But this returned only the classname.

Is there any way to print out the classmembers?

And second does the player object hold the ip adress?

Thanks for your help..

cu...

Share this post


Link to post
Share on other sites

I don't know if you can get the IP through scripting. The closest you can get is probably the player UID. Something like this in your init.sqf, untested.

if (isServer) then {
  onPlayerConnected 'diag_log format ["CONNECT LOG: Name: %1 connected, -- UID: %2 -- ID:%3",_name, _uid,_id];';
};

See also getPlayerUID

I don't know what you mean with classmembers.

Edited by cuel

Share this post


Link to post
Share on other sites

Check out Rcon for server management (logging IP's, and such).

Share this post


Link to post
Share on other sites

Thanks for your replies.

At the end of the project i want to write a script that allows players only that are in teamspeak to use the vehicles.

I think that is not possible with rcon commands.

I tought that the object player has classmembers, like "name" or "pos". I was hoping that there is a member like "ip" or "adress". But to search for, i need a tool.

What i'am searching for is a "print_r" for Arma. ;)

cu...

Edited by mcfly_98

Share this post


Link to post
Share on other sites

For that you need to use callExtension and create a module which returns the Teamspeak status of a name.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×