Last Man Standing: Knife Fight
Description:
When two players are left alive (FFA Support for CS:GO) they are prompted to Knife Fight.
When the fight begins, player's weapons are removed and given back after the end of the fight.
If enabled, a random song will be played during the fight.
Commands:
!kfmenu - Preferences for fight songs and auto-accept/decline. Also used to show the fight panel if
you change your mind.
Dependencies:
* Dev Zones - Franc1sco (OPTIONAL)
https://forums.alliedmods.net/showthread.php?t=224839
Configuration:
Code:
// Teleport player to a specific zone on a map (zone must be named <mapname>_knifefight
// -
// Default: "0"
// Minimum: "0.000000"
// Maximum: "1.000000"
sm_knifefight_devzones "0"
// Play random song from config during the fight
// -
// Default: "0"
// Minimum: "0.000000"
// Maximum: "1.000000"
sm_knifefight_fightsong "1"
// Force players to fight
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
sm_knifefight_forcefight "0"
// Min players to allow knife fight
// -
// Default: "3"
sm_knifefight_minplayers "3"
// Teleport players before the fight
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
sm_knifefight_teleport "1"
// Duration of the knife fight
// -
// Default: "30"
sm_knifefight_time "30"
Code:
"knifefight_songs"
{
"Songs"
{
/*
"Example"
{
"path" ""
}
*/
}
}
Forwards for developers:
Code:
/**
* Called when a player declines a fight
* @param client Player who declined
*/
forward void OnPlayerDeclineFight(int client);
/**
* Called when a player accepts a fight
* @param client Player who accepted
*/
forward void OnPlayerAcceptFight(int client);
/**
* Called when the Knife Fight starts
* @param player1
* @param player2
*/
forward void OnKnifeFightStart(int player1, int player2);
/**
* Called when the Knife Fight ends
* @param winner Player who won the fight
*/
forward void OnKnifeFightEnd(int winner);
Credits:
* Knife Fight by altex and all credits listed there
https://forums.alliedmods.net/showthread.php?p=847532
GitHub Repository
Direct Download