Code:
#include <amxmodx>
#include <amxmisc>
#include <tsfun>
#define PLUGIN "Kwik Weps"
#define VERSION "1.0"
#define AUTHOR "Kamil"
#define MAX_WEAPONS 24
new const g_szMessages[MAX_WEAPONS][] {
"/ruger", "/deagle",
"/bull", "/ak",
"/m4", "/uzi",
"/socom", "/glock",
"/mossberg", "/benelli",
"/barrett", "/tmp",
"/aug", "/usas",
"/colts", "/m16",
"/mp5sd", "/mp5",
"/57", "/berettas",
"/m60", "/spas",
"/mp7", "/guns"
};
new const g_iWeaponID[MAX_WEAPONS - 1] {
28, 12, 31, 13,
5, 3, 9, 22,
26, 4, 18, 17,
15, 11, 21, 27,
6, 7, 14, 8,
32, 20, 19
};
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR);
register_clcmd("say", "hook_say");
register_clcmd("say_team", "hook_say");
}
public hook_say(id) {
static message[64];
read_args(message, 63);
new i;
for(i = 0; i < MAX_WEAPONS; i++) {
if(equali(message, g_szMessages[i]) && i != 23) {
ts_giveweapon(id, g_iWeaponID[i], 200, 0);
break;
}
else {
show_motd(id, "zombie_weapons.txt");
break;
}
}
return PLUGIN_HANDLED;
}
But keep in mind you need to code the extra parameter because I got lazy...