SMoKE Posted November 15, 2007 Share Posted November 15, 2007 Heyhey I'm wondering if anyone has an idea of how to make so that when a trigger_multiple is used, a .menu pops up? I've been looking around in g_trigger.c, and i *think* that I have to add it somewhere in void Touch_Multi( gentity_t *self, gentity_t *other, trace_t *trace ), but I dunno for sure exactly what I shall add. I also looked in ui_shared.h and ui_shared.c, where the function menuDef_t *Menus_ActivateByName(const char *p) is defined, but I can't seem to #include the file in g_trigger.c or anything. Suggestions, anyone? Maybe the RPG modders has a clue? /me is noob... -_- Link to comment Share on other sites More sharing options...
ensiform Posted November 15, 2007 Share Posted November 15, 2007 You can't achieve this by a server modification only, sorry. You would send something like trap_SendServerCommand(clientNumTouching, "openMenu menuNum"); in cg_servercmds.c you would intercept "openMenu" in CG_ServerCommand() similar to scl, but use a switch that determines the number to open certain menus. This will also require you to modify the UI to open a certain named menu then from which trap_OpenUIMenu can handle. See _UI_SetActiveMenu in ui_main.c for that. Link to comment Share on other sites More sharing options...
SMoKE Posted November 15, 2007 Author Share Posted November 15, 2007 Smooth, thanks alot; it works! xD Link to comment Share on other sites More sharing options...
ensiform Posted November 15, 2007 Share Posted November 15, 2007 No problem. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.