[AMX] Tổng hợp Code, Plug do Mem chế hoặc giới thiệu

  • Thread starter Thread starter Orpheus
  • Ngày gửi Ngày gửi
^
- Chưa xem code chưa thể nói là nhờ người giúp. Giờ cho mi xem code nếu mi coi ko có ai giúp mi sẽ là con... nhé :-?. Đảm bảo xem code là mi biết ngay có ai giúp hay ko giúp liền :}}
Post trên có ghi HC giúp kìa.
 
@kung: ok, thanks nhé
P/S: Ai có toàn bộ danh sách cvar của metahook thì gửi mình nhé.
 
@HC:
- e đùa thôi =)). thằng KFL nó tin thật kìa :))

@nthhieu100:
- Nhìn có vẻ khó phân biệt lắm phải ko :))
 
Chỉnh sửa cuối:
Em muốn làm code thế này:
+Xác định NewRound => hiện spr 1 => ẩn spr
+Xác định RounEnd =. hiện spr 2 => ản spr

ai bik mấy cái code này hướng dẫn giùm em.

---------- Post added at 22:00 ---------- Previous post was at 21:59 ----------

P/S: Đang học code dù ai chữi mình ngu thì chịu:( Vì thật ra mình rất ngu:))
 
Em muốn làm code thế này:
+Xác định NewRound => hiện spr 1 => ẩn spr
+Xác định RounEnd =. hiện spr 2 => ản spr

ai bik mấy cái code này hướng dẫn giùm em.

---------- Post added at 22:00 ---------- Previous post was at 21:59 ----------

P/S: Đang học code dù ai chữi mình ngu thì chịu:( Vì thật ra mình rất ngu:))

Nêu đúng mục đích như vậy thì dễ dàng giải quyết thôi ! Ko khó đâu !
@Kingler: Có bài thực tập nè ! Nhào vô đi!
 
Excuse me, but how to unprecache firing sounds? I tried asking in AlliedModders but nobody is answering my request, may I have an answer here?
 
Excuse me, but how to unprecache firing sounds? I tried asking in AlliedModders but nobody is answering my request, may I have an answer here?

Prevent .sc file from being precached. But the crosshair will NOT be enlarged when you shoot. I wish someone could edit the .sc file. Firing sound is in there
 
Nêu đúng mục đích như vậy thì dễ dàng giải quyết thôi ! Ko khó đâu !
@Kingler: Có bài thực tập nè ! Nhào vô đi!

Ơ bác kêu người thực tập vào làm chứ không phải hd code cho em àk.

---------- Post added at 23:48 ---------- Previous post was at 23:37 ----------

Hướng dẫn em cái cách hiện sprite đi.
 
Prevent .sc file from being precached. But the crosshair will NOT be enlarged when you shoot. I wish someone could edit the .sc file. Firing sound is in there
No, the firing sound is played by client.dll, not *.sc. *.sc files just do the synchonization between client and server when PLAYBACK_EVENT_FULL is being called. So, *.sc files is useless at the moment.
From hl_events.cpp (HLSDK):

/*
======================
Game_HookEvents

Associate script file name with callback functions. Callback's must be extern "C" so
the engine doesn't get confused about name mangling stuff. Note that the format is
always the same. Of course, a clever mod team could actually embed parameters, behavior
into the actual .sc files and create a .sc file parser and hook their functionality through
that.. i.e., a scripting system.

That was what we were going to do, but we ran out of time...oh well.

======================
*/
Actually, Valve wasn't make script system for *.sc files.
 
Chỉnh sửa cuối:
Ơ bác kêu người thực tập vào làm chứ không phải hd code cho em àk.

---------- Post added at 23:48 ---------- Previous post was at 23:37 ----------

Hướng dẫn em cái cách hiện sprite đi.

Bạn cứ đùa.... bác ấy đang bù đầu code CSCFE... Đến King_ler (người nhà) còn phải tự học nữa là...........


P/S: Sau 1 thời gian code mình thấy ngày xưa mình thật là "chuối".... =)) (Hơi tí là bê lên hỏi :)) )


---------- Post added at 08:00 ---------- Previous post was at 07:53 ----------

Tiện thì giúp bạn luôn

PHP:
message_begin(MSG_ONE, get_user_msgid("StatusIcon"), {0,0,0}, id);
write_byte(status); // status (0=hide, 1=show, 2=flash)
write_string(sprite_name); // sprite name -> In hud.txt
write_byte(red)
write_byte(green)
write_byte(blue)
message_end();
 
Chỉnh sửa cuối:
Bạn cứ đùa.... bác ấy đang bù đầu code CSCFE... Đến King_ler (người nhà) còn phải tự học nữa là...........


P/S: Sau 1 thời gian code mình thấy ngày xưa mình thật là "chuối".... =)) (Hơi tí là bê lên hỏi :)) )


---------- Post added at 08:00 ---------- Previous post was at 07:53 ----------

Tiện thì giúp bạn luôn

PHP:
message_begin(MSG_ONE, get_user_msgid("StatusIcon"), {0,0,0}, id);
write_byte(status); // status (0=hide, 1=show, 2=flash)
write_string(sprite_name); // sprite name -> In hud.txt
write_byte(red)
write_byte(green)
write_byte(blue)
message_end();
Biết cảm giác của người mới mà, nên chíu cố giùm nha! Thanks
 
bác nào sửa đc cái knockback của CSO-NST beta3 ko nhỉ :-? xài Qbarrel mà knockback toàn sang ngang :|
ko biết lỗi đó là ở cái plugin nào nhỉ?
 
Could show an example with PLAYBACK_EVENT_FULL method, please?
Server side call PLAYBACK_EVENT_FULL --> Send param to client --> client.dll hook event thru *.sc file (sc file is just a stub for client to hook event) --> Hook function in client.dll will paint decals, play shoot anim, play shoot sound, bloom the crosshair... with param from PLAYBACK_EVENT_FULL
In Amx Mod X, PLAYBACK_EVENT_FULL replaced with
PHP:
playback_event ( flags, invoker, eventindex, Float:delat, Float:origin[3], Float:angles[3], Float:fparam1, Float:fparam2, iparam1, iparam2, bparam1, bparam2 )
Example of using it:
new g_iEventM4A1
new const g_vecZero[3] = {0.0, 0.0, 0.0}

public plugin_precache()
{
precache_event(1, "events/m4a1.sc") // Precache *.sc file just to get event id.​
}

// Hook Ham_TraceAttack
public fw_traceatt(victim, id, Float:fdamage, Float:vdirection[3], trace, bits)
{
// Taken from wpn_m4a1.cpp (CSSDK)
// After call playback_event, client will bloom crosshair, play shoot sound, shoot anim, paint decals
// The weaponent is player weapon entity (not index). More info: http://forums.alliedmods.net/showpost.php?p=776378&postcount=2
// See HLSDK / CSSDK for more examples.
static Float:fPunchAngle[3]
pev(id, pev_punchangle, fPunchAngle)
playback_event ( FEV_NOTHOST, id, g_iEventM4A1, 0.0, g_vecZero, g_vecZero, vdirection[0], vdirection[1], floatround(fPunchAngle[0])*100, cs_get_weapon_silenced(weaponent), false, false )​
}
 
Chỉnh sửa cuối:
Tình hình là khi giết chết 1 con bot thì nó hiện ra như thế này, không hiểu sao nó lại hiện ra cái spr đó, tui xài bản cs v40 dz chưa chỉnh sửa gì hết.

dedust0000hko.png
 
^
Không dc, tui xài bản 3.0, nó đổi cvar hết rồi.
 
Tình hình là khi giết chết 1 con bot thì nó hiện ra như thế này, không hiểu sao nó lại hiện ra cái spr đó, tui xài bản cs v40 dz chưa chỉnh sửa gì hết.

dedust0000hko.png

Thiếu spr chứ sao nữa... MH bắt buộc phải dùng 1 số spr ! ko có thì nó sẽ thế :))
 
Back
Top