Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Valentine qua rồi. Nhưng vẫn có quà để tặng . Author of two plugin is Dias
1. DRAGON CANNON (Resource + SourceCode)
[video=youtube;qzlWSITbPEY]http://www.youtube.com/watch?feature=player_embedded&v=qzlWSITbPEY[/URL][/video]
Name: Dragon Cannon
Version: 1.0
Author: Dias
- Information: A new Powerful weapon from CSO called "Dragon Cannon". Can shoot multi "fire" at a time.
- Cvar:
zp_dcannon_ammo // Default Ammo | Default: 20
zp_firedelay // Fire Delay | Default: 3.5
zp_dmgrandom_start // Random Damage Start from x | Default: 300.0
zp_dmgrandom_end // Random Damage End after x | Default: 500.0
--> In video i use: 300.0 and 2000.0
Download: http://dl.dropbox.com/u/13064809/Share Files/dragon_cannon.zip
[dragon_cannon.zip]
- models
- sound
- sprites
- source code (sma)
2. QuadBarrel (Resource + SourceCode)
[video=youtube;3tZXtqTL5UA]http://www.youtube.com/watch?feature=player_embedded&v=3tZXtqTL5UA[/URL][/video]
Name: Quad Barrel
Type: Weapon
For: Zombie Plague | Team Human
Version: 1.0
Author: Dias
Helper Something about shotgun code: Redplane
1. Information:
- This is a cso hero's weapon. And now is appear in Zombie Plague. Code By Me
2. Usage:
- Press "Left Mouse" to shot one ammo
- Press "Right Mouse" to shot all ammo
3. Cvar:
- zp_qbarrel_default_clip // Default Give and Reloaded Clip | Default: 4
- zp_qbarrel_delay_attack // Delay Time between attack | Default: 0.35 (You shouldn't change this)
- zp_qbarrel_reload_time // Reload Time | Default: 3.0 (You shouldn't change this)
// Note: This is the real damage. Not x of + oh - oh /
- zp_qbarrel_randomdmg_start // Random Damage start from x | Default: 400.0
- zp_qbarrel_randomdmg_end // Random Damage End after x | Default: 600.0
4. Credits:
- Dias | Made Plugin
- RedPlane | Help about Shotgun Code
4. Download:
-> http://dl.dropbox.com/u/13064809/Share Files/zp_extra_quad-barrel.zip
clone của dias? Vậy là s dias?

)
Download HLSDK về mà coi source AI của thằng security ấyMong muốn vẫn đang muốn làm 1 dạng AI dựa trên source hlsdk biết làm nhiều trò như player có thể chơi hoàn hảo ở các mode: classic, dm, zm.

^: CSOnline chơi Zombie ko có bot![]()
Code Reload & Idle cho hội reload từng viên một (in C++):@dias: Trên CF có 2 khẩu rất hay đó là Winchester và Bisley. 1 khẩu là Rifle và 1 khẩu là Pistol nhưng có cách nạp đạn là nhét từng viên đạn vào súng. Khi cần có thể cancel giữa chừng và thực hiện tấn công (như shotgun). Winchester cách đây 1 năm anh đã xây dựng thành công, thì Bisley cũng chả nghĩa lý gì. Làm không?
// m_pPlayer: Current player
void CXM1014::Reload()
{
if( m_pPlayer->m_rgAmmo[ m_iPrimaryAmmoType ] <= 0 /* cs_get_user_bpammo */ || m_iClip == XM1014_MAX_CLIP /* cs_get_weapon_ammo */ )
{
return;
}
if( m_flNextPrimaryAttack /* pdata offset (wpn) */ > UTIL_WeaponTimeBase() /* UTIL_WeaponTimeBase() = 0.0 */ )
{
return;
}
switch( m_fInSpecialReload /* only shotgun has this, so create a new global variables for other wpns */ )
{
case 0 :
{
m_pPlayer->SetAnimation( PLAYER_RELOAD ); // set player sequence
SendWeaponAnim( XM1014_START_RELOAD, UseDecrement() ); // UseDecrement is useless in AMX Mod X
m_fInSpecialReload = 1;
m_pPlayer->m_flNextAttack = UTIL_WeaponTimeBase() + 0.55; // pdata offset (player)
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 0.55; // pdata offset (wpn)
m_flNextPrimaryAttack = UTIL_WeaponTimeBase() + 0.55; // pdata offset (wpn)
m_flNextSecondaryAttack = UTIL_WeaponTimeBase() + 0.55; // pdata offset (wpn)
}
case 1 :
{
if( m_flTimeWeaponIdle; /* pdata offset (wpn) */ > UTIL_WeaponTimeBase() )
{
return;
}
m_fInSpecialReload = 2;
if( RANDOM_LONG( 0, 1 ) )
EMIT_SOUND_DYN( ENT( m_pPlayer->pev ), CHAN_ITEM, "weapons/reload1.wav", 1, ATTN_NORM, 0, 85 + RANDOM_LONG( 0, 0x1f ) ); // use emit_sound or EngFunc_EmitSound
else
EMIT_SOUND_DYN( ENT( m_pPlayer->pev ), CHAN_ITEM, "weapons/reload3.wav", 1, ATTN_NORM, 0, 85 + RANDOM_LONG( 0, 0x1f ) ); // use emit_sound or EngFunc_EmitSound
SendWeaponAnim( XM1014_INSERT, UseDecrement() ); // UseDecrement is useless in AMX Mod X
m_flNextReload = UTIL_WeaponTimeBase() + 0.3; // only shotgun has this, so create a new global variables for other wpns
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 0.3; // pdata offset (wpn)
}
default :
{
m_iClip++; // cs_set_weapon_ammo
m_pPlayer->m_rgAmmo[ m_iPrimaryAmmoType ]--; // cs_set_user_bpammo
m_fInSpecialReload = 1;
// m_pPlayer->ammo_buckshot--; // cs_set_user_bpammo, set above, so don't set it again
}
}
}
void CXM1014::WeaponIdle()
{
// ResetEmptySound(); // can use orpheu
// m_pPlayer->GetAutoaimVector( AUTOAIM_5DEGREES ); // can use orpheu
if( m_flPumpTime && m_flPumpTime < UTIL_WeaponTimeBase() )
{
m_flPumpTime = 0;
}
if( m_flTimeWeaponIdle < UTIL_WeaponTimeBase() )
{
if( m_iClip == 0 && m_fInSpecialReload == 0 && m_pPlayer->m_rgAmmo[ m_iPrimaryAmmoType ] )
{
Reload();
}
else if( m_fInSpecialReload != 0 )
{
if( m_iClip != XM1014_MAX_CLIP && m_pPlayer->m_rgAmmo[ m_iPrimaryAmmoType ] )
{
Reload();
}
else
{
SendWeaponAnim( XM1014_AFTER_RELOAD, UseDecrement() );
m_fInSpecialReload = 0;
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 1.5;
}
}
else
{
SendWeaponAnim( XM1014_IDLE1, UseDecrement() );
}
}
}


Code Reload & Idle cho hội reload từng viên một (in C++):
Chạy các func này trong forward Ham_Weapon_Reload và Ham_Weapon_Idle, nhớ HAM_SUPERCEDE cái forward đi là đcPHP:// m_pPlayer: Current player void CXM1014::Reload() { if( m_pPlayer->m_rgAmmo[ m_iPrimaryAmmoType ] <= 0 /* cs_get_user_bpammo */ || m_iClip == XM1014_MAX_CLIP /* cs_get_weapon_ammo */ ) { return; } if( m_flNextPrimaryAttack /* pdata offset (wpn) */ > UTIL_WeaponTimeBase() /* UTIL_WeaponTimeBase() = 0.0 */ ) { return; } switch( m_fInSpecialReload /* only shotgun has this, so create a new global variables for other wpns */ ) { case 0 : { m_pPlayer->SetAnimation( PLAYER_RELOAD ); // set player sequence SendWeaponAnim( XM1014_START_RELOAD, UseDecrement() ); // UseDecrement is useless in AMX Mod X m_fInSpecialReload = 1; m_pPlayer->m_flNextAttack = UTIL_WeaponTimeBase() + 0.55; // pdata offset (player) m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 0.55; // pdata offset (wpn) m_flNextPrimaryAttack = UTIL_WeaponTimeBase() + 0.55; // pdata offset (wpn) m_flNextSecondaryAttack = UTIL_WeaponTimeBase() + 0.55; // pdata offset (wpn) } case 1 : { if( m_flTimeWeaponIdle; /* pdata offset (wpn) */ > UTIL_WeaponTimeBase() ) { return; } m_fInSpecialReload = 2; if( RANDOM_LONG( 0, 1 ) ) EMIT_SOUND_DYN( ENT( m_pPlayer->pev ), CHAN_ITEM, "weapons/reload1.wav", 1, ATTN_NORM, 0, 85 + RANDOM_LONG( 0, 0x1f ) ); // use emit_sound or EngFunc_EmitSound else EMIT_SOUND_DYN( ENT( m_pPlayer->pev ), CHAN_ITEM, "weapons/reload3.wav", 1, ATTN_NORM, 0, 85 + RANDOM_LONG( 0, 0x1f ) ); // use emit_sound or EngFunc_EmitSound SendWeaponAnim( XM1014_INSERT, UseDecrement() ); // UseDecrement is useless in AMX Mod X m_flNextReload = UTIL_WeaponTimeBase() + 0.3; // only shotgun has this, so create a new global variables for other wpns m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 0.3; // pdata offset (wpn) } default : { m_iClip++; // cs_set_weapon_ammo m_pPlayer->m_rgAmmo[ m_iPrimaryAmmoType ]--; // cs_set_user_bpammo m_fInSpecialReload = 1; // m_pPlayer->ammo_buckshot--; // cs_set_user_bpammo, set above, so don't set it again } } } void CXM1014::WeaponIdle() { // ResetEmptySound(); // can use orpheu // m_pPlayer->GetAutoaimVector( AUTOAIM_5DEGREES ); // can use orpheu if( m_flPumpTime && m_flPumpTime < UTIL_WeaponTimeBase() ) { m_flPumpTime = 0; } if( m_flTimeWeaponIdle < UTIL_WeaponTimeBase() ) { if( m_iClip == 0 && m_fInSpecialReload == 0 && m_pPlayer->m_rgAmmo[ m_iPrimaryAmmoType ] ) { Reload(); } else if( m_fInSpecialReload != 0 ) { if( m_iClip != XM1014_MAX_CLIP && m_pPlayer->m_rgAmmo[ m_iPrimaryAmmoType ] ) { Reload(); } else { SendWeaponAnim( XM1014_AFTER_RELOAD, UseDecrement() ); m_fInSpecialReload = 0; m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 1.5; } } else { SendWeaponAnim( XM1014_IDLE1, UseDecrement() ); } } }
Độ chiều có khi convert ra code AMX luôn nhỉ![]()
Đây ko hề ngồi phán nhé[SPOIL]
[/SPOIL]
Xem ra chú thích ngồi mà phán nhỉ. Cái reload đó là của Shotgun. Còn của Rifle nó khác xa hoàn toàn. Chú ngồi làm thử khẩu Winchester đi, rồi sẽ thấy. Ha ha, ngồi đó mà lý thuyết. Khẩu Winchester anh đã từng thử xây dựng trên nền code nạp đạn đó nhưng không hiệu quả, nên đã tự làm code hoàn toàn mới

đây test rồi

Có bác nào rảnh viết file SMA về cái vụ lưu số giết, chết, teamkill vào một file dạng INI cái
Ví dụ như là:
[Tên người chơi]
kill= số giết
death= số chết
teamkill= số lần giết đồng đội
win= số lần thắng
lose= số lần thua
Giúp em với !!!!!!!
Bác nào làm thì nhớ PM qua Y!H của em: whitered183
Xin trân trọng cám ơn !
---------- Post added at 16:10 ---------- Previous post was at 16:07 ----------
à quên
File đó tên là UserInfo.ini
Lưu ở đâu cũng được
Nếu lưu ở trong thư mục Program Files\Common Files\Sefaulting\
Hoặc trong thư mục game CS
Thì càng hay.
Thanks again who will do it !!

Có bác nào rảnh viết file SMA về cái vụ lưu số giết, chết, teamkill vào một file dạng INI cái
Ví dụ như là:
[Tên người chơi]
kill= số giết
death= số chết
teamkill= số lần giết đồng đội
win= số lần thắng
lose= số lần thua
Giúp em với !!!!!!!
Bác nào làm thì nhớ PM qua Y!H của em: whitered183
Xin trân trọng cám ơn !
---------- Post added at 16:10 ---------- Previous post was at 16:07 ----------
à quên
File đó tên là UserInfo.ini
Lưu ở đâu cũng được
Nếu lưu ở trong thư mục Program Files\Common Files\Sefaulting\
Hoặc trong thư mục game CS
Thì càng hay.
Thanks again who will do it !!
/* Script generated by Pawn Studio */
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#define PLUGIN "Unknow"
#define AUTHOR "Bui Duc Duy"
#define VERSION "1.0"
enum
{
name = 0,
kill,
death,
teamkill,
win,
lose,
}
new T_score, CT_score
new PlayerName[64], SaveFile[64] ,tempname[64]
new kills[33], deaths[33], teamkills[33], teamwin[33], teamlose[33]
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
register_event("DeathMsg", "event_DeathMsg", "a")
register_message(get_user_msgid("TextMsg"), "message_textmsg")
set_task(2.0, "write_data", _,_,_,"b")
}
public write_data()
{
for (new id = 1; id <33 ;id++)
{
if (!is_user_connected(id)) return
get_user_name(id, PlayerName,63)
format(SaveFile,63,"addons/Data/%s.ini",PlayerName)
write_info_player(id)
format(tempname,63,"[%s]",PlayerName)
write_file(SaveFile,tempname,name)
write_file(SaveFile,kills[id],kill)
write_file(SaveFile,deaths[id],death)
write_file(SaveFile,teamwin[id],win)
write_file(SaveFile,teamlose[id],lose)
write_file(SaveFile,teamkills[id],teamkill)
}
}
write_info_player(id)
{
deaths[id] = get_user_deaths(id)
if (cs_get_user_team(id)==CS_TEAM_T)
{
teamwin[id] = T_score
teamlose[id] = CT_score
}
else
{
teamwin[id] = CT_score
teamlose[id] = T_score
}
}
public event_DeathMsg()
{
new victim, killer
killer = read_data(1)
victim = read_data(2)
if (killer != victim)
{
if (cs_get_user_team(killer) == cs_get_user_team(victim)) teamkills[killer] ++
else kills[killer] ++
}
}
public message_textmsg()
{
static textmsg[22]
get_msg_arg_string(2, textmsg, 21)
//Terrorist Win
if (equal(textmsg, "#Terrorists_Win"))
{
T_score ++
return PLUGIN_HANDLED
}
//CT Win
if (equal(textmsg, "#CTs_Win"))
{
CT_score ++
return PLUGIN_HANDLED
}
return PLUGIN_CONTINUE
}
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <engine>
#include <fakemeta>
#include <xs>
#define PLUGIN "Dias's Rocket Launcher"
#define VERSION "1.0"
#define AUTHOR "Dias Leon"
new const Float:g_Origin[3], Float:g_Angles[3]
new const rocketlauncher_model[] = "models/player/gign/gign.mdl"
new const rocket_model[] = "models/dron_missile.mdl"
new g_ent
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
register_clcmd("say /get_origin", "get_origin")
register_clcmd("say /make", "make_rocketlauncher")
register_clcmd("say /launch", "launch_rocket")
}
public plugin_precache()
{
engfunc(EngFunc_PrecacheModel, rocketlauncher_model)
engfunc(EngFunc_PrecacheModel, rocket_model)
}
public get_origin(id)
{
pev(id, pev_origin, g_Origin)
pev(id, pev_angles, g_Angles)
}
public make_rocketlauncher(id)
{
new ent = create_entity("info_target")
g_ent = ent
entity_set_origin(ent, g_Origin)
entity_set_vector(ent, EV_VEC_angles, g_Angles)
entity_set_string(ent, EV_SZ_classname, "rocketlauncher")
entity_set_model(ent, rocketlauncher_model)
entity_set_int(ent, EV_INT_solid, SOLID_SLIDEBOX)
entity_set_int(ent, EV_INT_movetype, MOVETYPE_NONE)
new Float:maxs[3] = {16.0,16.0,36.0}
new Float:mins[3] = {-16.0,-16.0,-36.0}
entity_set_size(ent, mins, maxs)
entity_set_float(ent, EV_FL_animtime, get_gametime())
entity_set_float(ent, EV_FL_framerate, 1.0)
entity_set_int(ent, EV_INT_sequence, 0)
drop_to_floor(ent)
}
public launch_rocket(id)
{
static launcher
launcher = g_ent
static ent
ent = create_entity("info_target")
static Float:Origin[3], Float:Angles[3]
engfunc(EngFunc_GetAttachment, launcher, 0, Origin, Angles)
pev(launcher, pev_angles, Angles)
entity_set_origin(ent, Origin)
entity_set_vector(ent, EV_VEC_angles, Angles)
entity_set_string(ent, EV_SZ_classname, "rocket")
entity_set_model(ent, rocket_model)
entity_set_int(ent, EV_INT_solid, SOLID_SLIDEBOX)
entity_set_int(ent, EV_INT_movetype, MOVETYPE_NONE)
new Float:maxs[3] = {16.0,16.0,36.0}
new Float:mins[3] = {-16.0,-16.0,-36.0}
entity_set_size(ent, mins, maxs)
entity_set_float(ent, EV_FL_animtime, get_gametime())
entity_set_float(ent, EV_FL_framerate, 1.0)
entity_set_int(ent, EV_INT_sequence, 0)
engfunc(EngFunc_MakeVectors, Angles)
set_pev(ent, pev_velocity, Angles)
}