Jump to content

Home

2nd Word


XSeth2kX

Recommended Posts

Posted

how would i get the second word typed into the console

 

im tryign to make a msg command

 

ie "MSG TEST"

 

how would i set it to trigger the command msg and the actuall msg to be test then print it?

Posted

you mean how do you get stuff entered in the console to have command arguments and stuff - I think jaii nailed your question.

 

If he didn't, well, it's your fault for not being specific.

Posted
Originally posted by Jaii der Herr

*_Argv() functions?

 

 

?

 

I want to get the 2nd word typed in the console.say the user typed in MSG TEST i want it to trigger the function MSG and actually message "test"

Posted

if (trap_Argc() == 2)

{

char wanted[MAX_STRING_CHARS];

trap_Argv( 1, wanted, sizeof( wanted ) );

// do something with wanted here

}

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...