AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   No Buy (https://forums.alliedmods.net/showthread.php?t=74785)

KingCommentor 07-25-2008 00:43

No Buy
 
How can I make CT not buy guns through the regular press B and the menu comes up?

KingCommentor 07-25-2008 00:46

Re: No Buy
 
Or better yet, this is a buy_menu from a plugin.. and I was wondering how to disable this .. what do I change here to just take it out? Or simply.. disable it so I can buy the regular way.


Code:

public buy_menu(id, key)
{
new money = cs_get_user_money(id)

new dualcost = 800
new mac10cost = 1400
new idfcost = 2000
new akcost = 2500
new kreigcost = 3500
new D3cost = 5000

switch (key)
{
case 0:
{
if(money < dualcost)
{
client_print(id, print_center, "%L",id, "BUY_MONEY", dualcost)
}
else
{
drop_sec(id)
cs_set_user_money(id, money - dualcost)
give_item(id,"weapon_elite")
}
}
case 1:
{
if(money < mac10cost)
{
client_print(id, print_center, "%L",id, "BUY_MONEY", mac10cost)
}
else
{
drop_prim(id)
cs_set_user_money(id, money - mac10cost)
give_item(id,"weapon_mac10")
}
}
case 2:
{
if(money < idfcost)
{
client_print(id, print_center, "%L",id, "BUY_MONEY", idfcost)
}
else
{
drop_prim(id)
cs_set_user_money(id, money - idfcost)
give_item(id,"weapon_galil")
}
}
case 3:
{
if(money < akcost)
{
client_print(id, print_center, "%L",id, "BUY_MONEY", akcost)
}
else
{
drop_prim(id)
cs_set_user_money(id, money - akcost)
give_item(id,"weapon_ak47")
}
}
case 4:
{
if(money < kreigcost)
{
client_print(id, print_center, "%L",id, "BUY_MONEY", kreigcost)
}
else
{
drop_prim(id)
cs_set_user_money(id, money - kreigcost)
give_item(id,"weapon_sg552")
}
}
case 5:
{
if(money < D3cost)
{
client_print(id, print_center, "%L",id, "BUY_MONEY", D3cost)
}
else
{
drop_prim(id)
cs_set_user_money(id, money - D3cost)
give_item(id,"weapon_g3sg1")
}
}
case 9:
return PLUGIN_HANDLED
}

return PLUGIN_HANDLED


KingCommentor 07-25-2008 12:36

Re: No Buy
 
If there is more code you ned to do or another part where I disable it.. just tell me .. I'm new to all this.


All times are GMT -4. The time now is 05:32.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.