1

Topic: GetClientCountry

Hello,

Is there a Function called GetClientCountry(ClientID)?
And when, how can I look for a Players Country in Gamecontect.cpp?

THANKS

2

Re: GetClientCountry

Hi,

A quick research in your src folder would give you the answer (Ctrl+F -> GetClientCountry).
Try to look in the player CClientData class:

struct CClientData
    {
        int m_UseCustomColor;
        int m_ColorBody;
        int m_ColorFeet;
        
        char m_aName[MAX_NAME_LENGTH];
        char m_aClan[MAX_CLAN_LENGTH];
        int m_Country; // < There you gooooo

This contains the info on the player's selected country code smile

Not Luck, Just Magic.

3

Re: GetClientCountry

"m_apPlayers[ClientID]->m_Country" - What's Wrong With That?

4 (edited by Dune 2011-06-18 21:30:51)

Re: GetClientCountry

L00P wrote:

"m_apPlayers[ClientID]->m_Country" - What's Wrong With That?

Nothing Is Wrong With That.

Not Luck, Just Magic.

5

Re: GetClientCountry

Wrong object. It's in src/engine/server.h