Freelancer Community Network
Reminder: Internet Explorer 6 or below are NOT supported.
HomeHome
ForumForum
WikiWiki
DownloadsDownloads
ForgeForge
Multiplayer Connection Tutorial
Collapse/Expand Login
Username:

Password:

Remember me



Lost Password?

Register now!
Collapse/Expand Chat
Collapse/Expand Who's Online
88 user(s) are online (39 user(s) are browsing Forum)

Members: 0
Guests: 88

more...
Collapse/Expand Donations
Monthly costs: -30€
Income (ads): +5€
Donations (last month): +0€

Current balance: 55€
(last updated 04/2021)

Please make a donation if you want to help keeping The-Starport online:

Thanks!
Collapse/Expand Links
Collapse/Expand Advertisement
There are currently 51 users playing Freelancer on 46 servers.
May. 17, 2022

Browsing this Thread:   1 Anonymous Users



 Bottom   Previous Topic   Next Topic  Register To Post



Client DLL (Plugin...) - help needed
Just can't stay away
Joined:
2008/6/16 20:41
Group:
Registered Users
FLServer Admins
Trusted Speciality Developers
Posts: 312
Offline
I have a question. I am currently trying to write a plugin and need to know the players id in game. I want to use the pub namespace from the server.lib and often you need the players client id.

For example I want to retrieve if the player is in space and for hooking i request the shipid - but therefore i need the client id. So the question is. How do i determine the client id at the client side or is there another way i have to go?

Thanks in advance!

Posted on: 2012/6/6 20:35
Open in new window
Top
Re: Client DLL (Plugin...) - help needed
Home away from home
Joined:
2009/8/16 2:58
From Qld, Aus.
Group:
Registered Users
FLServer Admins
Trusted Speciality Developers
Senior Members
Posts: 2006
Offline
If you're playing SP, the player id is always 1; if you're not playing SP, calling the functions in server.dll is not going to do you any good.

However, you can get the current base at [0x66873c] (and the location follows at [0x668740]) - if that's zero, you're in space. The current system is at [0x673354]. You can get the CShip* from [[0x679744]+8] (if you're not in space, [0x679744] is zero).

Posted on: 2012/6/7 8:26
Top
Re: Client DLL (Plugin...) - help needed
Just can't stay away
Joined:
2008/6/16 20:41
Group:
Registered Users
FLServer Admins
Trusted Speciality Developers
Posts: 312
Offline
Ok, thanks for the detailed hints. So practically using any of the server.dll functions calls would do more harm than be useful for MP?

Posted on: 2012/6/7 16:31
Open in new window
Top
Re: Client DLL (Plugin...) - help needed
Home away from home
Joined:
2009/8/16 2:58
From Qld, Aus.
Group:
Registered Users
FLServer Admins
Trusted Speciality Developers
Senior Members
Posts: 2006
Offline
The client doesn't load server.dll during MP, so if you load it yourself, it's just going to have a player count of 0 and all the calls will fail.

Posted on: 2012/6/8 7:20
Top