OK. Here is an example copied from my Naruto hero on superhero mod forums. (Alias: Berserker on sh mod forums)
Code:
set_task(1.0,"naru_loop",0,"",0,"b" )
And here it is a task that is repeated every second. This is from a heal code like Wolverine. Also on sh mod forums.
Here is the thing it is calling. (naru_loop)
Code:
public naru_loop()
{
if (!shModActive()) return
new HealPoints = get_cvar_num("naru_hppersec")
for ( new id = 1; id <= SH_MAXSLOTS; id++ ) {
if ( gHasNarutoPowers[id] && is_user_alive(id) ) {
shAddHPs(id, HealPoints, gPlayerMaxHealth[id] )
}
}
}
You don't have to care about the last code that I posted but I wanted to show an example.
Did that solve your problem?
Code:
new currentkarma = get_user_karma(id)
new addkarma = 1
if(did_solve_problem(id))
{
set_user_karma(id, currentkarma + addkarma)
return PLUGIN_CONTINUE
}
Hehe. Just kidding
__________________