Hosting and domain costs until October 2024 have been generously sponsored by dumptruck_ds. Thank you!

stuffcmd

From Quake Wiki

void stuffcmd(entity player, string cmd)

Usage[edit]

Sends a message to the passed player's console. Useful for executing console commands such as the item flash on pick up. Messages should have the \n character at the end to ensure commands run properly and future messages will move to the next line.

Parameters[edit]

  • player
The player to send the message to.
  • cmd
The message to run in the player's console e.g. a command.

Example[edit]

// Execute the item flash when a player picks up an item
if (other.flags & FL_CLIENT)
    stuffcmd(other, "bf\n");