[CS MOD] CSO-NST Refresh Edition [2011] - A new thread

  • Thread starter Thread starter Orpheus
  • Ngày gửi Ngày gửi
Status
Không mở trả lời sau này.
vừa chơi qua thử mh2.0 cảm tưởng ntn`y:
Cũng phình thường thôi, ko có gì hot ngoại trừ draw tga ra mà ko bị dis như tôi=)), các biểu tưởng icon như hero khi đc thay = tga thì nhìn chung di chuyển khá mượt giống cso, nhưng vì cái số để đo cự li supbox = text nên vẫn ko mượt = cso thật đc, đem lại cảm giác giật giật khó chịu. Nói chung trong mh đợt này có mỗi thay đổi là draw tga ra thôi chứ ko có gì hot lắm. Chiều mai tôi thử decode ra xem có fun nào hot
 
Thế dùng được cho ver hiện tại chưa ?
 
vừa chơi qua thử mh2.0 cảm tưởng ntn`y:
Cũng phình thường thôi, ko có gì hot ngoại trừ draw tga ra mà ko bị dis như tôi=)), các biểu tưởng icon như hero khi đc thay = tga thì nhìn chung di chuyển khá mượt giống cso, nhưng vì cái số để đo cự li supbox = text nên vẫn ko mượt = cso thật đc, đem lại cảm giác giật giật khó chịu. Nói chung trong mh đợt này có mỗi thay đổi là draw tga ra thôi chứ ko có gì hot lắm. Chiều mai tôi thử decode ra xem có fun nào hot

ông test của CSO DJB hả .................
 
vừa chơi qua thử mh2.0 cảm tưởng ntn`y:
Cũng phình thường thôi, ko có gì hot ngoại trừ draw tga ra mà ko bị dis như tôi=)), các biểu tưởng icon như hero khi đc thay = tga thì nhìn chung di chuyển khá mượt giống cso, nhưng vì cái số để đo cự li supbox = text nên vẫn ko mượt = cso thật đc, đem lại cảm giác giật giật khó chịu. Nói chung trong mh đợt này có mỗi thay đổi là draw tga ra thôi chứ ko có gì hot lắm. Chiều mai tôi thử decode ra xem có fun nào hot

@ Mr Kai : Nick yahoo của ông là gì ? :D tôi add hỏi vài điều :D
 
KaKaAn: Chuẩn luôn :>
REdplane: h` tôi phải đi làm kiếm sống nên bận lắm, chỉ rảnh chút ít buổi tối thôi nên h` ko chat, nếu có gì hỏi ông cứ post lên ko thì pm vào tin nhắn cho tôi :)
 
Tôi muốn hỏi ông cách xài metahook 2.0 kiểu gì :D. Và ông có thể send tôi bộ metahook đó không ? :)
 
Muốn xài được nó phải tùy thuộc vào ver của CS.
 
Tôi muốn hỏi ông cách xài metahook 2.0 kiểu gì :D. Và ông có thể send tôi bộ metahook đó không ? :)
1) VẪn như bản cũ 1.0(chạy cstrike sau khi đã nhúng đoạn code mh vào cstrike.exe=> điều này làm mình đỡ mất công phải load metahook.exe).
2) Tôi làm gì có source đâu mà send :-/ Có thì đã giàu rồi ^ ^
 
Chỉnh sửa cuối:
@kungfu:
cái vụ event ListWeapon anh làm thử thì thay đc hud nhưng không select đc weapon
vậy làm sao nhể :-w

cái này là thay hud của AK47 thành M4A1
PHP:
#include <amxmodx>
#include <amxmisc>
#include <fakemeta>
#include <hamsandwich>
#include <xs>
#include <cstrike>
#include <engine>
#include <fakemeta_util>


#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "author"


// Weapon Type
enum _:NST_WPN
{
	NST_WPN_NONE = 0,
	NST_WPN_PRIMARY,
	NST_WPN_SECONDARY,
	NST_WPN_MELEE,
	NST_WPN_GRENADE,
	
	NST_WPN_GRENADE2,
	NST_WPN_C4
}

new const CSWPN_NAME[][] = { "", "weapon_p228", "", "weapon_scout", "weapon_hegrenade", "weapon_xm1014", "weapon_c4", "weapon_mac10",
			"weapon_aug", "weapon_smokegrenade", "weapon_elite", "weapon_fiveseven", "weapon_ump45", "weapon_sg550",
			"weapon_galil", "weapon_famas", "weapon_usp", "weapon_glock18", "weapon_awp", "weapon_mp5navy", "weapon_m249",
			"weapon_m3", "weapon_m4a1", "weapon_tmp", "weapon_g3sg1", "weapon_flashbang", "weapon_deagle", "weapon_sg552",
			"weapon_ak47", "weapon_knife", "weapon_p90"
}

new const CSWPN_AMMOID[] = { -1, 9, -1, 2, 12, 5, 14, 6, 4, 13, 10, 7, 6, 4, 4, 4, 6, 10,
			1, 10, 3, 5, 4, 10, 2, 11, 8, 4, 2, -1, 7
}
new const CSWPN_MAXBPAMMO[] = { -1, 52, -1, 90, 1, 32, 1, 100, 90, 1, 120, 100, 100, 90, 90, 90, 100, 120,
			30, 120, 200, 32, 90, 120, 90, 2, 35, 90, 90, -1, 100
}


public plugin_init()
{
	register_plugin(PLUGIN, VERSION, AUTHOR)
	
	register_event("CurWeapon", "Event_CurWeapon", "be", "1=1")
	
	register_concmd("www", "www")
}

public www(id)
{
	fm_give_item(id, CSWPN_NAME[CSW_AK47])
	fm_give_item(id, CSWPN_NAME[CSW_M249])
	
}

public Event_CurWeapon(id)
{
	if (!is_user_alive(id)) return
	
	new iCsWpnId = read_data(2)
	new iCsWpnClip = read_data(3)
	
	update_hud_WeaponList(id, iCsWpnId, iCsWpnClip)
}


public update_hud_WeaponList(id, iCsWpnId, iCsWpnClip)
{
	new sWeaponName[32], iPriAmmoId, iPriAmmoMax, iSecAmmoId, iSecAmmoMax, iSlotId, iNumberInSlot, iWeaponId, iFlags
	
	if (iCsWpnId == CSW_AK47)
	{
		format(sWeaponName, charsmax(sWeaponName), "%s", CSWPN_NAME[CSW_M4A1])
	}
	else
	{
		format(sWeaponName, charsmax(sWeaponName), "%s", CSWPN_NAME[iCsWpnId])
	}
	
	iPriAmmoId = CSWPN_AMMOID[iCsWpnId]
	iPriAmmoMax = CSWPN_MAXBPAMMO[iCsWpnId]
	iSecAmmoId = -1
	iSecAmmoMax = -1
	iNumberInSlot = get_cswpn_position(iCsWpnId)
	iWeaponId = iCsWpnId
	get_cswpn_slotid_flags(iCsWpnId, iSlotId, iFlags)

	send_message_WeaponList(id, sWeaponName, iPriAmmoId, iPriAmmoMax, iSecAmmoId, iSecAmmoMax, iSlotId, iNumberInSlot, iWeaponId, iFlags)
	
	send_message_CurWeapon(id, 1, iWeaponId, iCsWpnClip)
	
	client_print(id, print_chat, "[%s] [%i] [%i] [%i] [%i] [%i] [%i] [%i] [%i]", sWeaponName, iPriAmmoId, iPriAmmoMax, iSecAmmoId, iSecAmmoMax, iSlotId, iNumberInSlot, iWeaponId, iFlags)
	
}

stock get_cswpn_slotid_flags(iCsWpn, &iSlotId, &iFlags)
{
	new iCsWpnType = get_cswpn_type(iCsWpn)
	switch (iCsWpnType)
	{
		case NST_WPN_PRIMARY:
		{
			iSlotId = 0
			iFlags = 0
		}
		case NST_WPN_SECONDARY:
		{
			iSlotId = 1
			iFlags = 0
		}
		case NST_WPN_MELEE:
		{
			iSlotId = 2
			iFlags = 0
		}
		case NST_WPN_GRENADE, NST_WPN_GRENADE2:
		{	
			iSlotId = 3
			iFlags = 24
		}
		case NST_WPN_C4:
		{	
			iSlotId = 4
			iFlags = 24
		}
	}
}
stock get_cswpn_type(cswpn)
{
	new iType
	switch (cswpn)
	{
		case CSW_M3, CSW_XM1014, CSW_MAC10, CSW_UMP45, CSW_MP5NAVY, CSW_TMP, CSW_P90, CSW_SCOUT, CSW_AUG, CSW_SG550, CSW_GALIL, CSW_FAMAS, CSW_AWP, CSW_M4A1, CSW_G3SG1, CSW_SG552, CSW_AK47, CSW_M249:
		{
			iType = NST_WPN_PRIMARY
		}
		case CSW_P228, CSW_ELITE, CSW_FIVESEVEN, CSW_USP, CSW_GLOCK18, CSW_DEAGLE:
		{
			iType = NST_WPN_SECONDARY
		}
		case CSW_KNIFE:
		{
			iType = NST_WPN_MELEE
		}
		case CSW_HEGRENADE:
		{
			iType = NST_WPN_GRENADE
		}
		case CSW_FLASHBANG, CSW_SMOKEGRENADE:
		{
			iType = NST_WPN_GRENADE2
		}
		case CSW_C4:
		{
			iType = NST_WPN_C4
		}
		default:
		{
			iType = NST_WPN_NONE
		}
	}
	
	return iType
}

stock get_cswpn_position(cswpn)
{
	new iPosition
	
	switch (cswpn)
	{
		case CSW_P228: iPosition = 3
		case CSW_SCOUT: iPosition = 9
		case CSW_HEGRENADE: iPosition = 1
		case CSW_XM1014: iPosition = 12
		case CSW_C4: iPosition = 3
		case CSW_MAC10: iPosition = 13
		case CSW_AUG: iPosition = 14
		case CSW_SMOKEGRENADE: iPosition = 3
		case CSW_ELITE: iPosition = 5
		case CSW_FIVESEVEN: iPosition = 6
		case CSW_UMP45: iPosition = 15
		case CSW_SG550: iPosition = 16
		case CSW_GALIL: iPosition = 17
		case CSW_FAMAS: iPosition = 18
		case CSW_USP: iPosition = 4
		case CSW_GLOCK18: iPosition = 2
		case CSW_AWP: iPosition = 2
		case CSW_MP5NAVY: iPosition = 7
		case CSW_M249: iPosition = 4
		case CSW_M3: iPosition = 5
		case CSW_M4A1: iPosition = 6
		case CSW_TMP: iPosition = 11
		case CSW_G3SG1: iPosition = 3
		case CSW_FLASHBANG: iPosition = 2
		case CSW_DEAGLE: iPosition = 1
		case CSW_SG552: iPosition = 10
		case CSW_AK47: iPosition = 1
		case CSW_KNIFE: iPosition = 1
		case CSW_P90: iPosition = 8
		default: iPosition = 0
	}
	
	return iPosition
}

stock send_message_CurWeapon(id, isActive, iWeaponID, iClip)
{
	new iDest = (id) ? MSG_ONE : MSG_ALL
	message_begin(iDest, get_user_msgid("CurWeapon"), _, id)
	write_byte(isActive)
	write_byte(iWeaponID)
	write_byte(iClip)
	message_end()
}

stock send_message_WeaponList(id, const sWeaponName[], iPriAmmoID, iPriAmmoMax, iSecAmmoID, iSecAmmoMax, iSlotId, iNumberInSlot, iWeaponId, iFlags)
{
	new iDest = (id) ? MSG_ONE : MSG_ALL
	message_begin(iDest, get_user_msgid("WeaponList"), _, id)
	write_string(sWeaponName)
	write_byte(iPriAmmoID)
	write_byte(iPriAmmoMax)
	write_byte(iSecAmmoID)
	write_byte(iSecAmmoMax)
	write_byte(iSlotId)
	write_byte(iNumberInSlot)
	write_byte(iWeaponId)
	write_byte(iFlags)
	message_end()
}
 
Chỉnh sửa cuối:
Thế sắp hết trung thu rồi team chỉ bị update đi:)
 
Đã ai trong team bik cách thay hud weapon riêng của từng cây súng chưa:-/
 
@kungfu:
cái vụ event ListWeapon anh làm thử thì thay đc hud nhưng không select đc weapon
vậy làm sao nhể :-w

cái này là thay hud của AK47 thành M4A1
PHP:
#include <amxmodx>
#include <amxmisc>
#include <fakemeta>
#include <hamsandwich>
#include <xs>
#include <cstrike>
#include <engine>
#include <fakemeta_util>


#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "author"


// Weapon Type
enum _:NST_WPN
{
	NST_WPN_NONE = 0,
	NST_WPN_PRIMARY,
	NST_WPN_SECONDARY,
	NST_WPN_MELEE,
	NST_WPN_GRENADE,
	
	NST_WPN_GRENADE2,
	NST_WPN_C4
}

new const CSWPN_NAME[][] = { "", "weapon_p228", "", "weapon_scout", "weapon_hegrenade", "weapon_xm1014", "weapon_c4", "weapon_mac10",
			"weapon_aug", "weapon_smokegrenade", "weapon_elite", "weapon_fiveseven", "weapon_ump45", "weapon_sg550",
			"weapon_galil", "weapon_famas", "weapon_usp", "weapon_glock18", "weapon_awp", "weapon_mp5navy", "weapon_m249",
			"weapon_m3", "weapon_m4a1", "weapon_tmp", "weapon_g3sg1", "weapon_flashbang", "weapon_deagle", "weapon_sg552",
			"weapon_ak47", "weapon_knife", "weapon_p90"
}

new const CSWPN_AMMOID[] = { -1, 9, -1, 2, 12, 5, 14, 6, 4, 13, 10, 7, 6, 4, 4, 4, 6, 10,
			1, 10, 3, 5, 4, 10, 2, 11, 8, 4, 2, -1, 7
}
new const CSWPN_MAXBPAMMO[] = { -1, 52, -1, 90, 1, 32, 1, 100, 90, 1, 120, 100, 100, 90, 90, 90, 100, 120,
			30, 120, 200, 32, 90, 120, 90, 2, 35, 90, 90, -1, 100
}


public plugin_init()
{
	register_plugin(PLUGIN, VERSION, AUTHOR)
	
	register_event("CurWeapon", "Event_CurWeapon", "be", "1=1")
	
	register_concmd("www", "www")
}

public www(id)
{
	fm_give_item(id, CSWPN_NAME[CSW_AK47])
	fm_give_item(id, CSWPN_NAME[CSW_M249])
	
}

public Event_CurWeapon(id)
{
	if (!is_user_alive(id)) return
	
	new iCsWpnId = read_data(2)
	new iCsWpnClip = read_data(3)
	
	update_hud_WeaponList(id, iCsWpnId, iCsWpnClip)
}


public update_hud_WeaponList(id, iCsWpnId, iCsWpnClip)
{
	new sWeaponName[32], iPriAmmoId, iPriAmmoMax, iSecAmmoId, iSecAmmoMax, iSlotId, iNumberInSlot, iWeaponId, iFlags
	
	if (iCsWpnId == CSW_AK47)
	{
		format(sWeaponName, charsmax(sWeaponName), "%s", CSWPN_NAME[CSW_M4A1])
	}
	else
	{
		format(sWeaponName, charsmax(sWeaponName), "%s", CSWPN_NAME[iCsWpnId])
	}
	
	iPriAmmoId = CSWPN_AMMOID[iCsWpnId]
	iPriAmmoMax = CSWPN_MAXBPAMMO[iCsWpnId]
	iSecAmmoId = -1
	iSecAmmoMax = -1
	iNumberInSlot = get_cswpn_position(iCsWpnId)
	iWeaponId = iCsWpnId
	get_cswpn_slotid_flags(iCsWpnId, iSlotId, iFlags)

	send_message_WeaponList(id, sWeaponName, iPriAmmoId, iPriAmmoMax, iSecAmmoId, iSecAmmoMax, iSlotId, iNumberInSlot, iWeaponId, iFlags)
	
	send_message_CurWeapon(id, 1, iWeaponId, iCsWpnClip)
	
	client_print(id, print_chat, "[%s] [%i] [%i] [%i] [%i] [%i] [%i] [%i] [%i]", sWeaponName, iPriAmmoId, iPriAmmoMax, iSecAmmoId, iSecAmmoMax, iSlotId, iNumberInSlot, iWeaponId, iFlags)
	
}

stock get_cswpn_slotid_flags(iCsWpn, &iSlotId, &iFlags)
{
	new iCsWpnType = get_cswpn_type(iCsWpn)
	switch (iCsWpnType)
	{
		case NST_WPN_PRIMARY:
		{
			iSlotId = 0
			iFlags = 0
		}
		case NST_WPN_SECONDARY:
		{
			iSlotId = 1
			iFlags = 0
		}
		case NST_WPN_MELEE:
		{
			iSlotId = 2
			iFlags = 0
		}
		case NST_WPN_GRENADE, NST_WPN_GRENADE2:
		{	
			iSlotId = 3
			iFlags = 24
		}
		case NST_WPN_C4:
		{	
			iSlotId = 4
			iFlags = 24
		}
	}
}
stock get_cswpn_type(cswpn)
{
	new iType
	switch (cswpn)
	{
		case CSW_M3, CSW_XM1014, CSW_MAC10, CSW_UMP45, CSW_MP5NAVY, CSW_TMP, CSW_P90, CSW_SCOUT, CSW_AUG, CSW_SG550, CSW_GALIL, CSW_FAMAS, CSW_AWP, CSW_M4A1, CSW_G3SG1, CSW_SG552, CSW_AK47, CSW_M249:
		{
			iType = NST_WPN_PRIMARY
		}
		case CSW_P228, CSW_ELITE, CSW_FIVESEVEN, CSW_USP, CSW_GLOCK18, CSW_DEAGLE:
		{
			iType = NST_WPN_SECONDARY
		}
		case CSW_KNIFE:
		{
			iType = NST_WPN_MELEE
		}
		case CSW_HEGRENADE:
		{
			iType = NST_WPN_GRENADE
		}
		case CSW_FLASHBANG, CSW_SMOKEGRENADE:
		{
			iType = NST_WPN_GRENADE2
		}
		case CSW_C4:
		{
			iType = NST_WPN_C4
		}
		default:
		{
			iType = NST_WPN_NONE
		}
	}
	
	return iType
}

stock get_cswpn_position(cswpn)
{
	new iPosition
	
	switch (cswpn)
	{
		case CSW_P228: iPosition = 3
		case CSW_SCOUT: iPosition = 9
		case CSW_HEGRENADE: iPosition = 1
		case CSW_XM1014: iPosition = 12
		case CSW_C4: iPosition = 3
		case CSW_MAC10: iPosition = 13
		case CSW_AUG: iPosition = 14
		case CSW_SMOKEGRENADE: iPosition = 3
		case CSW_ELITE: iPosition = 5
		case CSW_FIVESEVEN: iPosition = 6
		case CSW_UMP45: iPosition = 15
		case CSW_SG550: iPosition = 16
		case CSW_GALIL: iPosition = 17
		case CSW_FAMAS: iPosition = 18
		case CSW_USP: iPosition = 4
		case CSW_GLOCK18: iPosition = 2
		case CSW_AWP: iPosition = 2
		case CSW_MP5NAVY: iPosition = 7
		case CSW_M249: iPosition = 4
		case CSW_M3: iPosition = 5
		case CSW_M4A1: iPosition = 6
		case CSW_TMP: iPosition = 11
		case CSW_G3SG1: iPosition = 3
		case CSW_FLASHBANG: iPosition = 2
		case CSW_DEAGLE: iPosition = 1
		case CSW_SG552: iPosition = 10
		case CSW_AK47: iPosition = 1
		case CSW_KNIFE: iPosition = 1
		case CSW_P90: iPosition = 8
		default: iPosition = 0
	}
	
	return iPosition
}

stock send_message_CurWeapon(id, isActive, iWeaponID, iClip)
{
	new iDest = (id) ? MSG_ONE : MSG_ALL
	message_begin(iDest, get_user_msgid("CurWeapon"), _, id)
	write_byte(isActive)
	write_byte(iWeaponID)
	write_byte(iClip)
	message_end()
}

stock send_message_WeaponList(id, const sWeaponName[], iPriAmmoID, iPriAmmoMax, iSecAmmoID, iSecAmmoMax, iSlotId, iNumberInSlot, iWeaponId, iFlags)
{
	new iDest = (id) ? MSG_ONE : MSG_ALL
	message_begin(iDest, get_user_msgid("WeaponList"), _, id)
	write_string(sWeaponName)
	write_byte(iPriAmmoID)
	write_byte(iPriAmmoMax)
	write_byte(iSecAmmoID)
	write_byte(iSecAmmoMax)
	write_byte(iSlotId)
	write_byte(iNumberInSlot)
	write_byte(iWeaponId)
	write_byte(iFlags)
	message_end()
}
Giải thích về cái WeaponList: cái sWeaponName mà anh send đi sẽ cập nhật lại lệnh chọn súng ở slot và position đó, chẳng hạn anh send là "weapon_mg3" thì khi chọn súng nó sẽ thực hiện lệnh "weapon_mg3" --> ko đc>:)
Cách fix: dùng forward client_command, PLUGIN_HANDLED cái weapon_mg3, trước khi return thì nhớ client_cmd(id, "weapon_<tên_wpnchange>") nhé ông anh>:)
P/s: ơ thế AMX cũng dùng đc pointer như C++ à>:)có cái hay để vọc rồi>:)

Đã ai trong team bik cách thay hud weapon riêng của từng cây súng chưa:-/
Xong lâu rồi bạn ạ:|
 
Chỉnh sửa cuối:
Giải thích về cái WeaponList: cái sWeaponName mà anh send đi sẽ cập nhật lại lệnh chọn súng ở slot và position đó, chẳng hạn anh send là "weapon_mg3" thì khi chọn súng nó sẽ thực hiện lệnh "weapon_mg3" --> ko đc>:)
Cách fix: dùng forward client_command, PLUGIN_HANDLED cái weapon_mg3, trước khi return thì nhớ client_cmd(id, "weapon_<tên_wpnchange>") nhé ông anh>:)
P/s: ơ thế AMX cũng dùng đc pointer như C++ à>:)có cái hay để vọc rồi>:)

Xong lâu rồi bạn ạ:|
lằng nhằng nhể
thảo nào anh lọ mọ mãi mà không tài nào select đc :(

pointer là kiểu này à
PHP:
get_cswpn_slotid_flags(iCsWpn, &iSlotId, &iFlags)
 
1) VẪn như bản cũ 1.0(chạy cstrike sau khi đã nhúng đoạn code mh vào cstrike.exe=> điều này làm mình đỡ mất công phải load metahook.exe).
2) Tôi làm gì có source đâu mà send :-/ Có thì đã giàu rồi ^ ^

@ Mr.Kai : Ông gửi tôi cái metahook 2.0 mà ông đang dùng được không ? :)
Và tiện thể tôi hỏi là Show TGA kiểu gì vậy ? :). Tức là dùng func nào trong file .inc (nhớ gửi .inc cho tôi nữa nhé)
 
thấy con KFL nói cái gì cũng xong hết rồi:-?? vậy rút cuộc còn chờ cái gì nữa mà chưa release:-? hay các bạn định làm phát final update lun ah
 
Status
Không mở trả lời sau này.
Back
Top