try to use this :d
Code:
#include <amxmodx>
#include <cstrike>
#include <zombieplague>
#define PLUGIN_NAME "ammopacksexchangemoney"
#define PLUGIN_VERSION "1.0"
#define PLUGIN_AUTHOR "mo4151"
public plugin_init()
{
register_plugin(PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR)
// Say Command ( Client Command )
register_clcmd( "say ap_to_money", ammopacksexchangemoney );
register_clcmd( "say /ap_to_money", ammopacksexchangemoney );
}
public ammopacksexchangemoney(id)
{
if (zp_get_user_ammo_packs(id) >= 1)
{
cs_set_user_money(id,cs_get_user_money(id)+10000,1)
zp_set_user_ammo_packs(id,zp_get_user_ammo_packs(id)-1,1)
client_print(id,print_center,"you used 1 ammo pack to exchange $10000!")
}
else
{
client_print(id,print_center,"Sorry... you don't have enough ammo pack.")
}
}
So if the user say ap_to_money or /ap_to_money