This compiles to .amx for a lovely 0 bytes. Since I'm new at this it's probably something very obvious(a PLUGIN_CONTINUE should be PLUGIN_HANDLED???), but please help me. Also, are my set_tasks doing what they are supposed to do. (Plugin is supposed to give one health a second to a player who has the boost activated.)
Code:
#include <amxmodx>
#include <amxmisc>
#include <fun>
new bool:booston[32] = false
public plugin_init()
{
register_plugin("Health Boost","0.1","twistedeuphoria")
register_concmd("hboost","health_switch",ADMIN_IMMUNITY,"Blah-To be added later.")
register_clcmd("hboost","health_switch",ADMIN_IMMUNITY,"Blah-To be added later.")
set_task(.5,"check_boost",1,"b",1)
return PLUGIN_CONTINUE
}
public health_switch(id)
{
if(booston[id] == false)
booston[id] = true
if(booston[id] == true)
booston[id] = false
return PLUGIN_CONTINUE
}
public check_boost()
{
new i
for(i=0,i<=31,i++)
{
if(booston[i] == true)
set_task(1,"give_health",2,id,"b",1)
if(booston[i] == false)
remove_task(i,2)
}
return PLUGIN_CONTINUE
}
public give_health(id)
{
new oldhealth
new newhealth
oldhealth = get_user_health(id)
newhealth = (oldhealth + 1)
set_user_health(id,newhealth)
return PLUGIN_CONTINUE
}
Thank you for your time.