include the cstrike includefile and use the natives cs_set_user_money(id, amount), cs_get_user_money(id)
PHP Code:
// how to check if user is abled to buy the weapon..
If(cs_get_user_money(id) >= weapon_price)
{
cs_set_user_money(id, cs_get_user_money(id)-weapon_price)
// etc .........
}