this is my script i made myself. Yes it's probably stupidly wrong but it's my first plugin. I want it so it doesn't repeat the cycle more than 1 time, i only want it to do this once, how do i do this? thanks
Quote:
#include <amxmodx>
#include <engine>
//terrum_meckmapchange.sma:
// Custom plugin by Terrum. Not to be released.
new const PLUGIN[] = "Mecklenburg Map Changer"
new const VERSION[] = "1"
new const AUTHOR[] = "Terrum"
new cycler_classname[] = "whatever"
new const Float:cycler_time = 5.0 //cycler runs every so many seconds
new const cvar_name[] = "amx_mecklenburg_mapchange"
new const cvar_default[] = "1" //default cvar value. "1"=on,"0"=off
public plugin_init() {
register_plugin(PLUGIN,VERSION,AUTHOR)
register_cvar( cvar_name , cvar_default )
new entity = create_entity("info_target")
entity_set_string(entity,EV_SZ_classname,cycl er_classname)
entity_set_float(entity,EV_FL_nextthink,halfl ife_time() + cycler_time)
register_think(cycler_classname,"HandleCycler ")
} //public.plugin_init
public HandleCycler(entity) {
if ( get_cvar_num( cvar_name ) > 0 ) { //if cvar greater than zero
} //if.cvar
server_cmd("amx_map mecklenburgv5_a6")
server_cmd("amxx pause terrum_meck")
} //public.HandleCycler
|
EDIT: Well all i want it to do is change the map to "mecklenburgv5_a6" once after 5 seconds the server starts and have a CVAR "amx_mecklenburg_mapchange" default to 1 (1 = on. 0 = off.)
__________________