[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
^
- cái index đó là index của player đang cầm súng đó cha nội ^:)^
Mã:
cs_set_weapon_ammo - Sets the amount of ammo in weapon's clip.
Syntax:
     cs_set_weapon_ammo ( index, newammo )
Type:
    Native
Notes:
index is the weapon entity's index.

cái này đủ đập mặt chú chưa ?

@buiducduy:
ông nên check
PHP:
if(!ent)
return
//code here
hoặc
PHP:
if(ent)
{
//code here
}
rồi add nhé.
 
Con Di@ss toàn cầm đèn chạy trước ô tô, ko đọc kỹ inc mà cứ phán bừa:|
 
Mã:
cs_set_weapon_ammo - Sets the amount of ammo in weapon's clip.
Syntax:
     cs_set_weapon_ammo ( index, newammo )
Type:
    Native
Notes:
index is the weapon entity's index.

cái này đủ đập mặt chú chưa ?

@buiducduy:
ông nên check
PHP:
if(!ent)
return
//code here
hoặc
PHP:
if(ent)
{
//code here
}
rồi add nhé.

/*Để em thử*/
EM đang nó về metahook bác ơi :((
 
User Contributed Notes
Freecode Sep-25-04 13:14:59
The index in this instance is the index of the weapon not the person holding the weapon. So you must find the weapons index before using this native.
.........................................................................................................
 
Mã:
Syntax
cs_set_weapon_ammo ( index, newammo )
Type
Native
Notes
index is a player index from 1 to 32.
 
Sai còn cứ thích cãi cố:|
Mã:
cs_set_weapon_ammo
Cstrike (cstrike.inc)
Description
cs_set_weapon_ammo - Sets the amount of ammo in a player's weapon clip.
Syntax
cs_set_weapon_ammo ( index, newammo )
Type
Native
Notes
index is a player index from 1 to 32.
[B]User Contributed Notes
Freecode	Sep-25-04 13:14:59
The index in this instance is the index of the weapon not the person holding the weapon. So you must find the weapons index before using this native.[/B]
 
Mã:
Syntax
cs_set_weapon_ammo ( index, newammo )
Type
Native
Notes
index is a player index from 1 to 32.

tất nhiên là sai rồi :-w
...........................................
 
Vụ metahook... ai giúp em với. Please !

PHP:
register_concmd("testmh","s")

public s(id)
{
	if (MH_IsMetaHookPlayer(id)) 
	{
		client_print(id,print_chat,"MH co hoat dong")
		MH_DrawText(id, 0, "Hello", -1.0, 0.95,255, 255, 255, 1.0, 2)
	} else client_print(id,print_chat,"MH ko hoat dong")
}
:((
 
^
- Chú phải nói rõ vấn đề lỗi gì mới giúp dc chứ :)). Đưa code lên rồi đòi giúp ai biết giúp gì
 
Vụ metahook... ai giúp em với. Please !

PHP:
register_concmd("testmh","s")

public s(id)
{
	if (MH_IsMetaHookPlayer(id)) 
	{
		client_print(id,print_chat,"MH co hoat dong")
		MH_DrawText(id, 0, "Hello", -1.0, 0.95,255, 255, 255, 1.0, 2)
	} else client_print(id,print_chat,"MH ko hoat dong")
}
:((

@Dias : chỉ có thế thôi anh ạ. Em test thử cái Metahook thôi.
Full code đó :)

Vấn đề là gõ "testmh" nó hiện lên là "MH có hoạt động" còn không thấy text Hello đâu :(
 
Chỉnh sửa cuối:
Sai cái gì chăng ?/////////////////////////////////////////
 
Chẳng nhẽ .... dùng hết rồi mà không đựoc bác ạ.
PHP:
/* Script generated by Pawn Studio */

#include <amxmodx>
#include <amxmisc>
#include <metahook>

#define PLUGIN	"New Plugin"
#define AUTHOR	"Unknown"
#define VERSION	"1.0"

public plugin_init()
{
	register_plugin(PLUGIN, VERSION, AUTHOR)
	register_concmd("check_MH","check_MH")
	register_concmd("draw_text","draw_text")
	register_concmd("draw_image1","draw_image1")
	register_concmd("draw_image2","draw_image2")
}

public check_MH(id)
{
	if (MH_IsMetaHookPlayer(id)) client_print(id, print_chat, "Metahook dang hoat dong")
	else  client_print(id, print_chat, "Metahook khong hoat dong")
}
public draw_text(id)
{
	MH_DrawText(id, 1, "Xin chao!", -1.0, -1.0, 255, 255, 255, 1.0, 1)
}
public draw_image1(id)
{
	MH_DrawImage(id, 0, 1, "zero/z1", 0.5, 0.5, 255, 255,255, 0, 2.0, 10, 1)
}
public draw_image2(id)
{
	MH_DrawAdditiveImage(id, 0, 1, "zero/z1",  0.5, 0.5, 255, 255, 255, 0, 2.0, 1000, 1)
}

Cứ thử cho đường dẫn sai nó báo không tìm thấy file, sướng tưởng ok rồi, tí cho đường dẫn đúng vô thì không có hiện tượng gì xảy ra :(
Chẳng nhẽ cái này chỉ dành cho CSO ?
 
Pack file hl.exe chưa ?. Copy metahook.dll vào cùng hàng với hl.exe chưa. Chắc rồi, tui cũng ko rành MTH lắm. đợi kungfud lên hd cho
 
Pack file hl.exe chưa ?. Copy metahook.dll vào cùng hàng với hl.exe chưa. Chắc rồi, tui cũng ko rành MTH lắm. đợi kungfud lên hd cho

Pack rồi mà. Vô game nó còn hiện cái radar to đùng nữa!
 
Chuyển game về OpenGL --> fix radar.
MH_DrawText(id, 1, "Xin chao!", -1.0, -1.0, 255, 255, 255, 1.0, 1)
=))
 
Back
Top