knife error

Categoria cu cereri de pluginuri si nu numai.

Moderators: Moderatori ajutatori, Moderatori, Echipa eXtreamCS.com

Forum rules
Accesează link-ul pentru a putea vedea regulile forumului

Daca doriti sa vi se modifice un plugin, va rugam postati aici .
Post Reply
User avatar
GE NI
Membru, skill +1
Membru, skill +1
Posts: 186
Joined: 12 Jun 2013, 21:48
Detinator Steam: Nu
Location: Albania
Has thanked: 43 times
Contact:

28 Nov 2013, 17:38

hi everyone i have a furien server
ip : 50.30.47.227:28015
and when i buy superknife and change it to c4 or nade and back to superknife gives me normal knife skin with 2x damage


i think i should post here my plugins.ini
plugins.ini | Afiseaza codul
; AMX Mod X plugins
; --------------------------------------------------------------------
; Admin Base - Always one has to be activated
admin.amxx      ; admin base (required for any admin-related)
; admin_sql.amxx ; admin base - SQL version (comment admin.amxx)
; --------------------------------------------------------------------
admincmd.amxx     ; basic admin console commands
adminhelp.amxx    ; help command for admin console commands
adminslots.amxx   ; slot reservation
multilingual.amxx ; Multi-Lingual management
menufront.amxx    ; front-end for admin menus
cmdmenu.amxx      ; command menu (speech, settings)
plmenu.amxx       ; players menu (kick, ban, client cmds.)
; telemenu.amxx   ; teleport menu (Fun Module required!)
mapsmenu.amxx     ; maps menu (vote, changelevel)
pluginmenu.amxx   ; Menus for commands/cvars organized by plugin
adminchat.amxx    ; console chat commands
antiflood.amxx    ; prevent clients from chat-flooding the server
scrollmsg.amxx    ; displays a scrolling message
imessage.amxx     ; displays information messages
adminvote.amxx    ; vote commands
nextmap.amxx      ; displays next map in mapcycle
mapchooser.amxx   ; allows to vote for next map
timeleft.amxx     ; displays time left on map
pausecfg.amxx     ; allows to pause and unpause some plugins
statscfg.amxx     ; allows to manage stats plugins via menu and commands
; restmenu.amxx   ; restrict weapons menu
statsx.amxx       ; stats on death or round end (CSX Module required!)
; miscstats.amxx  ; bunch of events announcement for Counter-Strike
; stats_logging.amxx ; weapons stats logging (CSX Module required!)
; amxmod_compat.amxx ; AMX Mod backwards compatibility layer
; --------------------------------------------------------------------
bug_fix.amxx     ; SERVER CRASH BUGFIX
amx_showip.amxx  ; SHOW IP ADDR
bullet_damage.amxx
stuck.amxx
amx_gag.amxx
amx_ss.amxx
semiclip.amxx
amx_destroy.amxx
multijump.amxx
invasion.amxx
furien.amxx
furien_superknife.amxx
furien_parachute.amxx
furien_noflash.amxx
furien_health.amxx
furien_weapons.amxx
furien_shop.amxx
furien_defusekit.amxx
furien_armor.amxx
;furien_wallhang.amxx
furien_weapons.amxx
frostnades.amxx
flare.amxx
bad_camperct.amxx
swich.amxx
bcd_hudtimer.amxx
bonus_box.amxx
players_models.amxx
resetscore.amxx
ad_manager.amxx
depozit.amxx
hpmax.amxx
cer_instelat.amxx
instant_autoteambalance.amxx
viata.amxx ;for life
multifastdl.amxx
day_light.amxx
nademodes.amxx
furien_center_msg.amxx ;fr putting a msg up to the screen
knife.amxx ;to put knife skin
freewallhang.amxx
Rapidserver
User avatar
CaTa.
Fost moderator
Fost moderator
Posts: 420
Joined: 28 Jul 2013, 14:06
Detinator Steam: Nu
Detinator server CS: In curand !
Reputatie: Fost Moderator ajutator
Location: Targu-Mures
Has thanked: 99 times
Been thanked: 19 times
Contact:

28 Nov 2013, 17:43

GE NI wrote:hi everyone i have a furien server
ip : 50.30.47.227:28015
and when i buy superknife and change it to c4 or nade and back to superknife gives me normal knife skin with 2x damage


i think i should post here my plugins.ini
plugins.ini | Afiseaza codul
; AMX Mod X plugins
; --------------------------------------------------------------------
; Admin Base - Always one has to be activated
admin.amxx      ; admin base (required for any admin-related)
; admin_sql.amxx ; admin base - SQL version (comment admin.amxx)
; --------------------------------------------------------------------
admincmd.amxx     ; basic admin console commands
adminhelp.amxx    ; help command for admin console commands
adminslots.amxx   ; slot reservation
multilingual.amxx ; Multi-Lingual management
menufront.amxx    ; front-end for admin menus
cmdmenu.amxx      ; command menu (speech, settings)
plmenu.amxx       ; players menu (kick, ban, client cmds.)
; telemenu.amxx   ; teleport menu (Fun Module required!)
mapsmenu.amxx     ; maps menu (vote, changelevel)
pluginmenu.amxx   ; Menus for commands/cvars organized by plugin
adminchat.amxx    ; console chat commands
antiflood.amxx    ; prevent clients from chat-flooding the server
scrollmsg.amxx    ; displays a scrolling message
imessage.amxx     ; displays information messages
adminvote.amxx    ; vote commands
nextmap.amxx      ; displays next map in mapcycle
mapchooser.amxx   ; allows to vote for next map
timeleft.amxx     ; displays time left on map
pausecfg.amxx     ; allows to pause and unpause some plugins
statscfg.amxx     ; allows to manage stats plugins via menu and commands
; restmenu.amxx   ; restrict weapons menu
statsx.amxx       ; stats on death or round end (CSX Module required!)
; miscstats.amxx  ; bunch of events announcement for Counter-Strike
; stats_logging.amxx ; weapons stats logging (CSX Module required!)
; amxmod_compat.amxx ; AMX Mod backwards compatibility layer
; --------------------------------------------------------------------
bug_fix.amxx     ; SERVER CRASH BUGFIX
amx_showip.amxx  ; SHOW IP ADDR
bullet_damage.amxx
stuck.amxx
amx_gag.amxx
amx_ss.amxx
semiclip.amxx
amx_destroy.amxx
multijump.amxx
invasion.amxx
furien.amxx
furien_superknife.amxx
furien_parachute.amxx
furien_noflash.amxx
furien_health.amxx
furien_weapons.amxx
furien_shop.amxx
furien_defusekit.amxx
furien_armor.amxx
;furien_wallhang.amxx
furien_weapons.amxx
frostnades.amxx
flare.amxx
bad_camperct.amxx
swich.amxx
bcd_hudtimer.amxx
bonus_box.amxx
players_models.amxx
resetscore.amxx
ad_manager.amxx
depozit.amxx
hpmax.amxx
cer_instelat.amxx
instant_autoteambalance.amxx
viata.amxx ;for life
multifastdl.amxx
day_light.amxx
nademodes.amxx
furien_center_msg.amxx ;fr putting a msg up to the screen
knife.amxx ;to put knife skin
freewallhang.amxx
put here yours shop plugin
CLICK ! | Afiseaza codul
Ma gasesti pe Messenger la id :[/b] stelyistu_95@yahoo.com
Follow me on Instagram
Fa-ti cunoscut serverul de Counter-Strike pe facebook ! 
Fa-ti reclama gratis aici Click
My Plugin Furien Guns
User avatar
GE NI
Membru, skill +1
Membru, skill +1
Posts: 186
Joined: 12 Jun 2013, 21:48
Detinator Steam: Nu
Location: Albania
Has thanked: 43 times
Contact:

28 Nov 2013, 17:49

C@T@LInN wrote:
GE NI wrote:hi everyone i have a furien server
ip : 50.30.47.227:28015
and when i buy superknife and change it to c4 or nade and back to superknife gives me normal knife skin with 2x damage


i think i should post here my plugins.ini
plugins.ini | Afiseaza codul
; AMX Mod X plugins
; --------------------------------------------------------------------
; Admin Base - Always one has to be activated
admin.amxx      ; admin base (required for any admin-related)
; admin_sql.amxx ; admin base - SQL version (comment admin.amxx)
; --------------------------------------------------------------------
admincmd.amxx     ; basic admin console commands
adminhelp.amxx    ; help command for admin console commands
adminslots.amxx   ; slot reservation
multilingual.amxx ; Multi-Lingual management
menufront.amxx    ; front-end for admin menus
cmdmenu.amxx      ; command menu (speech, settings)
plmenu.amxx       ; players menu (kick, ban, client cmds.)
; telemenu.amxx   ; teleport menu (Fun Module required!)
mapsmenu.amxx     ; maps menu (vote, changelevel)
pluginmenu.amxx   ; Menus for commands/cvars organized by plugin
adminchat.amxx    ; console chat commands
antiflood.amxx    ; prevent clients from chat-flooding the server
scrollmsg.amxx    ; displays a scrolling message
imessage.amxx     ; displays information messages
adminvote.amxx    ; vote commands
nextmap.amxx      ; displays next map in mapcycle
mapchooser.amxx   ; allows to vote for next map
timeleft.amxx     ; displays time left on map
pausecfg.amxx     ; allows to pause and unpause some plugins
statscfg.amxx     ; allows to manage stats plugins via menu and commands
; restmenu.amxx   ; restrict weapons menu
statsx.amxx       ; stats on death or round end (CSX Module required!)
; miscstats.amxx  ; bunch of events announcement for Counter-Strike
; stats_logging.amxx ; weapons stats logging (CSX Module required!)
; amxmod_compat.amxx ; AMX Mod backwards compatibility layer
; --------------------------------------------------------------------
bug_fix.amxx     ; SERVER CRASH BUGFIX
amx_showip.amxx  ; SHOW IP ADDR
bullet_damage.amxx
stuck.amxx
amx_gag.amxx
amx_ss.amxx
semiclip.amxx
amx_destroy.amxx
multijump.amxx
invasion.amxx
furien.amxx
furien_superknife.amxx
furien_parachute.amxx
furien_noflash.amxx
furien_health.amxx
furien_weapons.amxx
furien_shop.amxx
furien_defusekit.amxx
furien_armor.amxx
;furien_wallhang.amxx
furien_weapons.amxx
frostnades.amxx
flare.amxx
bad_camperct.amxx
swich.amxx
bcd_hudtimer.amxx
bonus_box.amxx
players_models.amxx
resetscore.amxx
ad_manager.amxx
depozit.amxx
hpmax.amxx
cer_instelat.amxx
instant_autoteambalance.amxx
viata.amxx ;for life
multifastdl.amxx
day_light.amxx
nademodes.amxx
furien_center_msg.amxx ;fr putting a msg up to the screen
knife.amxx ;to put knife skin
freewallhang.amxx
put here yours shop plugin
here furien_shop | Afiseaza codul
/*	Formatright © 2010, ConnorMcLeod

	Furien Shop is free software;
	you can redistribute it and/or modify it under the terms of the
	GNU General Public License as published by the Free Software Foundation.

	This program is distributed in the hope that it will be useful,
	but WITHOUT ANY WARRANTY; without even the implied warranty of
	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
	GNU General Public License for more details.

	You should have received a copy of the GNU General Public License
	along with Furien Shop; if not, write to the
	Free Software Foundation, Inc., 59 Temple Place - Suite 330,
	Boston, MA 02111-1307, USA.
*/

#include <amxmodx>
#include <cstrike>

#include "furien.inc"
#include "furien_shop.inc"

new const szPickAmmoSound[] = "items/9mmclip1.wav"

enum _:ItemDatas
{
	m_szItemName[32],
	m_iItemCost,
	m_iItemForwardIndex,
	m_iItemExtraArg
}

enum ( <<= 1 )
{
	ShouldBeInBuyZone = 1,
	ShouldBeInBuyTime
}

#define HUD_PRINTCENTER		4

new g_iBlinkAcct, g_iTextMsg

new g_iBuyType, g_pCvarBuyTime

new Array:g_aItems[2]
new g_iMenuId[2] = {-1, -1}

new bool:g_bFreezeTime = true, bool:g_bBuyTime = true
new bool:g_bSwitchTime
new Float:g_flRoundStartGameTime

public plugin_init()
{
	register_plugin("Furien Shop", FURIEN_VERSION, "ConnorMcLeod")

	register_dictionary("common.txt")

	new pCvar = register_cvar("furien_shop_version", FURIEN_VERSION, FCVAR_SERVER|FCVAR_EXTDLL|FCVAR_SPONLY)
	set_pcvar_string(pCvar, FURIEN_VERSION)

	ReadCfgFile()

	if( g_iBuyType & ShouldBeInBuyZone )
	{
		register_event("StatusIcon", "Event_StatusIcon_OutOfBuyZone", "b", "1=0", "2=buyzone")
	}

	register_event("HLTV", "Event_HLTV_New_Round", "a", "1=0", "2=0")
	register_logevent("LogEvent_Round_Start", 2, "1=Round_Start")

	register_clcmd("shop", "ClientCommand_Shop")
	register_clcmd("say shop", "ClientCommand_Shop")
	register_clcmd("say_team shop", "ClientCommand_Shop")
	register_clcmd("buy", "ClientCommand_Shop")

	g_iBlinkAcct = get_user_msgid("BlinkAcct")
	g_iTextMsg = get_user_msgid("TextMsg")
	g_pCvarBuyTime = get_cvar_pointer("mp_buytime")
}

ReadCfgFile()
{
	new szConfigFile[128]
	get_localinfo("amxx_configsdir", szConfigFile, charsmax(szConfigFile))
	format(szConfigFile, charsmax(szConfigFile), "%s/furien/shop.ini", szConfigFile);

	new fp = fopen(szConfigFile, "rt")
	if( !fp )
	{
		return
	}

	new szDatas[32], szKey[16], szValue[16]
	while( !feof(fp) )
	{
		fgets(fp, szDatas, charsmax(szDatas))
		trim(szDatas)
		if(!szDatas[0] || szDatas[0] == ';' || szDatas[0] == '#' || (szDatas[0] == '/' && szDatas[1] == '/'))
		{
			continue
		}

		parse(szDatas, szKey, charsmax(szKey), szValue, charsmax(szValue))

		switch( szKey[0] )
		{
			case 'B':
			{
				if( equal(szKey, "BUY_TYPE" ) )
				{
					g_iBuyType = str_to_num(szValue)
				}
			}
		}
	}
	fclose( fp )
}

public plugin_precache()
{
	precache_sound(szPickAmmoSound)
}

public Event_HLTV_New_Round()
{
	g_bFreezeTime = true
	g_bBuyTime = true
	g_bSwitchTime = false
}

public LogEvent_Round_Start()
{
	g_bFreezeTime = false
	g_bBuyTime = true
	g_bSwitchTime = false
	g_flRoundStartGameTime = get_gametime()
}

bool:bIsBuyTime( id = 0 )
{
	new Float:flBuyTime
	if(	!g_bFreezeTime
	&&	( !g_bBuyTime || !(g_bBuyTime = get_gametime() < g_flRoundStartGameTime + (flBuyTime = get_buytime_value() * 60.0)) )	)
	{
		if( id )
		{
			new szBuyTime[3]
			float_to_str(flBuyTime, szBuyTime, charsmax(szBuyTime))
			Util_ClientPrint(id, HUD_PRINTCENTER, "#Cant_buy", szBuyTime)
		}
		return false
	}
	return true
}

Float:get_buytime_value()
{
	new Float:flBuyTime = get_pcvar_float(g_pCvarBuyTime)
	if( flBuyTime < 0.25 )
	{
		set_pcvar_float(g_pCvarBuyTime, 0.25)
		flBuyTime = 0.25
	}
	if( flBuyTime > 1.5 )
	{
		set_pcvar_float(g_pCvarBuyTime, 1.5)
		flBuyTime = 1.5
	}
	return flBuyTime
}

public furien_team_change()
{
	g_bSwitchTime = true

	new iPlayers[32], iNum
	get_players(iPlayers, iNum, "a")
	for(new i; i<iNum; i++)
	{
		CheckMenuClose(iPlayers)
	}
}

public Event_StatusIcon_OutOfBuyZone( id )
{
	CheckMenuClose(id)
}

CheckMenuClose(id)
{
	new iCrap, iMenuId
	player_menu_info(id, iCrap, iMenuId)
	if( iMenuId > -1 && (iMenuId == g_iMenuId[Furien] || iMenuId == g_iMenuId[AntiFurien]) )
	{
		menu_cancel(id)
	}
}

public plugin_natives()
{
	register_library("furien_shop")
	register_native("furien_register_item", "fr_register_item")
}

public fr_register_item(iPlugin)
{
	new mDatas[ItemDatas], szCallBack[32]

	get_string(5, szCallBack, charsmax(szCallBack))
	mDatas[m_iItemForwardIndex] = CreateOneForward(iPlugin, szCallBack, FP_CELL, FP_CELL)

	mDatas[m_iItemExtraArg] = get_param(6)

	if( (mDatas[m_iItemCost] = get_param(2)) > 0 )
	{
		get_string(1, mDatas[m_szItemName], charsmax(mDatas[m_szItemName]))
		AddItemToMenu( Furien , mDatas )
	}

	if( (mDatas[m_iItemCost] = get_param(4)) > 0 )
	{
		get_string(3, mDatas[m_szItemName], charsmax(mDatas[m_szItemName]))
		AddItemToMenu( AntiFurien , mDatas )
	}

	return mDatas[m_iItemForwardIndex]
}

AddItemToMenu( iTeam , mDatas[ItemDatas] )
{
	new Array:iArray = g_aItems[iTeam]
	if( iArray == Invalid_Array )
	{
		iArray = g_aItems[iTeam] = ArrayCreate(ItemDatas)
	}

	new iMenu = g_iMenuId[iTeam]
	if( iMenu == -1 )
	{
		new szMenuNames[][] = {"Furien Shop", "AntiFurien Shop"}
		new szHandlers[][] = {"FurienMenuHandler", "AntiMenuHandler"}
		iMenu = g_iMenuId[iTeam] = menu_create(szMenuNames[iTeam], szHandlers[iTeam])
		menu_setprop(iMenu, MPROP_NUMBER_COLOR, "\y")
	}

	ArrayPushArray(iArray, mDatas)
	new szItemInformation[64]
	formatex(szItemInformation, charsmax(szItemInformation), "%s\R\y$%d", mDatas[m_szItemName], mDatas[m_iItemCost])
	menu_additem(iMenu, szItemInformation)
}

public ClientCommand_Shop( id )
{
	if( !g_bSwitchTime && is_user_alive(id) )
	{
		if( !bCanBuy( id ) )
		{
			return PLUGIN_HANDLED_MAIN
		}

		ShowShopMenu(id)
		return PLUGIN_CONTINUE
	}

	return PLUGIN_HANDLED_MAIN
}

bCanBuy( id )
{
	if(	( g_iBuyType & ShouldBeInBuyZone && !cs_get_user_buyzone(id) )
	||	( g_iBuyType & ShouldBeInBuyTime && !bIsBuyTime(id) )	)
	{
		return false
	}

	return true
}

ShowShopMenu(id)
{
	new iTeam = furien_get_user_team(id)
	menu_display(id, g_iMenuId[iTeam])
}

public FurienMenuHandler(id, iMenu, iItem)
{
	if( iItem > MENU_MORE && is_user_alive(id) && furien_get_user_team(id) == Furien && bCanBuy( id ) )
	{
		new mDatas[ItemDatas]
		ArrayGetArray(Array:g_aItems[Furien], iItem, mDatas)
		Function(mDatas, id)
	}
}

public AntiMenuHandler(id, iMenu, iItem)
{
	if( iItem > MENU_MORE && is_user_alive(id) && furien_get_user_team(id) == AntiFurien && bCanBuy( id ) )
	{
		new mDatas[ItemDatas]
		ArrayGetArray(Array:g_aItems[AntiFurien], iItem, mDatas)
		Function(mDatas, id)
	}
}

Function(mDatas[ItemDatas], id)
{
	new iRet
	ExecuteForward(mDatas[m_iItemForwardIndex], iRet, id, mDatas[m_iItemExtraArg])
	switch( iRet )
	{
		case ShopBought:
		{
			emit_sound(id, CHAN_ITEM, szPickAmmoSound, VOL_NORM, ATTN_NORM, 0, PITCH_NORM)
			return 1
		}
		case ShopTeamNotAvail:
		{
			Util_ClientPrint
			(
				id,
				HUD_PRINTCENTER,
				"#Alias_Not_Avail",
				mDatas[ m_szItemName ]
			)
		}
		case ShopNotEnoughMoney:
		{
			client_print(id, print_center, "#Cstrike_TitlesTXT_Not_Enough_Money")

			message_begin(MSG_ONE_UNRELIABLE, g_iBlinkAcct, .player=id)
			{
				write_byte(2)
			}
			message_end()
		}
		case ShopAlreadyHaveOne:
		{
			client_print(id, print_center, "#Cstrike_TitlesTXT_Already_Have_One")
		}
		case ShopCantCarryAnymore:
		{
			client_print(id, print_center, "#Cstrike_TitlesTXT_Cannot_Carry_Anymore")
		}
		case ShopCannotBuyThis:
		{
			client_print(id, print_center, "#Cstrike_TitlesTXT_Cannot_Buy_This")
		}
		case ShopCloseMenu:
		{
			return 1
		}
	}
	return 0
}

// Only submessage1 is used but fully implemented for example.
// Based on HLSDK ClientPrint and UTIL_ClientPrintAll from util.cpp
Util_ClientPrint(id, iMsgDest, szMessage[], szSubMessage1[] = "", szSubMessage2[] = "", szSubMessage3[] = "", szSubMessage4[] = "")
{
	message_begin(id ? MSG_ONE_UNRELIABLE : MSG_BROADCAST, g_iTextMsg, .player=id)
	{
		write_byte(iMsgDest)
		write_string(szMessage)
		if( szSubMessage1[0] )
		{
			write_string(szSubMessage1)
		}
		if( szSubMessage2[0] )
		{
			write_string(szSubMessage2)
		}
		if( szSubMessage3[0] )
		{
			write_string(szSubMessage3)
		}
		if( szSubMessage4[0] )
		{
			write_string(szSubMessage4)
		}
	}
	message_end()
}

////// client_print //////
// #Cstrike_TitlesTXT_Cannot_Buy_This		"You cannot buy this item!"
// #Cstrike_TitlesTXT_Cannot_Carry_Anymore	"You cannot carry anymore!"
// #Cstrike_Already_Own_Weapon			"You already own that weapon."
// #Cstrike_TitlesTXT_Weapon_Not_Available	"This weapon is not available to you!"
// #Cstrike_TitlesTXT_Not_Enough_Money		"You have insufficient funds!"
// #Cstrike_TitlesTXT_CT_cant_buy			"CTs aren't allowed to buy"
// #Cstrike_TitlesTXT_Terrorist_cant_buy	"Terrorists aren't allowed to buy anything on this map!"
// #Cstrike_TitlesTXT_VIP_cant_buy			"You are the VIP. You can't buy anything!"

////// Util_ClientPrint ///////
// #Cstrike_TitlesTXT_Alias_Not_Avail + szWeapon		"The \"%s1\"is not available for your team to buy."
// #Cstrike_TitlesTXT_Cant_buy + szSeconds			"%s1 seconds have passed. You can't buy anything now!"


I dont think there is the plugin
i think it is on other plugins because without these plugins only with original plugin of furien like
furien.amxx
shop.amxx
armour.amxx
health.amxx
weapons.amxx
and others only original it works
User avatar
CaTa.
Fost moderator
Fost moderator
Posts: 420
Joined: 28 Jul 2013, 14:06
Detinator Steam: Nu
Detinator server CS: In curand !
Reputatie: Fost Moderator ajutator
Location: Targu-Mures
Has thanked: 99 times
Been thanked: 19 times
Contact:

28 Nov 2013, 17:57

GE NI wrote:
C@T@LInN wrote:
GE NI wrote:hi everyone i have a furien server
ip : 50.30.47.227:28015
and when i buy superknife and change it to c4 or nade and back to superknife gives me normal knife skin with 2x damage


i think i should post here my plugins.ini
plugins.ini | Afiseaza codul
; AMX Mod X plugins
; --------------------------------------------------------------------
; Admin Base - Always one has to be activated
admin.amxx      ; admin base (required for any admin-related)
; admin_sql.amxx ; admin base - SQL version (comment admin.amxx)
; --------------------------------------------------------------------
admincmd.amxx     ; basic admin console commands
adminhelp.amxx    ; help command for admin console commands
adminslots.amxx   ; slot reservation
multilingual.amxx ; Multi-Lingual management
menufront.amxx    ; front-end for admin menus
cmdmenu.amxx      ; command menu (speech, settings)
plmenu.amxx       ; players menu (kick, ban, client cmds.)
; telemenu.amxx   ; teleport menu (Fun Module required!)
mapsmenu.amxx     ; maps menu (vote, changelevel)
pluginmenu.amxx   ; Menus for commands/cvars organized by plugin
adminchat.amxx    ; console chat commands
antiflood.amxx    ; prevent clients from chat-flooding the server
scrollmsg.amxx    ; displays a scrolling message
imessage.amxx     ; displays information messages
adminvote.amxx    ; vote commands
nextmap.amxx      ; displays next map in mapcycle
mapchooser.amxx   ; allows to vote for next map
timeleft.amxx     ; displays time left on map
pausecfg.amxx     ; allows to pause and unpause some plugins
statscfg.amxx     ; allows to manage stats plugins via menu and commands
; restmenu.amxx   ; restrict weapons menu
statsx.amxx       ; stats on death or round end (CSX Module required!)
; miscstats.amxx  ; bunch of events announcement for Counter-Strike
; stats_logging.amxx ; weapons stats logging (CSX Module required!)
; amxmod_compat.amxx ; AMX Mod backwards compatibility layer
; --------------------------------------------------------------------
bug_fix.amxx     ; SERVER CRASH BUGFIX
amx_showip.amxx  ; SHOW IP ADDR
bullet_damage.amxx
stuck.amxx
amx_gag.amxx
amx_ss.amxx
semiclip.amxx
amx_destroy.amxx
multijump.amxx
invasion.amxx
furien.amxx
furien_superknife.amxx
furien_parachute.amxx
furien_noflash.amxx
furien_health.amxx
furien_weapons.amxx
furien_shop.amxx
furien_defusekit.amxx
furien_armor.amxx
;furien_wallhang.amxx
furien_weapons.amxx
frostnades.amxx
flare.amxx
bad_camperct.amxx
swich.amxx
bcd_hudtimer.amxx
bonus_box.amxx
players_models.amxx
resetscore.amxx
ad_manager.amxx
depozit.amxx
hpmax.amxx
cer_instelat.amxx
instant_autoteambalance.amxx
viata.amxx ;for life
multifastdl.amxx
day_light.amxx
nademodes.amxx
furien_center_msg.amxx ;fr putting a msg up to the screen
knife.amxx ;to put knife skin
freewallhang.amxx
put here yours shop plugin
here furien_shop | Afiseaza codul
/*	Formatright © 2010, ConnorMcLeod

	Furien Shop is free software;
	you can redistribute it and/or modify it under the terms of the
	GNU General Public License as published by the Free Software Foundation.

	This program is distributed in the hope that it will be useful,
	but WITHOUT ANY WARRANTY; without even the implied warranty of
	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
	GNU General Public License for more details.

	You should have received a copy of the GNU General Public License
	along with Furien Shop; if not, write to the
	Free Software Foundation, Inc., 59 Temple Place - Suite 330,
	Boston, MA 02111-1307, USA.
*/

#include <amxmodx>
#include <cstrike>

#include "furien.inc"
#include "furien_shop.inc"

new const szPickAmmoSound[] = "items/9mmclip1.wav"

enum _:ItemDatas
{
	m_szItemName[32],
	m_iItemCost,
	m_iItemForwardIndex,
	m_iItemExtraArg
}

enum ( <<= 1 )
{
	ShouldBeInBuyZone = 1,
	ShouldBeInBuyTime
}

#define HUD_PRINTCENTER		4

new g_iBlinkAcct, g_iTextMsg

new g_iBuyType, g_pCvarBuyTime

new Array:g_aItems[2]
new g_iMenuId[2] = {-1, -1}

new bool:g_bFreezeTime = true, bool:g_bBuyTime = true
new bool:g_bSwitchTime
new Float:g_flRoundStartGameTime

public plugin_init()
{
	register_plugin("Furien Shop", FURIEN_VERSION, "ConnorMcLeod")

	register_dictionary("common.txt")

	new pCvar = register_cvar("furien_shop_version", FURIEN_VERSION, FCVAR_SERVER|FCVAR_EXTDLL|FCVAR_SPONLY)
	set_pcvar_string(pCvar, FURIEN_VERSION)

	ReadCfgFile()

	if( g_iBuyType & ShouldBeInBuyZone )
	{
		register_event("StatusIcon", "Event_StatusIcon_OutOfBuyZone", "b", "1=0", "2=buyzone")
	}

	register_event("HLTV", "Event_HLTV_New_Round", "a", "1=0", "2=0")
	register_logevent("LogEvent_Round_Start", 2, "1=Round_Start")

	register_clcmd("shop", "ClientCommand_Shop")
	register_clcmd("say shop", "ClientCommand_Shop")
	register_clcmd("say_team shop", "ClientCommand_Shop")
	register_clcmd("buy", "ClientCommand_Shop")

	g_iBlinkAcct = get_user_msgid("BlinkAcct")
	g_iTextMsg = get_user_msgid("TextMsg")
	g_pCvarBuyTime = get_cvar_pointer("mp_buytime")
}

ReadCfgFile()
{
	new szConfigFile[128]
	get_localinfo("amxx_configsdir", szConfigFile, charsmax(szConfigFile))
	format(szConfigFile, charsmax(szConfigFile), "%s/furien/shop.ini", szConfigFile);

	new fp = fopen(szConfigFile, "rt")
	if( !fp )
	{
		return
	}

	new szDatas[32], szKey[16], szValue[16]
	while( !feof(fp) )
	{
		fgets(fp, szDatas, charsmax(szDatas))
		trim(szDatas)
		if(!szDatas[0] || szDatas[0] == ';' || szDatas[0] == '#' || (szDatas[0] == '/' && szDatas[1] == '/'))
		{
			continue
		}

		parse(szDatas, szKey, charsmax(szKey), szValue, charsmax(szValue))

		switch( szKey[0] )
		{
			case 'B':
			{
				if( equal(szKey, "BUY_TYPE" ) )
				{
					g_iBuyType = str_to_num(szValue)
				}
			}
		}
	}
	fclose( fp )
}

public plugin_precache()
{
	precache_sound(szPickAmmoSound)
}

public Event_HLTV_New_Round()
{
	g_bFreezeTime = true
	g_bBuyTime = true
	g_bSwitchTime = false
}

public LogEvent_Round_Start()
{
	g_bFreezeTime = false
	g_bBuyTime = true
	g_bSwitchTime = false
	g_flRoundStartGameTime = get_gametime()
}

bool:bIsBuyTime( id = 0 )
{
	new Float:flBuyTime
	if(	!g_bFreezeTime
	&&	( !g_bBuyTime || !(g_bBuyTime = get_gametime() < g_flRoundStartGameTime + (flBuyTime = get_buytime_value() * 60.0)) )	)
	{
		if( id )
		{
			new szBuyTime[3]
			float_to_str(flBuyTime, szBuyTime, charsmax(szBuyTime))
			Util_ClientPrint(id, HUD_PRINTCENTER, "#Cant_buy", szBuyTime)
		}
		return false
	}
	return true
}

Float:get_buytime_value()
{
	new Float:flBuyTime = get_pcvar_float(g_pCvarBuyTime)
	if( flBuyTime < 0.25 )
	{
		set_pcvar_float(g_pCvarBuyTime, 0.25)
		flBuyTime = 0.25
	}
	if( flBuyTime > 1.5 )
	{
		set_pcvar_float(g_pCvarBuyTime, 1.5)
		flBuyTime = 1.5
	}
	return flBuyTime
}

public furien_team_change()
{
	g_bSwitchTime = true

	new iPlayers[32], iNum
	get_players(iPlayers, iNum, "a")
	for(new i; i<iNum; i++)
	{
		CheckMenuClose(iPlayers)
	}
}

public Event_StatusIcon_OutOfBuyZone( id )
{
	CheckMenuClose(id)
}

CheckMenuClose(id)
{
	new iCrap, iMenuId
	player_menu_info(id, iCrap, iMenuId)
	if( iMenuId > -1 && (iMenuId == g_iMenuId[Furien] || iMenuId == g_iMenuId[AntiFurien]) )
	{
		menu_cancel(id)
	}
}

public plugin_natives()
{
	register_library("furien_shop")
	register_native("furien_register_item", "fr_register_item")
}

public fr_register_item(iPlugin)
{
	new mDatas[ItemDatas], szCallBack[32]

	get_string(5, szCallBack, charsmax(szCallBack))
	mDatas[m_iItemForwardIndex] = CreateOneForward(iPlugin, szCallBack, FP_CELL, FP_CELL)

	mDatas[m_iItemExtraArg] = get_param(6)

	if( (mDatas[m_iItemCost] = get_param(2)) > 0 )
	{
		get_string(1, mDatas[m_szItemName], charsmax(mDatas[m_szItemName]))
		AddItemToMenu( Furien , mDatas )
	}

	if( (mDatas[m_iItemCost] = get_param(4)) > 0 )
	{
		get_string(3, mDatas[m_szItemName], charsmax(mDatas[m_szItemName]))
		AddItemToMenu( AntiFurien , mDatas )
	}

	return mDatas[m_iItemForwardIndex]
}

AddItemToMenu( iTeam , mDatas[ItemDatas] )
{
	new Array:iArray = g_aItems[iTeam]
	if( iArray == Invalid_Array )
	{
		iArray = g_aItems[iTeam] = ArrayCreate(ItemDatas)
	}

	new iMenu = g_iMenuId[iTeam]
	if( iMenu == -1 )
	{
		new szMenuNames[][] = {"Furien Shop", "AntiFurien Shop"}
		new szHandlers[][] = {"FurienMenuHandler", "AntiMenuHandler"}
		iMenu = g_iMenuId[iTeam] = menu_create(szMenuNames[iTeam], szHandlers[iTeam])
		menu_setprop(iMenu, MPROP_NUMBER_COLOR, "\y")
	}

	ArrayPushArray(iArray, mDatas)
	new szItemInformation[64]
	formatex(szItemInformation, charsmax(szItemInformation), "%s\R\y$%d", mDatas[m_szItemName], mDatas[m_iItemCost])
	menu_additem(iMenu, szItemInformation)
}

public ClientCommand_Shop( id )
{
	if( !g_bSwitchTime && is_user_alive(id) )
	{
		if( !bCanBuy( id ) )
		{
			return PLUGIN_HANDLED_MAIN
		}

		ShowShopMenu(id)
		return PLUGIN_CONTINUE
	}

	return PLUGIN_HANDLED_MAIN
}

bCanBuy( id )
{
	if(	( g_iBuyType & ShouldBeInBuyZone && !cs_get_user_buyzone(id) )
	||	( g_iBuyType & ShouldBeInBuyTime && !bIsBuyTime(id) )	)
	{
		return false
	}

	return true
}

ShowShopMenu(id)
{
	new iTeam = furien_get_user_team(id)
	menu_display(id, g_iMenuId[iTeam])
}

public FurienMenuHandler(id, iMenu, iItem)
{
	if( iItem > MENU_MORE && is_user_alive(id) && furien_get_user_team(id) == Furien && bCanBuy( id ) )
	{
		new mDatas[ItemDatas]
		ArrayGetArray(Array:g_aItems[Furien], iItem, mDatas)
		Function(mDatas, id)
	}
}

public AntiMenuHandler(id, iMenu, iItem)
{
	if( iItem > MENU_MORE && is_user_alive(id) && furien_get_user_team(id) == AntiFurien && bCanBuy( id ) )
	{
		new mDatas[ItemDatas]
		ArrayGetArray(Array:g_aItems[AntiFurien], iItem, mDatas)
		Function(mDatas, id)
	}
}

Function(mDatas[ItemDatas], id)
{
	new iRet
	ExecuteForward(mDatas[m_iItemForwardIndex], iRet, id, mDatas[m_iItemExtraArg])
	switch( iRet )
	{
		case ShopBought:
		{
			emit_sound(id, CHAN_ITEM, szPickAmmoSound, VOL_NORM, ATTN_NORM, 0, PITCH_NORM)
			return 1
		}
		case ShopTeamNotAvail:
		{
			Util_ClientPrint
			(
				id,
				HUD_PRINTCENTER,
				"#Alias_Not_Avail",
				mDatas[ m_szItemName ]
			)
		}
		case ShopNotEnoughMoney:
		{
			client_print(id, print_center, "#Cstrike_TitlesTXT_Not_Enough_Money")

			message_begin(MSG_ONE_UNRELIABLE, g_iBlinkAcct, .player=id)
			{
				write_byte(2)
			}
			message_end()
		}
		case ShopAlreadyHaveOne:
		{
			client_print(id, print_center, "#Cstrike_TitlesTXT_Already_Have_One")
		}
		case ShopCantCarryAnymore:
		{
			client_print(id, print_center, "#Cstrike_TitlesTXT_Cannot_Carry_Anymore")
		}
		case ShopCannotBuyThis:
		{
			client_print(id, print_center, "#Cstrike_TitlesTXT_Cannot_Buy_This")
		}
		case ShopCloseMenu:
		{
			return 1
		}
	}
	return 0
}

// Only submessage1 is used but fully implemented for example.
// Based on HLSDK ClientPrint and UTIL_ClientPrintAll from util.cpp
Util_ClientPrint(id, iMsgDest, szMessage[], szSubMessage1[] = "", szSubMessage2[] = "", szSubMessage3[] = "", szSubMessage4[] = "")
{
	message_begin(id ? MSG_ONE_UNRELIABLE : MSG_BROADCAST, g_iTextMsg, .player=id)
	{
		write_byte(iMsgDest)
		write_string(szMessage)
		if( szSubMessage1[0] )
		{
			write_string(szSubMessage1)
		}
		if( szSubMessage2[0] )
		{
			write_string(szSubMessage2)
		}
		if( szSubMessage3[0] )
		{
			write_string(szSubMessage3)
		}
		if( szSubMessage4[0] )
		{
			write_string(szSubMessage4)
		}
	}
	message_end()
}

////// client_print //////
// #Cstrike_TitlesTXT_Cannot_Buy_This		"You cannot buy this item!"
// #Cstrike_TitlesTXT_Cannot_Carry_Anymore	"You cannot carry anymore!"
// #Cstrike_Already_Own_Weapon			"You already own that weapon."
// #Cstrike_TitlesTXT_Weapon_Not_Available	"This weapon is not available to you!"
// #Cstrike_TitlesTXT_Not_Enough_Money		"You have insufficient funds!"
// #Cstrike_TitlesTXT_CT_cant_buy			"CTs aren't allowed to buy"
// #Cstrike_TitlesTXT_Terrorist_cant_buy	"Terrorists aren't allowed to buy anything on this map!"
// #Cstrike_TitlesTXT_VIP_cant_buy			"You are the VIP. You can't buy anything!"

////// Util_ClientPrint ///////
// #Cstrike_TitlesTXT_Alias_Not_Avail + szWeapon		"The \"%s1\"is not available for your team to buy."
// #Cstrike_TitlesTXT_Cant_buy + szSeconds			"%s1 seconds have passed. You can't buy anything now!"


I dont think there is the plugin
i think it is on other plugins because without these plugins only with original plugin of furien like
furien.amxx
shop.amxx
armour.amxx
health.amxx
weapons.amxx
and others only original it works


PUT shop.amxx
CLICK ! | Afiseaza codul
Ma gasesti pe Messenger la id :[/b] stelyistu_95@yahoo.com
Follow me on Instagram
Fa-ti cunoscut serverul de Counter-Strike pe facebook ! 
Fa-ti reclama gratis aici Click
My Plugin Furien Guns
User avatar
GE NI
Membru, skill +1
Membru, skill +1
Posts: 186
Joined: 12 Jun 2013, 21:48
Detinator Steam: Nu
Location: Albania
Has thanked: 43 times
Contact:

29 Nov 2013, 10:58

C@T@LInN wrote:
GE NI wrote:
C@T@LInN wrote:
put here yours shop plugin
here furien_shop | Afiseaza codul
/*	Formatright © 2010, ConnorMcLeod

	Furien Shop is free software;
	you can redistribute it and/or modify it under the terms of the
	GNU General Public License as published by the Free Software Foundation.

	This program is distributed in the hope that it will be useful,
	but WITHOUT ANY WARRANTY; without even the implied warranty of
	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
	GNU General Public License for more details.

	You should have received a copy of the GNU General Public License
	along with Furien Shop; if not, write to the
	Free Software Foundation, Inc., 59 Temple Place - Suite 330,
	Boston, MA 02111-1307, USA.
*/

#include <amxmodx>
#include <cstrike>

#include "furien.inc"
#include "furien_shop.inc"

new const szPickAmmoSound[] = "items/9mmclip1.wav"

enum _:ItemDatas
{
	m_szItemName[32],
	m_iItemCost,
	m_iItemForwardIndex,
	m_iItemExtraArg
}

enum ( <<= 1 )
{
	ShouldBeInBuyZone = 1,
	ShouldBeInBuyTime
}

#define HUD_PRINTCENTER		4

new g_iBlinkAcct, g_iTextMsg

new g_iBuyType, g_pCvarBuyTime

new Array:g_aItems[2]
new g_iMenuId[2] = {-1, -1}

new bool:g_bFreezeTime = true, bool:g_bBuyTime = true
new bool:g_bSwitchTime
new Float:g_flRoundStartGameTime

public plugin_init()
{
	register_plugin("Furien Shop", FURIEN_VERSION, "ConnorMcLeod")

	register_dictionary("common.txt")

	new pCvar = register_cvar("furien_shop_version", FURIEN_VERSION, FCVAR_SERVER|FCVAR_EXTDLL|FCVAR_SPONLY)
	set_pcvar_string(pCvar, FURIEN_VERSION)

	ReadCfgFile()

	if( g_iBuyType & ShouldBeInBuyZone )
	{
		register_event("StatusIcon", "Event_StatusIcon_OutOfBuyZone", "b", "1=0", "2=buyzone")
	}

	register_event("HLTV", "Event_HLTV_New_Round", "a", "1=0", "2=0")
	register_logevent("LogEvent_Round_Start", 2, "1=Round_Start")

	register_clcmd("shop", "ClientCommand_Shop")
	register_clcmd("say shop", "ClientCommand_Shop")
	register_clcmd("say_team shop", "ClientCommand_Shop")
	register_clcmd("buy", "ClientCommand_Shop")

	g_iBlinkAcct = get_user_msgid("BlinkAcct")
	g_iTextMsg = get_user_msgid("TextMsg")
	g_pCvarBuyTime = get_cvar_pointer("mp_buytime")
}

ReadCfgFile()
{
	new szConfigFile[128]
	get_localinfo("amxx_configsdir", szConfigFile, charsmax(szConfigFile))
	format(szConfigFile, charsmax(szConfigFile), "%s/furien/shop.ini", szConfigFile);

	new fp = fopen(szConfigFile, "rt")
	if( !fp )
	{
		return
	}

	new szDatas[32], szKey[16], szValue[16]
	while( !feof(fp) )
	{
		fgets(fp, szDatas, charsmax(szDatas))
		trim(szDatas)
		if(!szDatas[0] || szDatas[0] == ';' || szDatas[0] == '#' || (szDatas[0] == '/' && szDatas[1] == '/'))
		{
			continue
		}

		parse(szDatas, szKey, charsmax(szKey), szValue, charsmax(szValue))

		switch( szKey[0] )
		{
			case 'B':
			{
				if( equal(szKey, "BUY_TYPE" ) )
				{
					g_iBuyType = str_to_num(szValue)
				}
			}
		}
	}
	fclose( fp )
}

public plugin_precache()
{
	precache_sound(szPickAmmoSound)
}

public Event_HLTV_New_Round()
{
	g_bFreezeTime = true
	g_bBuyTime = true
	g_bSwitchTime = false
}

public LogEvent_Round_Start()
{
	g_bFreezeTime = false
	g_bBuyTime = true
	g_bSwitchTime = false
	g_flRoundStartGameTime = get_gametime()
}

bool:bIsBuyTime( id = 0 )
{
	new Float:flBuyTime
	if(	!g_bFreezeTime
	&&	( !g_bBuyTime || !(g_bBuyTime = get_gametime() < g_flRoundStartGameTime + (flBuyTime = get_buytime_value() * 60.0)) )	)
	{
		if( id )
		{
			new szBuyTime[3]
			float_to_str(flBuyTime, szBuyTime, charsmax(szBuyTime))
			Util_ClientPrint(id, HUD_PRINTCENTER, "#Cant_buy", szBuyTime)
		}
		return false
	}
	return true
}

Float:get_buytime_value()
{
	new Float:flBuyTime = get_pcvar_float(g_pCvarBuyTime)
	if( flBuyTime < 0.25 )
	{
		set_pcvar_float(g_pCvarBuyTime, 0.25)
		flBuyTime = 0.25
	}
	if( flBuyTime > 1.5 )
	{
		set_pcvar_float(g_pCvarBuyTime, 1.5)
		flBuyTime = 1.5
	}
	return flBuyTime
}

public furien_team_change()
{
	g_bSwitchTime = true

	new iPlayers[32], iNum
	get_players(iPlayers, iNum, "a")
	for(new i; i<iNum; i++)
	{
		CheckMenuClose(iPlayers)
	}
}

public Event_StatusIcon_OutOfBuyZone( id )
{
	CheckMenuClose(id)
}

CheckMenuClose(id)
{
	new iCrap, iMenuId
	player_menu_info(id, iCrap, iMenuId)
	if( iMenuId > -1 && (iMenuId == g_iMenuId[Furien] || iMenuId == g_iMenuId[AntiFurien]) )
	{
		menu_cancel(id)
	}
}

public plugin_natives()
{
	register_library("furien_shop")
	register_native("furien_register_item", "fr_register_item")
}

public fr_register_item(iPlugin)
{
	new mDatas[ItemDatas], szCallBack[32]

	get_string(5, szCallBack, charsmax(szCallBack))
	mDatas[m_iItemForwardIndex] = CreateOneForward(iPlugin, szCallBack, FP_CELL, FP_CELL)

	mDatas[m_iItemExtraArg] = get_param(6)

	if( (mDatas[m_iItemCost] = get_param(2)) > 0 )
	{
		get_string(1, mDatas[m_szItemName], charsmax(mDatas[m_szItemName]))
		AddItemToMenu( Furien , mDatas )
	}

	if( (mDatas[m_iItemCost] = get_param(4)) > 0 )
	{
		get_string(3, mDatas[m_szItemName], charsmax(mDatas[m_szItemName]))
		AddItemToMenu( AntiFurien , mDatas )
	}

	return mDatas[m_iItemForwardIndex]
}

AddItemToMenu( iTeam , mDatas[ItemDatas] )
{
	new Array:iArray = g_aItems[iTeam]
	if( iArray == Invalid_Array )
	{
		iArray = g_aItems[iTeam] = ArrayCreate(ItemDatas)
	}

	new iMenu = g_iMenuId[iTeam]
	if( iMenu == -1 )
	{
		new szMenuNames[][] = {"Furien Shop", "AntiFurien Shop"}
		new szHandlers[][] = {"FurienMenuHandler", "AntiMenuHandler"}
		iMenu = g_iMenuId[iTeam] = menu_create(szMenuNames[iTeam], szHandlers[iTeam])
		menu_setprop(iMenu, MPROP_NUMBER_COLOR, "\y")
	}

	ArrayPushArray(iArray, mDatas)
	new szItemInformation[64]
	formatex(szItemInformation, charsmax(szItemInformation), "%s\R\y$%d", mDatas[m_szItemName], mDatas[m_iItemCost])
	menu_additem(iMenu, szItemInformation)
}

public ClientCommand_Shop( id )
{
	if( !g_bSwitchTime && is_user_alive(id) )
	{
		if( !bCanBuy( id ) )
		{
			return PLUGIN_HANDLED_MAIN
		}

		ShowShopMenu(id)
		return PLUGIN_CONTINUE
	}

	return PLUGIN_HANDLED_MAIN
}

bCanBuy( id )
{
	if(	( g_iBuyType & ShouldBeInBuyZone && !cs_get_user_buyzone(id) )
	||	( g_iBuyType & ShouldBeInBuyTime && !bIsBuyTime(id) )	)
	{
		return false
	}

	return true
}

ShowShopMenu(id)
{
	new iTeam = furien_get_user_team(id)
	menu_display(id, g_iMenuId[iTeam])
}

public FurienMenuHandler(id, iMenu, iItem)
{
	if( iItem > MENU_MORE && is_user_alive(id) && furien_get_user_team(id) == Furien && bCanBuy( id ) )
	{
		new mDatas[ItemDatas]
		ArrayGetArray(Array:g_aItems[Furien], iItem, mDatas)
		Function(mDatas, id)
	}
}

public AntiMenuHandler(id, iMenu, iItem)
{
	if( iItem > MENU_MORE && is_user_alive(id) && furien_get_user_team(id) == AntiFurien && bCanBuy( id ) )
	{
		new mDatas[ItemDatas]
		ArrayGetArray(Array:g_aItems[AntiFurien], iItem, mDatas)
		Function(mDatas, id)
	}
}

Function(mDatas[ItemDatas], id)
{
	new iRet
	ExecuteForward(mDatas[m_iItemForwardIndex], iRet, id, mDatas[m_iItemExtraArg])
	switch( iRet )
	{
		case ShopBought:
		{
			emit_sound(id, CHAN_ITEM, szPickAmmoSound, VOL_NORM, ATTN_NORM, 0, PITCH_NORM)
			return 1
		}
		case ShopTeamNotAvail:
		{
			Util_ClientPrint
			(
				id,
				HUD_PRINTCENTER,
				"#Alias_Not_Avail",
				mDatas[ m_szItemName ]
			)
		}
		case ShopNotEnoughMoney:
		{
			client_print(id, print_center, "#Cstrike_TitlesTXT_Not_Enough_Money")

			message_begin(MSG_ONE_UNRELIABLE, g_iBlinkAcct, .player=id)
			{
				write_byte(2)
			}
			message_end()
		}
		case ShopAlreadyHaveOne:
		{
			client_print(id, print_center, "#Cstrike_TitlesTXT_Already_Have_One")
		}
		case ShopCantCarryAnymore:
		{
			client_print(id, print_center, "#Cstrike_TitlesTXT_Cannot_Carry_Anymore")
		}
		case ShopCannotBuyThis:
		{
			client_print(id, print_center, "#Cstrike_TitlesTXT_Cannot_Buy_This")
		}
		case ShopCloseMenu:
		{
			return 1
		}
	}
	return 0
}

// Only submessage1 is used but fully implemented for example.
// Based on HLSDK ClientPrint and UTIL_ClientPrintAll from util.cpp
Util_ClientPrint(id, iMsgDest, szMessage[], szSubMessage1[] = "", szSubMessage2[] = "", szSubMessage3[] = "", szSubMessage4[] = "")
{
	message_begin(id ? MSG_ONE_UNRELIABLE : MSG_BROADCAST, g_iTextMsg, .player=id)
	{
		write_byte(iMsgDest)
		write_string(szMessage)
		if( szSubMessage1[0] )
		{
			write_string(szSubMessage1)
		}
		if( szSubMessage2[0] )
		{
			write_string(szSubMessage2)
		}
		if( szSubMessage3[0] )
		{
			write_string(szSubMessage3)
		}
		if( szSubMessage4[0] )
		{
			write_string(szSubMessage4)
		}
	}
	message_end()
}

////// client_print //////
// #Cstrike_TitlesTXT_Cannot_Buy_This		"You cannot buy this item!"
// #Cstrike_TitlesTXT_Cannot_Carry_Anymore	"You cannot carry anymore!"
// #Cstrike_Already_Own_Weapon			"You already own that weapon."
// #Cstrike_TitlesTXT_Weapon_Not_Available	"This weapon is not available to you!"
// #Cstrike_TitlesTXT_Not_Enough_Money		"You have insufficient funds!"
// #Cstrike_TitlesTXT_CT_cant_buy			"CTs aren't allowed to buy"
// #Cstrike_TitlesTXT_Terrorist_cant_buy	"Terrorists aren't allowed to buy anything on this map!"
// #Cstrike_TitlesTXT_VIP_cant_buy			"You are the VIP. You can't buy anything!"

////// Util_ClientPrint ///////
// #Cstrike_TitlesTXT_Alias_Not_Avail + szWeapon		"The \"%s1\"is not available for your team to buy."
// #Cstrike_TitlesTXT_Cant_buy + szSeconds			"%s1 seconds have passed. You can't buy anything now!"


I dont think there is the plugin
i think it is on other plugins because without these plugins only with original plugin of furien like
furien.amxx
shop.amxx
armour.amxx
health.amxx
weapons.amxx
and others only original it works


PUT shop.amxx


i think i didnt understand me
i wrote them shorter and have put furien_shop.amxx
i think now whitch of other plugins makes the problem
Post Reply

Return to “Cereri”

  • Information