View Single Post
Nexerade
Junior Member
Join Date: May 2015
Location: Russia unfortunately
Old 04-01-2024 , 09:50   Re: [CSS] Adding new guns plugin
Reply With Quote #6

Fixed broken money/price code.
Old code:
Code:
int price, money = GetEntProp(client, Prop_Send, "m_iAccount");
if(hPrice.GetValue(weapon, money) && (money -= price) >= 0)
{
	PrintToChat(client, "Not enough money to buy.");
	if(menu) hMenu.Display(client, MENU_TIME_FOREVER);
	return;
}
New code:
Code:
int money = GetEntProp(client, Prop_Send, "m_iAccount");
int price = 0;
if(hPrice.GetValue(weapon, price) && ((money -= price) < 0))
{
	PrintToChat(client, "Not enough money to buy.");
	if(menu) hMenu.Display(client, MENU_TIME_FOREVER);
	return;
}
I made a weapon following tutorial, including decompiling/recompiling weapon to include new sounds.
However, script doesn't seem to work correctly and there are bunch of issues present:

1) When reloading/shooting, for 1 frame there is default weapon visible flickering.
2) There are no new sounds for firing.
3) There are no sounds for reloading/other sounds.
4) Silenced weapon have default world model weapon.
Nexerade is offline