Client DLL (Plugin…) - help needed
-
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!
-
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).