Counter - Strike Raid Attack V1

Một bản mod của nhóm SKIN COUNTER - STRIKE

CS - AVA ( Alliance of Valiant Arms )

Bản Mod được phát triển bởi AVG4 theo hướng AVA

CSFIRED

CSFIRED một thể loại game bắn súng offline được mod theo hướng CrossFire (Đột kích) với hình ảnh sắc nét, âm thanh sống động tạo cho người chơi cảm giác như mình đang sống trong thế giới ảo

Counter Strike he Magic Athletics CD 1.0.0.2

Game do Trung Quốc làm. Dựa trên nền tảng Compete King.

Counter Strike CE

Game do Trung Quốc làm. Đang rất hot trên Group SKIN COUNTER - STRIKE

Counter-Strike NTN 2014

Counter-Strike NTN là một bản mod của Counter-Strike 1.6 huyền thoại, được mod lại với mục đích cải thiện chất lượng đồ họa và âm thanh cũng như hệ thống vũ khí Counter-Strike 1.6 với đặc điểm nổi bật.

Showing posts with label TUT. Show all posts
Showing posts with label TUT. Show all posts

Wednesday, February 22, 2017

Metahook Plus Coding - M1

Metahook Plus Coding - M1



Thấy nhiều bạn vẫn còn mặn mà với Counter-Strike 1.6 nên hôm nay mình sẽ viết hướng dẫn các bạn làm quen với Metahook Plus. 

Friday, January 30, 2015

[AMXX Tutorial] Bài 1 - "Hello Word"

Hôm nay mình sẽ hướng dẫn các bạn viết plugin đầu tiên của mình. Plugin có tên Hello Word.
Vì máy mình không có CS và lâu rồi cũng không viết AMXX lại nên nếu bạn chạy plugin phát sinh lỗi thì cứ cmnt ở dưới. Mình sẽ giúp. Bản thân mình cũng chỉ là newbie nên không thể biết hết được. Nào chúng ta cùng bắt đầu viết plugin thôi.


Mình thường dùng AMXX Studio để code. Ngoài ra nếu không thích thì bạn có thể sử dụng nhiều trình code khác cũng được. Tải AMXX Studio về tại đây.
Mình sẽ giải thích từng câu lệnh cho các bạn hiểu. Các chương trình sau này nếu gặp lại câu lệnh tương tự thì mình sẽ không giải thích lại nữa.

Khi mở chương trình lên thì sẽ có giao diện như sau. Mình sẽ tập trung chủ yếu vào phần code mà không nói đến các chức năng của Phần mềm.



Ý nghĩa cũa những câu lệnh trên như sau:


#include <amxmodx>

#include <amxmisc>
       >>Khai báo 2 thư viện chuẩn của amxx là amxmodx amxmisc . Hai thư viện này chứa những hàm chuẩn trong amxx.

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

#define AUTHOR "author"
       >> "New Plug-In" là tên của plugin của bạn. Có thể thay đổi theo ý thích. Ở đây mình sẽ đổi thành "Hello Word"       >>  "1.0" là phiên bản hiện tại của plugin thay đổi theo ý thích. Mình vẫn đẻ là 1.0       >> "author" là tên của người viết plugin. Ở đây mình đổi thành "Thai Nhat Minh"
Tiếp theo là đến hàm public plugin_init() {} . Đây là một hàm cực kỳ quan trọng của AMXX. Tất cả những đăng ký sự kiện, hook,... đều đăng ký ở đây.

register_plugin(PLUGIN, VERSION, AUTHOR)
       >>  đây là một hàm để đăng ký plugin của bạn. Bạn có thể bỏ đi cũng được không sao( Theo mình nhớ là vậy). :v

Tiếp theo bạn xóa dòng // Add your code here... Và thay bằng dòng register_clcmd("My_Plugin","cmd_hello"). 
       >> Hàm register_clcmd() dùng để đăng ký một lệnh console ở client. Máy chủ sẽ không có lệnh này. Hàm này có hai tham số. Tham số đầu tiên là tên của lệnh. Khi vào console gõ dòng này thì nó sẽ hiện lên giống như khi bạn gõ các câu lệnh khác như sv_gravity, hud_draw,....Tham số thứ hai là tên của hàm sẽ được gọi trong plugin này. Khi bạn vào console gõ My_Plugin rồi Enter thì hàm cmd_hello sễ được gọi. Đến đây thì bạn có thể sẽ thắc mắc là cmd_hello ở đâu ra? Đọc phần tiếp theo thì bạn sẽ hiểu ra ngay thôi.
Đến dòng thứ 16 và viết thêm đoạn code này vào.
public cmd_hello(id)

{
             client_print(id,print_console,"Hello Word")
}




Tuesday, December 23, 2014

TUT MOD SKIN CS1.6 Phần 2

II. Hướng dẫn sử dụng Milk Shape 3D 
* Tổng quát: 
Hiện nay thì Milk Shape 3D (ms3d) là thông dụng nhất, các skinner hiện tại theo tôi biết thì đa phần dùng tool này vì dễ sử dụng, nhẹ, tiện lợi. Ngoài ra có thể dùng 3DS Max, soft này chuyên nghiệp hơn ms3d nhiều, rất thuận lợi cho việc mod nhưng lại khá khó cho newbie và còn nặng, cấu hình cao. Nếu sau này bạn theo nghiệp model, làm cho các công ty hay làm phim 3d thì chắc chắn phải dùng soft này hoặc cao hơn chứ “bình sữa” nhà ta khó lòng kham nổi   
* Hướng dẫn sử dụng: 
-Chọn 1 vertex: 
Ở tab Model chọn Select, trong phần Select Options chọn Vertex 

Khi đó trong 3 ô màu xám to to trên màn hình ta chỉ việc kéo thả chuột là được (không thể chọn ở phần màu xanh vì đó là chỗ ta xem model trong trạng thái 3d) phần được chọn là những phần trong ô chữ nhật màu trắng 
-Ví dụ: 


-Chọn Face: 
Khác với vertex, chọn face là chọn 1 khu vực tam giác (khái niệm face đã được đề cập ở trên), để chọn face ta làm như với vertex nhưn ở phần Select Options phải tick vào Face 
Lựa chọn face có ưu điểm là nhanh và dễ dành hơn vertex và khi cắt đôi model sẽ không mấy mesh bù lại vertex sẽ có thể chọn chi tiết hơn face nên tuỳ tình huống sử dụng từng cách cho phù hợp. 

Sau khi select được 1 hay nhiều vertex/face ta có thể tuỳ ý di chuyển, xoay, phóng to/thu nhỏ tuỳ ý bằng các nút chức năng Move; Rotate; Scale 
Thường thì khi dùng các chức năng này bạn nên dùng bằng chuột nhưng khi làm các công việc đòi hỏi độ chính xác cao thì nên dùng các thông số ở mục Move/Scale/Rotate Options. Khi sử dụng cần chú ý, 1 vật trong ms3d được xác định bởi toạ độ x,y và z. x và z để xác định toạ độ trên mặt phẳng, y là chiều cao (học toán chắc biết cái này chứ) 
-Ví dụ về sử dụng toạ độ: 

-Sủ dụng tab Grounps: 
Ví dụ nhé, tôi có 1 mesh đơn giản như hình 

Nhìn qua các bạn có thể biết được ngay gồm 1 hình hộp chữ nhật và 1 khối trụ, muốn tách 2 khối này ra thì làm như phần trên bạn hoàn toàn có thể làm được nhưng bạn có nghĩ nếu tách mesh này thành 2 phần để có thể di chuyển từng khối tuỳ ý thì sao nhỉ. Ms3d cho phép ta làm việc này bằn tab Groups. Nếu với mesh trên kia chuyển qua tab Groups sẽ có dạng sau: 

Box01 là tên hình hộp nằm ở dưới, Cylinder01 là khối trụ ở trên còn là do chưa có texture cho nó. Có thể bạn đang thử mò cách làm như trong hình nhưng thực ra thì không cần thiết đâu, phần này chỉ xem cho biết chứ không cần thực hành (nhưng mà chớ bỏ nhá, không lý thuyết thì đừng có mơ thực hành đc) Trở lại bài học, bây giờ chỉ việc nháy đúp vào tên mối group là nó sẽ tụe động chọn cho mình ví dụ khi tôi chọn Box01 thì nghiễn nhiên là đã chọn hình hộp 

Sử dụng tab Groups cũng khá đơn giản, chỉ cần vốn eng kha khá là bạn có thể sử dụng, đoạn này không cần chỉ nhiều vì khá dễ và không mấy quan trọng.
-Tab Materials 
Không mấy khác tab Groups, chỉ có điều tab Materials dùng để quản lý texture, để tạo 1 material mới, chọn New, đổi tên material không khác gì Group và Joint nên bạn có thể tự làm được. Để import texture vào material chọn phần   

Chọn đường dẫn đến texture là được. 
*Chỉnh sửa texture đơn giản: 
Chọn Window/Texture Coordinate Editor hoặc nhấn tổ hợp phím CTRL+T 
Ví dụ để chỉnh texture cho Group Barrett.bmp, ta chọn Group rồi nhấn CTRL+T 

Hộp thoại Texture Coordinate Editor sẽ hiện ra và sử dụng thì cũng chả khác mấy tab Model, tự tìm hiểu nhá    

-Tab Joints: Sẽ đề cập trong phần dựng bone 

Vậy là bạn đã biết sử dụng cơ bản ms3d rồi đấy, nên kết thúc buổi học tại đây, đi nghỉ đi nhá.

TUT MOD SKIN CS1.6 Phần 1

Lời nói đầu

Chào các bạn newbie (ông nào biết r đọc tut này cũng gọi là newbie ) hôm nay tôi viết tut này để hướng dẫn bạn về việc mod skin của game Counter Strike, lĩnh vực này không mới nhưng vẫn còn khá xa lạ với hầu hết những player (kể cả gamer) cs nói riêng và thể loại game fps nói chung.

Tutorial này không kén người đọc, chỉ cần bạn tập trung chú ý và xác định sẽ bỏ 1 lượng khá lớn thới gian chứ đừng bỏ lửng giửa chừng là hoàn toàn có thể thành công.
Và xin nói luôn, tôi học xã hội, không phải người chuyên lập trình hay người sành về đồ hoạ nên có 1 số khái niệm tôi nêu ra chưa chắc đã đúng với các khái niệm chính quy về đồ hoạ 3d nhưng xin đảm bảo rằng, nếu bạn thực sự muốn, chăm chỉ học và có 1 niềm đam mê với cs và mod thì chắc chắn bạn sẽ thành công

P/S: Nếu trong khi đọc có gì khó hiểu, bạn cứ pm thẳng vào nick vn-z của tôi hoặc liên lạc theo thông tin ở dưới chữ kí, tôi sẽ cố gắng giúp bạn trong thới gian sớm nhất có thể



I. Định nghĩa 

1. Skin là gì? 
- Skin là công cụ để thể hiện một cách trực quan các vật thể trong game. Nghĩa là skin sẽ cho bạn nhìn thấy các vật thể trong game có hình dạng như thế nào, biểu hiện và màu sắc ra sao… cụm từ “các vật thể” tôi dùng, đối với game Counter Strike có thể hiểu là: các nhân vật, vũ khí (ngoài ra còn có một số vật thể khác trong game như bụi cây, con gà map Italy, cũng như nhiều vật thể khác mà những người tạo map cho Counter Strike muốn đặt trong game) 

- Đối với các game 3D, trong đó có CS thì skin được xây dựng từ các model hoàn chỉnh, animate và một số yếu tố khác.. để thể hiện đầy đủ các mặt của 1 vật thể như: hình dạng, màu sắc-họa tiết, chuyển động. (model, texture và animate sẽ được nói ở dưới) 


- Cần chú ý rằng rất nhiều người (và trong nhiều game) thuật ngữ “Model” được sử dụng giống như khái niệm skin mà tôi nói ở trên. Đôi khi người ta dùng lẫn lộn cả 2. Tuy nhiên, để thống nhất và dễ phân biệt, trong bài viết này tôi sẽ đặt khái niệm skin và model khác nhau một chút (để anh em khi thảo luận cùng nhau thì không bị lẫn lộn, hiểu nhầm) 


-Những thành phần cơ bản của skin trong game CS bao gồm: (hay nói cách khác là tập hợp hoàn chỉnh của những nhân tố nêu phía dưới sẽ tạo thành một skin) 

Skin = Model + Bone + Animate + một số thứ khác 

Tôi sẽ trình bày về từng nhân tố cấu thành skin. Các bạn theo dõi từng mục và hiểu nó ở đâu nhé.


1. Model (Mô hình) 

Model thể hiện hình khối và màu sắc của vật thể. Model thường được hiểu là sự kết hợp của mesh và texture. Các mesh thể hiện hình khối, texture thể hiện màu sắc, họa tiết. Để các bạn dễ hiểu, tôi sẽ trình bày những yếu tố hợp thành model theo trật tự: từ phần tử nhỏ nhất đến các phần tử lớn hơn. Hãy tưởng tượng rằng các bạn đang học hình học (hình học phẳng và hình học không gian), các bạn sẽ thấy những vấn đề về model vô cùng dễ hiểu. 

* Vertex (Điểm): Đơn vị cơ bản nhất cấu tạo nên các mô hình 3D. Khi đụng tới Vertex (điểm) nghĩa là bạn đã đụng tới thành phần cấu tạo nhỏ nhất của 1 model.  

Xem hình 1, chúng ta sẽ thấy là các ĐIỂM (vertex) là điểm giao nối của những các đoạn thẳng đỏ. Chúng sẽ giúp xác định đỉnh của đa giác (tam giác) mà chúng ta sẽ nói ở phần ngay sau đây:

* Face (Mặt/Bề mặt): Đối với face, các bạn nêu hiểu với nghĩa là "bề mặt" để rạch ròi. Face thể hiện bề mặt của các vật thể. Để hiểu về face, các bạn nên biết 2 vấn đề: 


- VĐ1:Cái gì cấu tạo nên face (bề mặt)? Đó chính là các vertex (điểm). Trong các mô hình 3D, 1 face được cấu thành bởi 3 vertex. Tại sao 3? Rất đơn giản: bạn nào đã học hình không gian đều biết với 3 điểm phân biệt ta xác định được 1 mặt phẳng. Tuy nhiên, cần nhấn mạnh ở đây là face chúng ta đang bàn là bề mặt chứ không phải mặt phẳng. Do vậy, face sẽ chỉ giới hạn bởi tam giác do 3 đỉnh (vertex) tạo thành. 

Nhìn vào hình 1, nếu bạn thấy bất cứ một hình tam giác nào thì đó chính là 1 face. 

- VĐ2: xác định face để làm gì? Trả lời: xác định face để xác định các bề mặt của vật thể. Tập hợp các bề mặt sẽ tạo nên hình khổi của vật thể. Nói cách khác là các face sẽ cấu tạo nên hình khối vật thể (mesh) 


* Mesh (Mạng): Tập hợp các face tạo thành mesh. Nhìn vào hình 1, các bạn có thể thấy rất rõ là một hình khối được cấu tạo bởi một mạng lưới các vertex và face. Nhiều face được lắp ghép với nhau tạo ra bề mặt hoàn chỉnh của vật thể.  

-Các bạn có thể thắc mắc: nếu các bể mặt đều là phẳng, và là các hình tam giác, như vậy làm sao để tạo ra những bề mặt cong? Câu trả lời là những bề mặt cong sẽ được tạo nên bởi nhiều (hoặc rất nhiều) các face - các bề mặt phẳng và có hình tam giác. Hãy nhìn vào khối trụ và khối cầu trong hình 1. Mặt khối trụ, đặc biệt là khối cầu được tạo nên bởi rất nhiều face (nhỏ), và tạo nên cảm giác cong rất mượt ("smooth"). Do đó, với những hình khối toàn mặt phẳng thì không cần bàn làm gì; còn đối với các hình khối có bề mặt cong (ví dụ: khối cầu, model người...) thì lý do ở trên sẽ dẫn đến: model càng được tạo bởi nhiều face (~ vertex) thì độ cong càng có vẻ mượt mà (smooth). 
-Các mesh sẽ cấu thành nên model. Ở đây, đôi khi sẽ có sự trùng lặp giữa mesh và model. Ví dụ, tôi có thể coi khối lập phương là một mesh, cũng có thể coi nó là một model. Nhưng tôi cũng có thể coi model bao gồm cả khối lập phương, khối trụ và khối cầu – 1 model với các mesh khác nhau. 

* Texture (họa tiết): Như cái tên của nó, texture xác định họa tiết trên bề mặt của vật thể. Hãy nhìn hình 1, các hình khối phía sau là khi tôi chưa gán texture cho nó, còn những hình phía trước đã được ráp texture. 

Khi chưa có texture, mô hình mới chỉ có hình khối, nhưng bề mặt hình khối đó lại không có màu sắc gì (nói thẳng ra vô hình) - ở hình trên, các khối ở phía sau thực ra không có màu sắc và ta không thể nhìn thấy được, màu trắng xám của nó chỉ là do phần mềm Milkshape 3D gán vào để chúng ta dễ dàng thao tác thôi ^^. 

Tóm lại, trong phần 1 này, các bạn chỉ cần nhớ rằng: 

Model = hình khối (thực ra là bề mặt hình khối - mesh, face, vertex) + họa tiết (texture). 
2. Bone 
-Bone là hệ thống các Joint (tạm dịch là khớp) liên kết với Model 
(đã giải thích ở phần trên), Bone giúp định hình skin và là bộ khung để làm animate (sẽ đề cập ở phần sau). 
3. Animation 
-Là các chuyển động của skin trong game. Có thể nói anim là linh hồn của skin. 
-Anim được chia thành các frame, mỗi frame là một đoạn hiển thị ngắn chuyển động của bone đã được liên kết với model, giống như hoạt hình ( animation nghĩa là hoạt hình mà ). 
Độ nhanh hay chậm của anim phụ thuộc vào 2 yếu tố: 
+Độ dài của frame. Càng nhiều frame, tốc đọ của anim càng chậm (dung lượng skin cũng tăng lên) nhưng bù lại, có thể làm anim chi tiết hơn. 
+Đọ lớn của FPS, ngược lại với frame, chỉ số fps càng lớn, anim chuyển động càng nhanh. Ở đây có thể hiểu FPS là chỉ số hiển thì frame. 
2. Một số vấn đề về mod skin CS1.6 
1. Compile và decompile 
-Compile (biên soạn): từ những thứ có sẵn (Reference, Sequence, Texture, QC file) nén lại (bằng ms3d hoặc ...) và thành quả là skin (MDL file) 
-Decompile (dịch ngược): như ý nghĩa decompile là làm từ skin thành các thành phần cấu tạo lên nó. 
*Chú ý: Khi compile skin cần loại bỏ dòng $texrendermode trong qc file, không lúc báo lỗi lại kêu =.= 
hoặc cũng có thể compile = hlmv, cách này khá ổn, hỗ trợ $texrendermode và texture lên đến 1024 (nhưng khi cho vào game lại lỗi, chả biết mọi người có bị không) nhược điểm là khi compile không thành công nó sẽ chả báo lỗi gì cả nên nhiều lúc chả biết lỗi ở đâu mà sửa 
Để compile thành công, phải đảm bảo skin có đầy đủ bone, anim, text,... 
2.Origin: tạm dịch là góc nhìn, origin cũng là 1 phần không thể thiếu của skin, khi mod phải chú ý origin của skin phải tránh không được để lộ phần mesh thiếu của skin, không đi xuyên qua skin. 
3.Attachment: là những điểm xác định tia lửa khi khai hoả, vị trí của nơi xả vỏ đạn. Att lấy 1 Joint của bone làm góc và được xác định theo toạ độ X,Y,Z. 

1 số phần trong này đọc cho biết thôi chứ chưa cần đến. 


Thursday, October 16, 2014

Hướng Dẫn MOD Counter Strike 1.6


Khi các bạn đọc bài viết này thì chắc hẳn rằng ai cũng đã từng chơi qua các bản mod CS như CSFIRED, CSLC, CK, CKVN, CSCFE, CSO-NST, CSBTE, ... và rất nhiều bản mod khác.

Và câu hỏi đặt ra là làm thế nào mà những team mod có thể biến CS1.6 thành như vậy được? Hôm nay mình sẽ giúp các bạn giải đáp những thắc mắc đó.

.:. Phần Một - Download .:.

Đầu tiên trước khi mod CS thì phải có một bản nền để mà mod. Thông thường các Team lớn thì dùng bản mặc định là CS1.6 để mod nhưng nếu bạn là người mới thì có thể dùng các bản mod có sẵn như mình đã giới thiệu ở trên để tập mod. Sau này thành Pro rồi thì CS1.6 hay CS1.1 thì các bạn vẫn có thể biết cách làm.
Đây là hai bản mình thường dùng để mod. Đưa link cho các bạn tham khảo.


  1. Counter-StrikeCataclysm
  2. Counter-Strike --- WaRzOnE
Link một số bản mod khác cho các bạn về mổ xẻ.

  1. CSFIRED
  2. CSLC
  3. Compete King 
  4. CSCFE
  5. CSO-NST
  6. .........more and more
.:. Phần Hai - Cấu Trúc Thư Mục .:.
Trong thư mục gốc của CS cơ bản gồm những thứ như sau. Của bạn có thể nhiều hơn hoặc ít hơn tùy vào bản MOD
Thư mục chúng ta sẽ mod là "cstrike". Trong thư mục này gồm những thành phần sau 
  • Thư mục addon. Đây là thư mục chứa các plugin của AMX MOD X. Cũng là nơi mà đa số các bản mod chứa thông tin ở đây.
  • Thư Mục classes. Đây là thư mục chứa các thông tin khi mua súng. (Nhấn nút B). Khi đến phần UI thì mình sẽ nói rõ hơn cái này.



Wednesday, June 11, 2014

Acfun Guard

Following are some natives and forwards in acg.inc:

acg_userstatus

Function: Get a player's status(if he is using xPhere or not)
Parma(s): (1)
- id: Target player ID
Return (2, byte)
- 1: The player is using xPhere
- 0: The player is not using xPhere
Declare: #include<acg.inc> or native acg_userstatus(id);

acg_getusermac

Function: Get the unique machine code of a specified player
Parma(s): (1)
- id: Target player ID
Return (1, dword)
- machine code
Declare: #include<acg.inc> or native acg_getusermac(id);

acg_getusercolorbit

Function: Get color the client color quality mode (16bit or 32bit)
Parma(s): (1)
- id: Target player ID
Return (1, dword)
- Color quality
Declare: #include<acg.inc> or native acg_getusercolorbit(id);

acg_getuserrendermode

Function: Query render mode
Parma(s): (1)
- id: Target player ID
Return(1, dword)
- 0: OpenGL
- 1: DirectX
Declare#include<acg.inc> or native acg_getuserrendermode(id);

acg_getlagtimes

Function: Get the sum of a specified player's lag times
Parma(s): (1)
- id: Target player ID
Return(1, byte)
- lag times
Declare: #include<acg.inc> or native acg_getlagtimes(id);

acg_scanmemory

Function: Scan a specified player to make sure whether he is cheating
Parma(s): (3)
- Operator: Operator ID
- id: Target player ID
- bDeepScan: Scan deeply [1= Yes, 0= No]
Return (Void)
Result returns by forward "acg_scanresult" or "acg_operaresult"
Declare: 
#include<acg.inc> or
 native acg_scanmemory(Operator, id, bDeepScan);

acg_capturescreen

Function:Capture a specified player's screen and send to server(HLDS folder\ScreenShots, see acg.cfg)
Parma(s): (2)
- op: Operator ID
- id: Target player ID
- quality: Quality of jpeg image
- method: 0-Use engine interface to take a shot, 1-Use WinGDI interface to take a shot
- szRemark: Optional, see acg.cfg.
Return (Void)
Result returns by forward "acg_operaresult"
Declare: #include<acg.inc> or native acg_capturescreen(op, id, jpegquality, method, const szRemark[] = "");

acg_reconnect

Function: Make a specified player's xPhere reconnect to server. Use when the player lags too many times.
Parma(s): (1)
- id: Target player ID
Return (Void)
Declare: #include<acg.inc> or native acg_reconnect(id);

acg_createnotice

Function: Create a CZ-like notice box.



Parma(s)
: (3)
- id: Target player ID
- Style: 
---- 1 :[!]Green
---- 2 :[×]Red
---- 4 :[×]Blue
---- 8 :[!]Yellow
---- 16:[!]Pink
---- 32:[!]Orange
---- 64:[!]Cyan
---- 128:[!]Purple
---- 256:[!]White
- Text: (Must in UTF-8 if it's not English)
Return (Void)
Declare: #include<acg.inc> or native acg_createnotice(id, Style, const Text[]);

acg_closenotice

Function: Close the CZ-like notice box created before.
Parma(s): (1)
- id: Target player ID
Return (Void)
Declare:
#include<acg.inc> or
 native acg_closenotice(id);

acg_querymodule

Function: Get DLLs loaded to the game memory
Parma(s): (3)
- Operator: Operator ID
- id: Target player ID
- bDeepScan: Scan deeply [1= Yes, 0= No]
Return (Boolean)
Dll names and bases return by forward "acg_getmoduleinfo"
Declare: #include<acg.inc> or native acg_querymodule(Operator, id, bDeepScan);

acg_insertblack

Function: Insert a checksum to blacklist
Parma(s): (2)
- Operator: Operator ID
- Checksum (Get via acg_querymodule andacg_getmoduleinfo)
Return (Boolean)
Declare: #include<acg.inc> or native acg_insertblack(Operator, Checksum);

acg_setextraammo

Function: Set the amount of "extra ammo"
Parma(s): (2)
- id: Target player ID
- AmmoCount
Return (Boolean)
Declare:
#include<acg.inc> or
 native acg_setextraammo(id, AmmoCount);

acg_showextraammo

Function: Set "extra ammo" visible or not
Parma(s): (2)
- id: Target player ID
- bVisible [1= Show, 0= Hide]
Return (Boolean)
Declare:
#include<acg.inc> or
 native acg_showextraammo(id, bVisible);

acg_setextraammotext

  • Function: Set the text under "extra ammo"






    Parma(s)
    : (2)
    - id: Target player ID
    - szText: Text you want to show
    - sprAmmo: Sprite of ammo type (MUST be defined in hud.txt. This parma is the name of sprite defined in hud.txt)
    Return (Boolean)
    Declare: #include<acg.inc> or native acg_setextraammotext(id, const szText[], const sprAmmo[]);

acg_showstatstable

  • Function: Open or close the stats table
    Parma(s)
    : (3)
    - id: Target player ID
    - bEnable: [1= Enabled, 0= Disabled] (When the stats table enabled, you can use command "statswindow" to expand or shrink it.)
    - bReset: Reset the stats table? [1= Yes, 0= No] 
    Return (Boolean)
    Declare: #include<acg.inc> or native acg_showstatstable(id, bEnable, bReset)









acg_setstatstabletext

  • Function: Set the text in the stats table 
    Parma(s)
    : (3)
    - id: Target player ID
    - line: Which line (1~4) to set?
    - szText: Text you want to show
    Return (Boolean)
    Declare: #include<acg.inc> or native acg_setstatstabletext(id, line, const szText[])

acg_statstableaddupdamagepoint

  • Function: Tell the client-side xPhere how many damage points the player caused.
    Parma(s)
    : (3)
    - attacker: Attacker ID
    - victim: Victim ID
    - HealthDamaged
    Return (Boolean)
    Declare:
    #include<acg.inc> or
     native acg_statstableaddupdamagepoint(id, victim, HealthDamaged)

acg_setstatstableweaponspr

  • Function: Draw a specified weapon spr in the stats table
    Parma(s)
    : (2)
    - id: Target player ID
    - szSpr: the spr defied in hud.txt.
    Return (Boolean)
    Declare: #include<acg.inc> or native acg_setstatstableweaponspr(id, const szSpr[])

acg_showteammate

  • Function: Make the client-side xPhere show the teammates' name.
    Parma(s)
    : (2)
    - id: Player you want to enable this function.
    - bEnable: [1= Enabled, 0= Disabled]
    Return (Boolean)
    Declare: #include<acg.inc> or native acg_showteammate(id, bEnable);

acg_drawspr

Function: Draw a sprite on screen
Parma(s):
- id: Target player ID
- szSpr: Full path of the .spr file. Extension is not required. 
For example: myfolder/myspr means sprites\myfolder\myspr.spr [*] Precache is required!
- red green blue: Saturation of Red/Green/Blue. 255 for general.
- x y: X coord and Y coord. Range: 0.0~1.0.
- center: Put the spr center on X coord and Y coord. [1= Yes, 0= No]
- effects: Visual effects [FX_NONE= No effects, FX_FADE= Fade, FX_FLASH= Flash]
- fadeintime fadeouttime: Duration of fade in/out. 0 means disabled. (unit: second)
- fxtime: Duration of flashing. 0 means disabled. (unit: second)
- holdtime: Hold time.(Holdtime<0 means you want to draw it all the time. Notice: On this occasion should the value of "channel" be in 0~31, and fadeout effect is NOT available)
- (Q: Then how to stop drawing? A: Call acg_removedrawnimage)
- mode: Mode of drawing: DRAW_NORMAL/DRAW_ADDITIVE/DRAW_HOLES
- channel: Range: 0~999. This means you can draw 1000 sprs at most at the same time. Any other value (-1, 1001, 1002, etc...) will make xPhere find an empty channel to draw spr.
Return (Boolean)
Declare: #include<acg.inc> or native acg_drawspr(id, const szSpr[], red, green, blue, Float:x, Float:y, 
center,effects, Float:fadeintime, Float:fadeouttime, Float:fxtime, Float:holdtime, mode, channel);

acg_drawsprdefined

Function: Draw a sprite which is already defined in hud.txt on screen
Parma(s):
- id: Target player ID
- szSpr: Sprite name defined in hud.txt
- red green blue: Saturation of Red/Green/Blue. 255 for general.
- x y: X coord and Y coord. Range: 0.0~1.0.
- center: Put the spr center on X coord and Y coord. [1= Yes, 0= No]
- effects: Visual effects [FX_NONE= No effects, FX_FADE= Fade, FX_FLASH= Flash]
- fadeintime fadeouttime: Duration of fade in/out. 0 means disabled. (unit: second)
- fxtime: Duration of flashing. 0 means disabled. (unit: second)
- holdtime: Hold time.(Holdtime<0 means you want to draw it all the time. Notice: On this occasion should the value of "channel" be in 0~31, and fadeout effect is NOT available)
- (Q: Then how to stop drawing? A: Call acg_removedrawnimage)
- mode: Mode of drawing: DRAW_NORMAL/DRAW_ADDITIVE/DRAW_HOLES
- channel: Range: 0~999. This means you can draw 1000 sprs at most at the same time. Any other value (-1, 1001, 1002, etc...) will make xPhere find an empty channel to draw spr.
Return (Boolean)
Declare: #include<acg.inc> or native acg_drawsprdefined(id, const szSpr[], red, green, blue, Float:x, Float:y, 
center,effects, Float:fadeintime, Float:fadeouttime, Float:fxtime, Float:holdtime, mode, channel);

acg_setscoreboardspr

Function: Draw a score board on screen.
Parma(s): (4)
- id: Target player ID
- backgroundtype: Type [SB_DISABLED= Disabled, SB_NORMAL= Normal mode, SB_DEATH=Death mode]
- teamtype: Team type [SB_T_CT= Show "T/CT", SB_ZB_HM= Show "ZB/HM"]
- round_or_kill: [SB_ROUND= Show "ROUND", SB_KILL= Show "KILL"]
Return (Boolean)
Declare: #include<acg.inc> or native acg_setscoreboardspr(id, backgroundtype, teamtype, round_or_kill);

acg_updatescoreboard

Function: Update the figure on score board
Parma(s): (7)
- id: Target player ID
- twins: T wins
- round: Rounds/Total kills
- ctwin: CT wins
- tleft: T remaining [Only available when backgroundtype = SB_NORMAL]
- ctleft: CT remaining[Only available when backgroundtype = SB_NORMAL]
- reservedzeros: Digits (2~3)
Return (Boolean)
Declare:
#include<acg.inc> or
 native acg_updatescoreboard(id, twins, round, ctwin, tleft, ctleft, reservedzeros);

acg_drawoverviewradar

Function: Enable or disable the overview radar. Notice: Only available in OpenGL mode.








Parma(s)
- id: Target player ID
- bEnable: [1= Enabled, 0= Disabled]
- bDrawAllPlayers: Draw all players including enemies? [1= Yes, 0= No]
- bDrawBombToCT: Draw planted C4 on CTs' radar? [1= Yes, 0= No]
- Width: Width of radar[50~300]
- Height: Height of radar [50~300]
- r,g,b: Red/Green/Blue color saturation of radar [0~255]
Return(Boolean)
Declare
#include<acg.inc> or native acg_drawoverviewradar(id, bEnable, bDrawAllPlayers, bDrawBombToCT, Width, Height, r, g, b)

acg_drawspronradar

Function: Draw a sprite on ovewview radar.
Parma(s):
- id: Target player ID
- szSpr: Full path of the .spr file. No extension is required. 
For example: myfolder/myspr means sprites\myfolder\myspr.spr [*] Precache is required!
- red green blue: Saturation of Red/Green/Blue. 255 for general.
- origin[3]: Coord of the object in game. IGNORED when entityid is set.
- entityid: Entity ID. Let engine find origin when this parma is not ZERO.
- effects: Visual effects [FX_NONE= No effects, FX_FADE= Fade, FX_FLASH= Flash]
- fadeintime fadeouttime: Duration of fade in/out. 0 means disabled. (unit: second)
- fxtime: Duration of flashing. 0 means disabled. (unit: second)
- holdtime: Hold time.(Holdtime<0 means you want to draw it all the time. Notice: On this occasion should the value of "channel" be in 0~999, and fadeout effect is NOT available)
- (Q: Then how to stop drawing? A: Call acg_removedrawnimage)
- mode: Mode of drawing: DRAW_NORMAL/DRAW_ADDITIVE/DRAW_HOLES
- channel: Range: 0~999. This means you can draw 1000 sprs at most at the same time. Any other value (-1, 1000, 1002, etc...) will make xPhere to find an empty channel to draw spr.
- alwaysdraw: 
alwaysdraw = 1: When the object is out of radar sight, draw it on border.
alwaysdraw = 0: When the object is out of radar sight, don't draw it.
Declare
#include<acg.inc> or 
native acg_drawspronradar(id, const szSpr[], red, green, blue, origin[3]={0,0,0}, entityid,
effects, Float:fadeintime, Float:fadeouttime, Float:fxtime, Float:holdtime, mode, channel, alwaysdraw)

acg_drawdefinedspronradar

Function: Draw a sprite which is already defined in hud.txt on ovewview radar.
Parma(s):
- id: Target player ID
- szSpr: Sprite name defined in hud.txt
- red green blue: Saturation of Red/Green/Blue. 255 for general.
- origin[3]: Coord of the object in game. IGNORED when entityid is set.
- entityid: Entity ID. Let engine find origin when this parma is not ZERO.
- effects: Visual effects [FX_NONE= No effects, FX_FADE= Fade, FX_FLASH= Flash]
- fadeintime fadeouttime: Duration of fade in/out. 0 means disabled. (unit: second)
- fxtime: Duration of flashing. 0 means disabled. (unit: second)
- holdtime: Hold time.(Holdtime<0 means you want to draw it all the time. Notice: On this occasion should the value of "channel" be in 0~31, and fadeout effect is NOT available)
- (Q: Then how to stop drawing? A: Call acg_removedrawnimage)
- mode: Mode of drawing: DRAW_NORMAL/DRAW_ADDITIVE/DRAW_HOLES
- channel: Range: 0~999. This means you can draw 1000 sprs at most at the same time. Any other value (-1, 1000, 1002, etc...) will make xPhere to find an empty channel to draw spr.
- alwaysdraw: 
alwaysdraw = 1: When the object is out of radar sight, draw it on border.
alwaysdraw = 0: When the object is out of radar sight, don't draw it.
Declare
#include<acg.inc> or 
native acg_drawdefinedspronradar(id, const szSpr[], red, green, blue, origin[3]={0,0,0}, entityid,
effects, Float:fadeintime, Float:fadeouttime, Float:fxtime, Float:holdtime, mode, channel, alwaysdraw)

acg_removedrawnimage

Function: Remove a picture or text being drawn by xPhere
Parma(s)
- id: Target player ID
- whichnative: Being drawn by which native?
0 = acg_drawspr/definedspr
1 = acg_drawoverviewradar/drawdefinedspronradar
2 = acg_drawtga
3 = acg_drawtext
4 = acg_drawentityicon/acg_drawentityicondefined
5 = acg_screenfade
6 = acg_initfont (Cancel a previous initialization) 
- channel: The channel number of the object you want to remove
Declare: #include<acg.inc> or native acg_removedrawnimage(id, whichnative, channel)

acg_setviewentityofbody

Function: Change the camera position of player body
Parma(s)
- id: Target player ID
- body: position
Declare:
#include<acg.inc> or
 native acg_setviewentityofbody(id, body)

acg_setviewentityrenderingmode

Function: Change some parameters of view entity
Parma(s)
- id: Target player ID
- rendermode: Render mode
[kRenderNormal/kRenderTransColor/kRenderTransTexture/kRenderGlow/
kRenderTransAlpha/kRenderTransAdd
]
- renderfx: Render FX (from HLSDK 2.1)
enum 

kRenderFxNone = 0, 
kRenderFxPulseSlow, 
kRenderFxPulseFast, 
kRenderFxPulseSlowWide, 
kRenderFxPulseFastWide, 
kRenderFxFadeSlow, 
kRenderFxFadeFast, 
kRenderFxSolidSlow, 
kRenderFxSolidFast, 
kRenderFxStrobeSlow, 
kRenderFxStrobeFast, 
kRenderFxStrobeFaster, 
kRenderFxFlickerSlow, 
kRenderFxFlickerFast,
kRenderFxNoDissipation,
kRenderFxDistort,
kRenderFxHologram,
kRenderFxDeadPlayer,
kRenderFxExplode,
kRenderFxGlowShell,
kRenderFxClampMinScale,
};

- renderamt: Render amount (0~255)
- red, green, blue: Saturation of Red/Green/Blue. 255 for general.
Declare: 
#include<acg.inc> or
 native acg_setviewentityrenderingmode(id, rendermode, renderfx, renderamt, red, green, blue)

acg_drawtga

Function: Draw a picture in TGA format. 
Notice: Only available in OpenGL mode.

Parma(s):
- id: Target player ID
- szTGA: Full path of the .tga file. e.g. "gfx\mypicture.tga"
- red green blue: Saturation of Red/Green/Blue. 255 for general.
- alpha: Transparency (0~255)
- x y: X coord and Y coord. Range: 0.0~1.0.
- center: Put the spr center on X coord and Y coord. [1= Yes, 0= No]
- effects: Visual effects [FX_NONE= No effects, FX_FADE= Fade, FX_FLASH= Flash]
- fadeintime fadeouttime: Duration of fade in/out. 0 means disabled. (unit: second)
- fxtime: Duration of flashing. 0 means disabled. (unit: second)
- holdtime: Hold time.(Holdtime<0 means you want to draw it all the time. Notice: On this occasion should the value of "channel" be in 0~31, and fadeout effect is NOT available)
- (Q: Then how to stop drawing? A: Call acg_removedrawnimage)
- mode: Mode of drawing: DRAW_NORMAL/DRAW_ADDITIVE/DRAW_HOLES
- bfullscreen: Stretch picture to full screen? [1=Yes 0=No]
- align: Alignment [0= None, ALIGN_RIGHT = X coord counts from right, ALIGN_BOTTOM = Y coord counts from bottom, ALIGN_RIGHT|ALIGN_BOTTOM = Two combined]
- channel: Range: 0~999. This means you can draw 1000 pictures at most at the same time. Any other value (-1, 33, 35, etc...) will make xPhere to find an empty channel to draw TGA.







Declare: #include<acg.inc> or
 native acg_drawtga(id, const szTGA[], red, green, blue, alpha, Float:x, Float:y, 
center, effects, Float:fadeintime, Float:fadeouttime, Float:fxtime, Float:holdtime, channel)

acg_replacesound

Function: Replace sound
Parma(s)
- id: Target player ID
- bEnabled: Make change enabled? [1=Yes 0=No]
- Entity: Replace sound given out by this entity. 0 for all entities.
- Channel: Range: 0~511. This means you can replace 512 sounds at most at the same time.
- szOriginal: Sound to replace e.g. weapons/ak47-2.wav
- szReplaced: Sound to play e.g. weapons/knife_hitwall1.wav
Declare: #include<acg.inc> or 
native acg_replacesound(id, bEnabled, Entity, Channel, szOriginal[], szReplaced[])

acg_drawtext

Function: Draw a text on screen
Notice: Call acg_initfont to bind a font to the channel and then use this native, otherwise use system default font.
Parma(s)
- id: Target player ID
- x y: X coord and Y coord. Range: 0.0~1.0.
- szText: Text to draw
- r g b alpha: Saturation of Red/Green/Blue/Transparent. 255 for general.
- fadeintime fadeouttime: Duration of fade in/out. 0 means disabled. (unit: second)
- holdtime: Hold time.(Holdtime<0 means you want to draw it all the time. Notice: On this occasion should the value of "channel" be in 0~31.)
- (Q: Then how to stop drawing? A: Call acg_removedrawnimage)
- center: Put the spr center on X coord and Y coord. [1= Yes, 0= No]
- style: TS_NONE = No style, TS_BORDER = Text with border, TS_SHADOW = Text with shadow
- inlinecolor: Enable \r\y\b, etc.. to control text color [1=Yes 0=No]
- background: Draw a translucent black background. [1=Yes 0=No]
- channel: Range: 0~31. This means you can draw 32 text at most at the same time. Any other value (-1, 33, 35, etc...) are not accepted.
Declare: #include<acg.inc> or native acg_drawtext(id, Float:x, Float:y, szText[], r, g, b,
alpha, Float:fadeintime, Float:fadeouttime, Float:holdtime, center, style, inlinecolor, background, channel)

acg_drawentityicon

Function: Draw a spr to indicate the position of an entity
Parma(s)
- id: Target player ID
- spr: Full path of the .spr file. No extension is required. 
For example: myfolder/myspr means sprites\myfolder\myspr.spr [*] Precache is required!
- r g b: Saturation of Red/Green/Blue. 255 for general.
- bmeter: Display the distance between player and entity. Unit: meter
- tr tg tb: Saturation of Red/Green/Blue of meter text. 255 for general.
- float:origin[3]: Coord of the object in game. IGNORED when entityid is set.
- entityid: Entity ID. Let engine find origin when this parma is not ZERO.
- holdtime: Hold time.(Holdtime<0 means you want to draw it all the time.)
- (Q: Then how to stop drawing? A: Call acg_removedrawnimage)
- mode: Mode of drawing: DRAW_NORMAL/DRAW_ADDITIVE/DRAW_HOLES
- channel: Range: 0~63. This means you can draw 64 sprs at most at the same time. Any other value will make xPhere to find an empty channel to draw spr. (share channel with acg_drawentityicondefined)


Declare: #include<acg.inc> or
native acg_drawentityicon(id, spr[], r, g, b, bmeter, tr, tg, tb, float:origin[3]={0.0,0.0,0.0}, entityid, float:holdtime, mode, channel)

acg_drawentityicondefined

Function: Draw a spr to indicate the position of an entity (spr is defined in hud.txt)
Parma(s)
- id: Target player ID
- spr: Sprite name defined in hud.txt
- r g b: Saturation of Red/Green/Blue. 255 for general.
- bmeter: Display the distance between player and entity. Unit: meter
- tr tg tb: Saturation of Red/Green/Blue of meter text. 255 for general.
- float:origin[3]: Coord of the object in game. IGNORED when entityid is set.
- entityid: Entity ID. Let engine find origin when this parma is not ZERO.
- holdtime: Hold time.(Holdtime<0 means you want to draw it all the time.)
- (Q: Then how to stop drawing? A: Call acg_removedrawnimage)
- mode: Mode of drawing: DRAW_NORMAL/DRAW_ADDITIVE/DRAW_HOLES
- channel: Range: 0~63. This means you can draw 64 sprs at most at the same time. Any other value will make xPhere to find an empty channel to draw spr. (share channel with acg_drawentityicon)


Declare: #include<acg.inc> or
native acg_drawentityicondefined(id, sprdefined[], r, g, b, bmeter, tr, tg, tb, float:origin[3]={0.0,0.0,0.0}, entityid, float:holdtime, mode, channel)

acg_screenfade

Function: Create a screen fade just like what ScreenFade message does.
Parma(s)
- id: Target player ID
- r g b: Red/Green/Blue/Alpha
- holdtime: Hold time.
(Holdtime<0 means you want to fade all the time. Notice: On this occasion the fadeout effect is NOT available)
(Q: Then how to stop drawing? A: Call acg_removedrawnimage)
- fadeintime fadeouttime: Duration of fade in/out. 0 means disabled. (unit: second)
Declare: #include<acg.inc> or
native acg_screenfade(id, r, g, b, a, Float:holdtime, Float:fadeintime, Float:fadeouttime) 

acg_initfont

Function: Bind a font to the channel for acg_drawtex.
Notice: Call this native once and everything is OK. There is no need calling acg_initfont before acg_drawtextnext time.If you want to init a channel again, call acg_removedrawnimage first
Parma(s)
- id: Target player ID
- fontname: Font name. Empty for system default font.
- size: Font size. [72 pond= 56, 9 pond= 12]
- bold: [1= Yes, 0= No]
- italic:[1= Yes, 0= No]
- underline: [1= Yes, 0= No]
- channel: Range: 0~31. This means you can draw 32 text at most at the same time. Any other value (-1, 33, 35, etc...) are not accepted.
Declare: #include<acg.inc> or
native acg_initfont(id, const fontname[] = "", size, bold, italic, underline, channel)

acg_playspr

Function: Play a spr which is already drawn
Parma(s)
- id: Target player ID
- startframe: Play from which frame? "0" means default.
- Float:interval: Interval between two frames. Unit: second.
- repeattype: 0: static 1: repeat 2: play and stop at last frame 3: play to last frame and stop drawing
- channel: This parma depends on the value you pass to acg_drawspr
Declare: #include<acg.inc> or
native acg_playspr(id, startframe, Float:interval, repeattype, channel)

acg_stopspr

Function: Stop a animated spr
Parma(s)
- id: Target player ID
- channel: This parma depends on the value you pass to acg_playspr
Declare: #include<acg.inc> or
native acg_stopspr(id, startframe, Float:interval, repeattype, channel)

acg_setsprframe

Function: Set a frame to draw
Parma(s)
- id: Target player ID
- frame: Index of frame you want to draw
- channel: This parma depends on the value you pass to acg_drawspr
Declare: #include<acg.inc> or
native acg_setsprframe(id, frame, channel)

acg_resizeimage

Function: Resize an image
Parma(s)
- id: Target player ID
- Float:xscale: Horizontal scale, 1.0 for orginal size
- Float:yscale: Vertical scale, 1.0 for orginal size
- whichnative: image was drawn by which native [0 = acg_drawspr/acg_drawsprdefined, 1 = acg_drawtga]
- channel: channel that image lies in
Declare: #include<acg.inc> or
native acg_resizeimage(id, Float:xscale, Float:yscale, whichnative, channel)

acg_operaresult

Function: The client-side returns operation result by this forward
Parma(s): (3)
- Operator: Operator ID
- Code: Error code [0 = Success, ≠0 = Failed]
- WinErrCode: Returns by Windows API GetLastError()
Declare: #include<acg.inc> or forward acg_operaresult(Operator, Code, WinErrCode);

acg_scanresult

Function: Triggered when a player is found cheating
Parma(s): (3)
- id: Cheater ID
- Code: Cheating code
- Cheater: Cheat name
Declare: #include<acg.inc> or forward acg_scanresult(id, Code, Cheater[]);

acg_userlogin

Function: Triggered when a player using xPhere enters server
Parma(s): (3)
- id: Player ID
- MacCode: Maching code
- ClientVer: Version of client-side xPhere. e.g: Feb 6 2011
Declare: #include<acg.inc> or forward acg_userlogin(id, MacCode, const ClientVer[]);

acg_getmoduleinfo

Function: This forward returns the DLLs loaded to the client memory. (See acg_querymodule)
Parma(s): (4)
- id: Player ID
- Operator: Operator ID
- Name: Dll name
- Checksum: The checksum of this DLL
Declare: #include<acg.inc> or forward acg_getmoduleinfo(id, Operator, const Name[], Checksum);