Prethink is very poor way to do that, since it eats CPU.
PHP Code:
#include <amxmodx>
#include <cstrike>
#define IsUserAdmin(%1) (get_user_flags(%1) & ADMIN_KICK)
#define PLUGIN "Admin money Only"
#define VERSION "1.0"
#define AUTHOR "SpeeD"
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
client_cmd( "buy", "BuyCmd", -1)
}
public BuyCmd(id)
{
new szMoney = cs_get_user_money(id)
if(szMoney > 0 && !IsUserAdmin(id))
cs_set_user_money(id,0)
}
Whenever player tries to buy something using buymenu, their money will get nulled...but only works when players use money for default buymenu.
If you have some kind of shopmenu, then just change client_cmd to:
client_cmd( "say /shopmenu", "BuyCmd", -1)
__________________