Hello,
Amx is at 1.71 on windows. Well, my plugin worked before I upgraded to 1.70 so it might be code changes that affected it. My problem is that on fy_ maps, I made a plugin so that they will drop their usp or glock, and give them a deagle instead. It works, however, it's not working for me anymore. It works for everyone else and even bots, but I can't make it work for me.
Code:
#include <amxmodx>
#include <fun>
#include <cstrike>
new givedeagle = 0;
public plugin_init() {
register_plugin("Drop&Give", "1.0", "pandaGirl")
register_event("ResetHUD", "spawned", "b")
new mapname[33]
get_mapname(mapname,32)
if(contain(mapname,"fy_") > -1 ) {
givedeagle = 1;
}
}
public spawned(id) {
if(givedeagle == 1 && is_user_alive(id)) {
set_task(0.5,"give_it",id)
}
}
public give_it(id) {
new clip, ammo, weapon = get_user_weapon(id,clip,ammo);
switch (weapon) {
case CSW_GLOCK18: {
client_cmd(id, "drop weapon_glock18")
give_item(id,"weapon_deagle")
cs_set_user_bpammo(id, CSW_DEAGLE, 35)
}
case CSW_USP: {
client_cmd(id, "drop weapon_usp")
give_item(id,"weapon_deagle")
cs_set_user_bpammo(id, CSW_DEAGLE, 35)
}
}
}
I ono why it's ignoring me and not anyone else. =/