Bác kaan cho xin bản mod Plugue ở video chữ kí bác cái!!topic đông vui ghê tớ đang học script
@Bio:ông có code tàng hình send tôi đi
mà plugins server Bio the best toàn ông tự viết ak
PS:có yahoo ko
topic đông vui ghê tớ đang học script
@Bio:ông có code tàng hình send tôi đi
mà plugins server Bio the best toàn ông tự viết ak
PS:có yahoo ko
giúp tớ cái nì với , mò code show sprite của sontung0 nhưng chả hỉu gì cả U_U, mình mún show sprite thì làm thế nào vậy ?dùng hàm gì ?
thì cũng như code lần trước ông post lên đây còn gìÀ ông Sơn tùng nè. Code hiển thị hud kill của ông là gì? post ra tôi tham khảo cái. Cái code hiển thị hud kill của tôi thì nhiều hud kill nó không thể hiển thị được. Nên phải dùng cs hud editor , replace hud, save as ra file riêng rồi cho vào trong hud.txt thì được. Mệt thật.
public plugin_init()
{
g_msgDeathMsg = get_user_msgid("DeathMsg")
register_message(g_msgDeathMsg, "message_DeathMsg")
}
// Hud Weapons
public message_DeathMsg()
{
// get value data
static killer, weapon[32], weaponid//, victim, headshot
killer = get_msg_arg_int(1)
//victim = get_msg_arg_int(2)
//headshot = get_msg_arg_int(3)
get_msg_arg_string(4, weapon, charsmax(weapon))
if (equali(weapon, "grenade")) format(weapon, charsmax(weapon), "hegrenade")
format(weapon, charsmax(weapon), "weapon_%s", weapon)
weaponid = get_weaponid(weapon)
// get wpn sprites name
new attacker_wpn = HAS_WEAPON[killer]
if (attacker_wpn && weaponid==g_wpn_change[attacker_wpn])
{
// get sprites weapon
new sprites_wpn[32]
if (g_wpn_type[attacker_wpn]==WEAPONS_DOUBLE && g_double[killer]) format(sprites_wpn, charsmax(sprites_wpn), "%s_2", g_wpn_model[attacker_wpn])
else format(sprites_wpn, charsmax(sprites_wpn), "%s", g_wpn_model[attacker_wpn])
// send deathmsg
set_msg_arg_string(4, sprites_wpn)
//nst_show_deathmsg(killer, victim, headshot, sprites_wpn)
return PLUGIN_CONTINUE
}
return PLUGIN_CONTINUE
//client_print(0, print_chat, "[%i][%i][%i][%s][%i]", killer, victim, headshot, weapon, weaponid)
}
anh sontung đâu rùi , bảo hum nay post code mà![]()
public plugin_init()
{
register_forward(FM_CmdStart, "fw_CmdStart" )
}
// CmdStart
public fw_CmdStart(id, uc_handle, seed)
{
if(!is_user_alive(id))
{
reset_zoom(id)
return;
}
new CURENT_WEAPON = HAS_WEAPON[id]
new CHANGE_WEAPON = g_wpn_change[CURENT_WEAPON]
new szClip, szAmmo
new szWeapID = get_user_weapon( id, szClip, szAmmo )
static buttons
buttons = get_uc(uc_handle, UC_Buttons)
if(szWeapID == CHANGE_WEAPON && CURENT_WEAPON)
{
// Zoom Weapon
new zoom = cvar_zoom[CURENT_WEAPON]
if (g_wpn_type[CURENT_WEAPON]==WEAPONS_DOUBLE)
{
new d_zoom = cvar_d_zoom[CURENT_WEAPON]
if (!g_double[id])
{
if (!zoom) remove_zoom(id, uc_handle)
else create_zoom(id, uc_handle, zoom)
}
else
{
if (!d_zoom) remove_zoom(id, uc_handle)
else create_zoom(id, uc_handle, d_zoom)
}
}
else if (g_wpn_type[CURENT_WEAPON]==WEAPONS_LAUNCHER && g_double[id])
{
remove_zoom(id, uc_handle)
}
else
{
if (!zoom) remove_zoom(id, uc_handle)
else create_zoom(id, uc_handle, zoom)
}
}
}
create_zoom(id, uc_handle, zoom_type)
{
// check sniper weapon
new CURENT_WEAPON = HAS_WEAPON[id]
new CHANGE_WEAPON = g_wpn_change[CURENT_WEAPON]
if (ZOOM_WPN_BS & (1<<CHANGE_WEAPON)) return;
// create zoom
if( ( get_uc( uc_handle, UC_Buttons ) & IN_ATTACK2 ) && !( pev( id, pev_oldbuttons ) & IN_ATTACK2 ) )
{
if(!g_hasZoom[id] == true)
{
g_hasZoom[id] = true
if (zoom_type == 1) cs_set_user_zoom( id, CS_SET_AUGSG552_ZOOM, 0 )
else if (zoom_type == 2) cs_set_user_zoom( id, CS_SET_FIRST_ZOOM, 0 )
client_cmd(id,"spk weapons/zoom")
}
else if (g_hasZoom[id])
{
reset_zoom(id)
}
}
}