Calling Console Commands From SDK

From The DarkMod Wiki
Revision as of 13:27, 11 September 2006 by Greebo (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Originally written by Ishtvan on http://forums.thedarkmod.com/topic/3719

This is an example of how you would call a console command within the SDK:

/*
================
idTarget_SessionCommand::Event_Activate
================
*/
void idTarget_SessionCommand::Event_Activate( idEntity *activator ) {
   gameLocal.sessionCommand = spawnArgs.GetString( "command" );
}