Skip to content

dronelektron/dod-hooks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DOD hooks

Allows you to use native and detour functions

Supported Games

  • Day of Defeat: Source

Requirements

Installation

  • Download latest release
  • Extract gamedata and plugins folders to addons/sourcemod folder of your server

API

Default behavior of the forwards:

  • Plugin_Continue - Continue execution
  • Plugin_Changed - The parameters have been changed
  • Plugin_Handled - The same as Plugin_Continue
  • Plugin_Stop - Stop execution and return my value (if available)

Called before setting the winning team

forward Action GameRules_OnSetWinningTeam(int& team);

Called when the team is checked that it is full

Returns the full value

forward Action GameRules_OnTeamFull(int team, bool& full);

Called when the newTeam is checked that it is stacked

Returns the stacked value

forward Action GameRules_OnTeamStacked(int newTeam, int currentTeam, bool& stacked);

Called when the client is trying to join the class

Returns the canJoin value

forward Action GameRules_OnCanPlayerJoinClass(int client, int class, bool& canJoin);

Called before the client respawn

forward Action Player_OnRespawn(int client);

Called before the client joins the team

forward Action Player_OnJoinTeam(int client, int& team);

Called before the client joins the class

forward Action Player_OnJoinClass(int client, int& class);

Called before the client uses the voiceCommand

forward Action Player_OnVoiceCommand(int client, int& voiceCommand);

Set the winning team

native void GameRules_SetWinningTeam(int team);

Respawn the dead client or alive if forceRespawn is set to true

Returns true on success and false otherwise

native bool Player_Respawn(int client, bool forceRespawn = true);

Force the client to join the class

native void Player_JoinClass(int client, int class);

Force the client to use the voiceCommand

native void Player_VoiceCommand(int client, int voiceCommand);