First plugin in a while guys, but here goes nothing....
Code:
/* AMX Mod script.
*
* (c) 2004, Strake
* This file is provided as is (no warranties).
*/
#include <amxmodx>
new Team1[64]
new Team2[64]
public plugin_init(){
register_plugin("Leauge","1.0","strake")
register_cvar("sv_leauge", "0")
register_cvar("match_team1", "Team 1")
register_cvar("match_team2", "Team 2")
register_concmd("amx_leauge", "leauge", ADMIN_RCON)
register_concmd("amx_startmatch", "start", ADMIN_RCON)
}
public leauge() {
server_cmd("exec leauge.cfg")
client_print(0, print_chat, "Leauge Configuration File Activated")
client_print(0, print_chat, "Let the Games Begin")
}
public start() {
get_cvar_string("match_team1", Team1, 64)
get_cvar_string("match_team2", Team2, 64)
server_cmd("amx_tsay red MATCH START. %s VS. %s", Team1, Team2)
server_cmd("sv_restartround 1")
server_cmd("sv_restartround 1")
server_cmd("sv_restartround 1")
}
Quote:
CVARs:
match_team1 <The name of the first team goes here>
match_team2 <The name of the second team goes here>
<End CVARS>
COMMANDS:
amx_leauge <Start Plugin> (Exec file Leauge.cfg)
amx_startmatch <Starts the Fighting> (Uses CVARs match_team1, and match_team2)
<END COMMANDS>
|
This Plugin compiles with no errors, but has not been tested on a server yet