Hi, i am new to plugins and, I made a plugin consisting of:
E (Powerup)+T (Turbo) = increased power (PL)
the problem is that when I transform my ki becomes menor.
I leave the code have if someone can solve it
PHP Code:
#include <amxmodx>
#include <esf>
#define PLUGIN "ESF AumentarPL"
#define VERSION "1.0"
#define AUTHOR "Turbo"
const TASK_ID = 1324
new g_powerup[33]
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
register_clcmd("+powerup", "clcmd_powerup_start")
register_clcmd("-powerup", "clcmd_powerup_end")
register_clcmd("turbo", "clcmd_turbo")
}
public clcmd_powerup_start(id)
{
g_powerup[id] = 1
}
public clcmd_powerup_end(id)
{
g_powerup[id] = 0
remove_task(id+TASK_ID)
}
public clcmd_turbo(id)
{
if(g_powerup[id] == 1)
{
g_powerup[id] = 2
set_task(0.1, "task_powerup", id+TASK_ID, .flags="b")
}
}
public task_powerup(id)
{
id -= TASK_ID
setClientPL(id, getClientPL(id) + 9995)
}
PL before transformation:
PL after transformation: