You subscribe to game events through the event manager. Have you done such?

.j

-----Original Message-----
From: hlcoders-boun...@list.valvesoftware.com
[mailto:hlcoders-boun...@list.valvesoftware.com] On Behalf Of JoeX
Sent: Friday, December 11, 2009 9:37 AM
To: Discussion of Half-Life Programming
Subject: [hlcoders] client-side game events

hello again!

i'm a bit confused about how events are managed in game (team fortress 2)

actually, i'm coding a CLIENT SIDE plugin, in wich i need to detect the
"player_death" event...

this is what i got...

void CEmptyServerPlugin::FireGameEvent( IGameEvent * event )
{
    const char* eventName = event->GetName();
    int _short;

    if( FStrEq( eventName, "player_death"))
    {
        _short = event->GetInt( "userid");

        player_info_t pinfo;
        engineclient->GetPlayerInfo(engineclient->GetLocalPlayer(), &pinfo);

        //verifify that client dies
        if( _short == pinfo.userID)
        {
            //code here
        }
    }
}


this work well, when i create a server in the game..... but when i play in
public servers..... it doesn't work....

and this is what confuse me:
to make this code work in public servers..... first i have to create my own
server, and then connect to other i want

why this happen?, what should i do?..... i'm really confused
here............


my own investigations in google, told me that using "CEmptyServerPlugin" is
the problem,..... i don't know....


nice to met you all!, and greetings from Chile! :D

PD: sorry for my bad english
_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives,
please visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders



_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders

Reply via email to