hello!
I've been trying to bind a self-made function to the "+speed" command.
Somehow everything I try fails with that command.
Can anybody check if there is anything wrong with my code?
PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <fun>
#include <engine>
new player_combos[32][2][33]
public plugin_init() {
register_plugin("Speed Combo System", "1.0", "SSJ2GOKU")
register_clcmd("+speed", "set_combo_on");
register_clcmd("-speed", "set_combo_off");
}
/**************************/
/**** COMBO SYSTEM BOX ****/
/**************************/
public showComboSystemNotice(id){
if(player_combos[id][0][0] == 1) {
set_hudmessage(0, 255, 0, 0.0, 0.5, 0, 6.0, 2.0)
show_hudmessage(id, "Combo System Active!")
set_task(2.0, "showComboSystemNotice");
}
}
public set_combo_on(id){
client_print(id, print_chat, "COMBO INITIATED");
player_combos[id][0][0] = 1;
showComboSystemNotice(id);
}
public set_combo_off(id){
if(player_combos[id][0][0] != 0){
client_print(id, print_chat, "COMBO STOPPED");
client_print(id, print_chat, player_combos[id][1]);
player_combos[id][0][0] = 0;
}
}