This should help a little:
PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <fun> // you need this module for the set_user_* functions in this plugin
#include <cstrike> // you need this module for cs_[set/get]_user_money
#define PLUGIN "Gummi_Bears"
#define VERSION "1.0"
#define AUTHOR "Gummi_Bears_fan"
new bool:has_juice[33]
new GBJ_cost, GBJ_health, GBJ_armor, GBJ_speed, GBJ_gravity
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_clcmd("say /GBJ","buy_GummiBerryJuice")
register_event("ResetHUD","event_ResetHUD","b") // use the ResetHUD event to catch when the player spawns
register_event("DeathMsg","event_DeathMsg","a"); // use the DeathMsg event to take away the Juice
register_event("CurWeapon","event_CurWeapon","be"); // use the CurWeapon event to keep setting player's speed
GBJ_cost = register_cvar("gbj_cost","16000") // cvar for cost
GBJ_health = register_cvar("gbj_health","999") // cvar for health
GBJ_armor = register_cvar("gbj_armor","999") // cvar for armor
GBJ_speed = register_cvar("gbj_speed","450.0") // cvar for speed
GBJ_gravity = register_cvar("gbj_health","0.5") // cvar for gravity
}
public client_connect(id) {
has_juice[id] = false // reset the bool variable back to false on connect
}
public buy_GummiBerryJuice(id)
{
if(has_juice[id])
{
client_print(id, print_chat, "[AMXX] You already have Gummi Bear Juice!")
return PLUGIN_CONTINUE
}
new money = cs_get_user_money(id)
if((money - get_pcvar_num(GBJ_cost)) < 0) // check if the player has enough cash
{
client_print(id, print_chat, "[AMXX] You don't have enough money for Gummi Bear Juice!")
return PLUGIN_CONTINUE
}
has_juice[id] = true;
client_print(id, print_chat, "[AMXX] You now have Gummi Bear Juice!")
return PLUGIN_CONTINUE
}
public event_ResetHUD(id) { // you need to delay it
set_task(0.3, "check_juice", id)
}
public check_juice(id) {
if(has_juice[id]) // check if the player has juice
{
set_user_health(id, get_pcvar_num(GBJ_health))
set_user_armor(id, get_pcvar_num(GBJ_armor))
set_user_maxspeed(id, get_pcvar_float(GBJ_speed))
set_user_gravity(id, get_pcvar_float(GBJ_gravity)) // needs to be a float (0.5 is 400 gravity)
}
}
public event_DeathMsg(id) { // remove Juice after death
has_juice[read_data(2)] = false
}
public event_CurWeapon(id) { // set player's maxspeed continuously
if(is_user_alive(id) && has_juice[id]) {
set_user_maxspeed(id, get_pcvar_float(GBJ_gravity))
}
}
As for the multi-jump, just download the source to it, then piece it together in your plugin and add credits.
__________________