i was browsing through old posts looking for interesting requests and came upon this. i thought i'd explain why it doesn't work.
defining something causes it to be replace by the preprocessor before the compiler actually checks the code. so basically your code is looking like this:
Code:
#include <amxmodx>
#define sv_stepsize 18 // here you can adjust stepsize
new Float:seconds=30.0 // here you can change the seconds
public plugin_init(){
register_plugin("Timer","0.1","KoST")
//set_task(seconds,"MyTimer") [edit]
set_task(seconds,"MyTimer",0,"",0,"b")
}
public MyTimer(){
new step_size=get_cvar_num("18")
if (step_size!=18) {
set_cvar_num("18",18)
}
}
just change the name of the define from sv_stepsize to defaultsize or something, and then replace it in the if statement and set_cvar_num. sorry for the necro-post.
__________________
"You can not restrain a fool from speaking, but nothing obliges you to listen."