Hello All
I am trying to fire an event within a Source Server Plug-in.
In GameEvents.res there is the following:
"player_chat" // a public player chat
{
"teamonly" "bool" // true if team only chat
"userid" "short" // chatting player
"text" "string" // chat text
}
[code]
CON_COMMAND_F( say_new, "Test, Console say.", FCVAR_GAMEDLL)
{
KeyValues * force_event;
force_event = new KeyValues( "player_chat" );
force_event->SetInt("teamonly", true );
/* Using 0 for userid so that it says its from the console */
force_event->SetInt("userid", 0 );
force_event->SetString("text","Blah blah blah");
gameeventmanager->FireEvent( force_event );
}
[end of code]
This don't seem to want to work.
Please don't say try using Source: Metamod ,due to I don't want it to use
that.
I gather that I am correct in using FireEvents(), or am I suppose to use
FireEventClientOnly() or FireEventServerOnly() ?
I want all players to see this message, and it has to be a chat message.
Thanks in advance
Paul
_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders