Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Forum » Non case-sensitive chat commands?
Re: Non case-sensitive chat commands? [message #367684 is a reply to message #367682] Sat, 17 January 2009 22:42 Go to previous messageGo to previous message
Genesis2001
Messages: 1397
Registered: August 2006
Karma:
General (1 Star)
Use the native chat hook ssgm provides and sscanf/strcmp/stricmp parse it. Wink

char Command[80], params[256];
if (sscanf(Message, "%s %s", &Command, &params) == 0) // granted not 100% sure how to grab anything after the first request...
{
    if (stricmp(Command, "!test") == 0) // could be strcmp for case in-sensitive matches, but then again...not sure
    {
       // do stuffz
    }
}


*pokes RoShamBo the mentor* Smile lol

[Updated on: Sat, 17 January 2009 22:43]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Alternative to tiled textures?
Next Topic: Changing FONT in renegade
Goto Forum:
  


Current Time: Wed Dec 04 20:30:58 MST 2024

Total time taken to generate the page: 0.00835 seconds