コード例 #1
0
ファイル: a_vote.c プロジェクト: tomas-edwardsson/aq2tng
//Ignores a player by name
void
Cmd_Ignore_f (edict_t * self, char *s)
{
  edict_t *target;

  if (!*s)
    {
      gi.cprintf (self, PRINT_MEDIUM, "\nUse ignore <playername>.\n");
      return;
    }
  target = FindClientByPersName (s);
  if (target && target != self)
    {
      if (level.framenum > (self->client->resp.ignore_time + 50))
	_AddOrDelIgnoreSubject (self, target, false);
      else
	{
	  gi.cprintf (self, PRINT_MEDIUM,
		      "Wait 5 seconds before ignoring again.\n");
	  return;
	}
    }
  else
    gi.cprintf (self, PRINT_MEDIUM,
		"\nUse ignorelist to see who can be ignored.\n");
}
コード例 #2
0
void Cmd_Votekick_f (edict_t * ent, char *argument)
{
	edict_t *target;

	if (!*argument)
	{
		gi.cprintf (ent, PRINT_HIGH, "\nUse votekick <playername>.\n");
		return;
	}
	target = FindClientByPersName (argument);
	if (target && target != ent)
		_SetKickVote (ent, target);
	else
		gi.cprintf (ent, PRINT_HIGH, "\nUse kicklist to see who can be kicked.\n");
}