Try this
PHP Code:
#include <amxmodx>
#include <cstrike>
#include <fun>
new const g_Prefix[ ] = "[Prefix]";
new g_g3sg1_cost, g_sg550_cost;
public plugin_init()
{
register_plugin("VIP Weapon", "1.0.0", "tyiN*");
g_g3sg1_cost = register_cvar("cost_g3sg1", "5000")
g_sg550_cost = register_cvar("cost_sg550", "4200")
register_concmd("g3sg1", "weapon_g3sg1");
register_concmd("sg550", "weapon_sg550");
}
public weapon_g3sg1(id)
{
if (is_user_connected(id) && is_user_alive(id))
{
return;
}
if (get_user_team(id) == 1 && get_user_flags(id) & ADMIN_LEVEL_D )
{
cs_set_user_money(id, cs_get_user_money(id) - g_g3sg1_cost)
give_item( id, "weapon_g3sg1" );
emit_sound( id, CHAN_ITEM, "items/gunpickup2.wav", VOL_NORM , ATTN_NORM , 0 , PITCH_NORM );
}
else
{
client_print(id, print_chat, "%s Only VIP's have access to buy g3sg1!", g_Prefix);
}
}
public weapon_sg550(id)
{
if (is_user_connected(id) && is_user_alive(id))
{
return;
}
if (get_user_team(id) == 2 && get_user_flags(id) & ADMIN_LEVEL_D )
{
cs_set_user_money(id, cs_get_user_money(id) - g_sg550_cost)
give_item( id, "weapon_sg550" );
emit_sound( id, CHAN_ITEM, "items/gunpickup2.wav", VOL_NORM , ATTN_NORM , 0 , PITCH_NORM );
}
else
{
client_print(id, print_chat, "%s Only VIP's have access to buy sg550!", g_Prefix);
}
}