Dropping all weapons, not just rifles
Code:
#include <amxmodx>
#include <amxmisc>
#include <fun>
#include <cstrike>
public plugin_init()
{
register_plugin("Frag-check", "1.0", "Caesar")
register_event("CurWeapon", "frag_check", "be")
}
public frag_check(id)
{
new frags = get_user_frags(id)
new temp[2], weapon = get_user_weapon(id, temp[0], temp[1])
if(frags >= 20)
{
if(weapon != CSW_HEGRENADE || weapon != CSW_FLASHGRENADE || weapon != CSW_SMOKEGRENADE || weapon != CSW_KNIFE || weapon != CSW_P228 || weapon != CSW_KNIFE || weapon != CSW_MAC10 || weapon != CSW_ELITE || weapon != CSW_FIVESEVEN || weapon != CSW_UMP45 || weapon != CSW_USP || weapon != CSW_GLOCK18 || weapon != CSW_MP5NAVY || weapon != CSW_TMP || weapon != CSW_DEAGLE || weapon != CSW_P90)
{
client_print(id, print_chat, "[AMXX] You have too many kills, don't use the good weapons!")
client_cmd(id, "drop")
}
return 1
}
return 1
}
What I am trying to do is make it so once you have 20 kills or more then it makes you drop your weapon, but it is dropping all weapons.
Any help please?
|