here ya go ;)
Code:
#include <amxmodx>
#include <fun>
#define PLUGIN "Capture the Hax"
#define VERSION "1.0"
#define AUTHOR "ev0d00b"
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_cvar("amx_cth", "1")
register_logevent("Round_Start", 2, "0=World triggered", "1=Round_Start")
}
public Round_Start() {
new id
chooseRandomPlayer(id)
if( id == 0 ) return PLUGIN_HANDLED
new hackerName[32];
get_user_name(id,hackerName,31)
set_user_maxspeed (id, -2.0 )
}
public chooseRandomPlayer(index) {
index = random_num(1, get_maxplayers())
if(!is_user_alive(index) ) {
index = 0
set_task(0.1, "Restart_Rount" ) // give the funciton time to execute
return index
}
return index // every thing is a-ok
}
But there are still other problems, I dont know if this is the complete code or not.
If you run into any problems just post back ;)
__________________