I have been tinkering with Code for ages, but never really writing up code of my own. This is my first attempt, but i'm not sure what i've done wrong. Could somone just proof check it for me.
Code:
#include <amxmodx>
#include <amxmisc>
#include <engine>
#include <engine_stocks>
#include <fun>
#include <harbu>
new id
new isonapill[33]
public plugin_init()
{
register_plugin("Adrenaline pills","0.0.0.0","Dean Booker AKA Ecko Mantle");
register_srvcmd("item_apill","item_apill");
}
public item_apill()
{
if(isonapill[id] = 1)
{
return PLUGIN_HANDLED
}
else
{
set_user_maxspeed 450
client_cmd(id, "cl_forwardspeed 450.0")
client_cmd(id, "cl_sidespeed 450.0")
client_cmd(id, "cl_backspeed 450.0")
client_cmd(id, "say /me takes an Adrenaline Pill.")
client_cmd(id, print_chat, "[Umbrella] You take an Adrenaline Pill.")
client_cmd(set_task(30.0, "apill_end", id)
isonapill[id] = 1
return PLUGIN_HANDLED;
}
public apill_end()
{
set_user_maxspeed 350
client_cmd(id, "cl_forwardspeed 350.0")
client_cmd(id, "cl_sidespeed 350.0")
client_cmd(id, "cl_backspeed 350.0")
isonapill[id] = 0
return PLUGIN_HANDLED
}
Any pointers would be great!
Regards,
Ecko