Player API

From The KillerJim Mod Wiki

KJModPlayerProxy

The Player Proxy class is provided so that you can set (mostly on the server) aspects of a user, or query (on the server and clients) aspects of the user...

For example; on the server you would set a players character, health, available guns, etc. For example; on a client you would set voice settings, chat options, enable UI elements or see if the player is looked at another player

It's important to realize that, in normal operations (it's KJMod you can do what you want), the server will spawn a player proxy for each player that joins and removes it when they leave. This player proxy is spawned so that it's made available on client machines too (so every client has a player proxy for every other player). This allows client to query other proxies for things (for example, in TTT is that player a terrorist, are they standing infront of me?, etc.) but it also allows the proxy to hold information (such as for TTT, the "Terrorist" label that sits above them and is visible to other terrorists).

Normally you would created a BluePrint class that inherits from the KJModPlayerProxy and then place all your logic for both the server-side actions (spawning, etc.) and client-side functions (showing UI's, controlling chat settings, etc.) within that class.

Playing

Developers

Developer Reference