[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
Cuối cũng cũng xong:
À mấy anh cho hỏi:
PHP:
ShowSyncHudMsg(id, hud_health, "%d", get_user_health(id))
	set_hudmessage(255, 255, 255, 0.0, 0.0, 0, 6.0, 1.1, 0.0, 0.0, -1)

Format kiểu chữ (Font, size, màu sắc... như thế nào mà em cho (255,255,255) đáng nhẽ chữ phải màu trắng, tạo độ phải là (0,0), và ko bị mất sau 1 thời gian nhất định
--> Mà nó cứ hiện ra giữa màn hình, 1 lúc là mất, màu ko phải màu trắng...


View attachment 139866View attachment 139867View attachment 139868
 
Cần tuyển 1 coder cho dự án P."Awake Edition"....ai đủ năng lực nhờ sửa lỗi plug 1 phát
Cái Video hoành tráng thế :x
Nếu plugin cũ còn lỗi gì thì cậu cứ PM, dỗi tớ sẽ sửa vì không muốn phí cái plugin
Không dám hứa giúp đc nhiều nhưng khi nào dỗi sẽ tranh thủ
 
Cái Video hoành tráng thế :x
Nếu plugin cũ còn lỗi gì thì cậu cứ PM, dỗi tớ sẽ sửa vì không muốn phí cái plugin
Không dám hứa giúp đc nhiều nhưng khi nào dỗi sẽ tranh thủ
Vậy thì anh quay lại giúp em nữa, ok>:)
 
^
- Hổ báo lắm mà :))... Bây giờ thì lại...
 
Cuối cũng cũng xong:
À mấy anh cho hỏi:
PHP:
ShowSyncHudMsg(id, hud_health, "%d", get_user_health(id))
	set_hudmessage(255, 255, 255, 0.0, 0.0, 0, 6.0, 1.1, 0.0, 0.0, -1)

Format kiểu chữ (Font, size, màu sắc... như thế nào mà em cho (255,255,255) đáng nhẽ chữ phải màu trắng, tạo độ phải là (0,0), và ko bị mất sau 1 thời gian nhất định
--> Mà nó cứ hiện ra giữa màn hình, 1 lúc là mất, màu ko phải màu trắng...


View attachment 139866View attachment 139867View attachment 139868

Ai giúp em với! :(( ....Làm mãi ko được
 
ai có plugin Buy_rp , Buy_rs share em cái plugin này hiếm quá tìm mãi trong có pro nào có share cho em thanks ;;)
 
Ai có NTS_HAND>AMXX ko bị nhảy hand ko ạ...Em thấy code của anh Tùng có lỗi gì đâu mà nó cứ nháy nháy, tức... Chẳng nhẽ cho game load 2 models 2 hanhd khác nhau :((

P/S trả lời dùm em cái set_hudmessage đi mấy bác...
 
set hud message trước, sau đó mới show hud mesage
 
Ai có NTS_HAND>AMXX ko bị nhảy hand ko ạ...Em thấy code của anh Tùng có lỗi gì đâu mà nó cứ nháy nháy, tức... Chẳng nhẽ cho game load 2 models 2 hanhd khác nhau :((

P/S trả lời dùm em cái set_hudmessage đi mấy bác...
Ko có cách nào để chống nhảy hand ngoài thâm nhập client-side đâu bạn à:|
 
Hay là xác định modelsub ví dụ: bắt buộc tên hay phải là female, male
Sau đó IFFFFFFFFFFF

---------- Post added at 20:12 ---------- Previous post was at 20:11 ----------

À, ai có thể chỉ em cách dùng
read_data được ko ạ?

@Ryokin: thế có hàm nào set font và size không bạn, vào size nó bé tí à...
 
Tôi nói ko đc là ko đc mà. Nếu bạn muốn thì thâm nhập client thôi
bomb.gif
 
Lâu lắm mới thấy anh Tùng lên đây(thần tượng 1 thời của e), k biết đến bao h mình mới đc như anh ấy ;))
@Duy:read_data tức là đọc dữ liệu
PHP:
new string[32]
read_data(argument, string, 31) // --> Đọc dữ liệu trong slot 31 của string

new Float:fVal 
read_data(argument, fVal) // Cũng thế
@Kungfu: Chê k up plugin của ta lên đầu hả ??
P/s :
PHP:
stock
là cái j` thế
 
Chỉnh sửa cuối:
Lâu lắm mới thấy anh Tùng lên đây(thần tượng 1 thời của e), k biết đến bao h mình mới đc như anh ấy ;))
@Kungfu: Chê k up plugin của ta lên đầu hả ??
@Duy:read_data tức là đọc dữ liệu
PHP:
new string[32]
read_data(argument, string, 31) // --> Đọc dữ liệu trong slot 31 của string

Thanks nhưng trong plugins nó ghi là:     
read_data(1)
read_data(2)
read_data(3)
Là gì vậy??

[B]P/S: Ai check dùm em cái này... complie báo 4 lỗi mà ko biết đâu mà sửa:[/B]
[PHP]/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <cstrike>

#define PLUGIN "Misson"
#define VERSION "1.0"
#define AUTHOR "Bui Duc Duy"


public plugin_init()
 {
	register_plugin(PLUGIN, VERSION, AUTHOR)
	register_event("DeathMsg", "event_DeathMsg", "a")
	
}

public event_DeathMsg(id)
{
	new myteam
	new players_ct[32], players_t[32], ict, ite
	
	get_players(players_ct,ict,"ae","CT")   
	get_players(players_t,ite,"ae","TERRORIST")
	
	myteam = cs_get_user_team(id)
	if(myteam==CS_TEAM_T){
		if(ict==0 && ite!0){
			message_begin(MSG_ALL,get_user_msgid("StatusIcon"),{0,0,0},id)
			write_byte(1)
			write_string("win")
			write_byte(255) 
			write_byte(255) 
			write_byte(255)
			message_end()
		} else if(ict!0 && ite==0){
			message_begin(MSG_ALL,get_user_msgid("StatusIcon"),{0,0,0},id)
			write_byte(1)
			write_string("lose")
			write_byte(255)
			write_byte(255)
			write_byte(255)
			message_end()
		}
	} else if(myteam==CS_TEAM_CT){
		if(ict!0 && ite==0){
			message_begin(MSG_ALL,get_user_msgid("StatusIcon"),{0,0,0},id)
			write_byte(1) 
			write_string("win")
			write_byte(255)
			write_byte(255)
			write_byte(255)
			message_end()
		} else if(ict==0 && ite!0){
			message_begin(MSG_ALL,get_user_msgid("StatusIcon"),{0,0,0},id)
			write_byte(1) 
			write_string("lose")
			write_byte(255) 
			write_byte(255) 
			write_byte(255)
			message_end()
		}
	}
}
 
Lâu lắm mới thấy anh Tùng lên đây(thần tượng 1 thời của e), k biết đến bao h mình mới đc như anh ấy ;))
@Duy:read_data tức là đọc dữ liệu
PHP:
new string[32]
read_data(argument, string, 31) // --> Đọc dữ liệu trong slot 31 của string

new Float:fVal 
read_data(argument, fVal) // Cũng thế
@Kungfu: Chê k up plugin của ta lên đầu hả ??
P/s :
PHP:
stock
là cái j` thế
Stock = Local Function. Khi mà dùng set_task, register_forward,... thì BẮT BUỘC phải dùng public.
@Duy: trong cái event mình hook = register_event thì read_data(1) nghĩa là lấy arg 1 của event (thực chất là message).
Lưu ý là chỉ read đc arg thuộc kiểu integer thôi nhé, kiểu khác phải dùng hàm khác:))
 
@Duy: Đây, k warning tý nào nhé
PHP:
#include <amxmodx> 
#include <cstrike> 

#define PLUGIN "Misson" 
#define VERSION "1.0" 
#define AUTHOR "Bui Duc Duy" 


public plugin_init() 
 { 
    register_plugin(PLUGIN, VERSION, AUTHOR) 
    register_event("DeathMsg", "event_DeathMsg", "a")      
} 

public event_DeathMsg(id) 
{ 
    new players_ct[32], players_t[32], ict, ite      
    get_players(players_ct,ict,"ae","CT")    
    get_players(players_t,ite,"ae","TERRORIST")      
    if(cs_get_user_team(id) ==CS_TEAM_T)
	{ 
        if(ict==0 && ite!=0)
		{ 
            message_begin(MSG_ALL,get_user_msgid("StatusIcon"),{0,0,0},id) 
            write_byte(1) 
            write_string("win") 
            write_byte(255)  
            write_byte(255)  
            write_byte(255) 
            message_end() 
        } 
		else if(ict!=0 && ite==0)
		{ 
            message_begin(MSG_ALL,get_user_msgid("StatusIcon"),{0,0,0},id) 
            write_byte(1) 
            write_string("lose") 
            write_byte(255) 
            write_byte(255) 
            write_byte(255) 
            message_end() 
        } 
    } 
	else if(cs_get_user_team(id)==CS_TEAM_CT)
	{ 
        if(ict!=0 && ite==0)
		{ 
            message_begin(MSG_ALL,get_user_msgid("StatusIcon"),{0,0,0},id) 
            write_byte(1)  
            write_string("win") 
            write_byte(255) 
            write_byte(255) 
            write_byte(255) 
            message_end() 
        } 
		else if(ict==0 && ite!=0)
		{ 
            message_begin(MSG_ALL,get_user_msgid("StatusIcon"),{0,0,0},id) 
            write_byte(1)  
            write_string("lose") 
            write_byte(255)  
            write_byte(255)  
            write_byte(255) 
            message_end() 
        } 
    } 
}


---------- Post added at 21:41 ---------- Previous post was at 20:54 ----------

Vừa cày xong phần tạo menu, đem ra viết thử 1 cái plugin xem thế nào. Plugin chạy ngon, menu hiện, có điều khi ấn vào nó chả lên cái quái j` cả
PHP:
#include <amxmodx>
#include <amxmisc>
#include <fun>

#define PLUGIN	"Test menu"
#define AUTHOR	"LegionDark"
#define VERSION	"1.0"

public plugin_init()
{
	new iKeys = MENU_KEY_0|MENU_KEY_1|MENU_KEY_2
	register_plugin(PLUGIN, VERSION, AUTHOR)
	register_concmd("LD_menu_test","showMenu")
	register_menucmd(register_menuid("Some cmd"), iKeys, "Cmd")
}
public showMenu(id)
{
	new menu[45]
	new iKeys = MENU_KEY_0|MENU_KEY_1|MENU_KEY_2
	format(menu,44,"FastCmd^n1. SuiBomb^n2. Buy M4A1^n3. Buy Ak47")
	show_menu(id, iKeys, menu)
	return PLUGIN_HANDLED
}
public Cmd(id,key)
{
	if(key==0)
	{
		give_item(id,"LD_sb")
	}
	else if (key==1)
	{
		give_item(id, "m4a1")
	}
	else if (key==2)
	{
		give_item(id, "ak47")
	}
}
 
Chỉnh sửa cuối:
@buiduchuy + legiondark:
- Trong StatusIcon chả có cái string nào tên win và lose hết ^:)^. Toàn vọc cao...
 
@Duy: Đây, k warning tý nào nhé
PHP:
#include <amxmodx> 
#include <cstrike> 

#define PLUGIN "Misson" 
#define VERSION "1.0" 
#define AUTHOR "Bui Duc Duy" 


public plugin_init() 
 { 
    register_plugin(PLUGIN, VERSION, AUTHOR) 
    register_event("DeathMsg", "event_DeathMsg", "a")      
} 

public event_DeathMsg(id) 
{ 
    new players_ct[32], players_t[32], ict, ite      
    get_players(players_ct,ict,"ae","CT")    
    get_players(players_t,ite,"ae","TERRORIST")      
    if(cs_get_user_team(id) ==CS_TEAM_T)
	{ 
        if(ict==0 && ite!=0)
		{ 
            message_begin(MSG_ALL,get_user_msgid("StatusIcon"),{0,0,0},id) 
            write_byte(1) 
            write_string("win") 
            write_byte(255)  
            write_byte(255)  
            write_byte(255) 
            message_end() 
        } 
		else if(ict!=0 && ite==0)
		{ 
            message_begin(MSG_ALL,get_user_msgid("StatusIcon"),{0,0,0},id) 
            write_byte(1) 
            write_string("lose") 
            write_byte(255) 
            write_byte(255) 
            write_byte(255) 
            message_end() 
        } 
    } 
	else if(cs_get_user_team(id)==CS_TEAM_CT)
	{ 
        if(ict!=0 && ite==0)
		{ 
            message_begin(MSG_ALL,get_user_msgid("StatusIcon"),{0,0,0},id) 
            write_byte(1)  
            write_string("win") 
            write_byte(255) 
            write_byte(255) 
            write_byte(255) 
            message_end() 
        } 
		else if(ict==0 && ite!=0)
		{ 
            message_begin(MSG_ALL,get_user_msgid("StatusIcon"),{0,0,0},id) 
            write_byte(1)  
            write_string("lose") 
            write_byte(255)  
            write_byte(255)  
            write_byte(255) 
            message_end() 
        } 
    } 
}


---------- Post added at 21:41 ---------- Previous post was at 20:54 ----------

Vừa cày xong phần tạo menu, đem ra viết thử 1 cái plugin xem thế nào. Plugin chạy ngon, menu hiện, có điều khi ấn vào nó chả lên cái quái j` cả
PHP:
#include <amxmodx>
#include <amxmisc>
#include <fun>

#define PLUGIN	"Test menu"
#define AUTHOR	"LegionDark"
#define VERSION	"1.0"

public plugin_init()
{
	new iKeys = MENU_KEY_0|MENU_KEY_1|MENU_KEY_2
	register_plugin(PLUGIN, VERSION, AUTHOR)
	register_concmd("LD_menu_test","showMenu")
	register_menucmd(register_menuid("Some cmd"), iKeys, "Cmd")
}
public showMenu(id)
{
	new menu[45]
	new iKeys = MENU_KEY_0|MENU_KEY_1|MENU_KEY_2
	format(menu,44,"FastCmd^n1. SuiBomb^n2. Buy M4A1^n3. Buy Ak47")
	show_menu(id, iKeys, menu)
	return PLUGIN_HANDLED
}
public Cmd(id,key)
{
	if(key==0)
	{
		give_item(id,"LD_sb")
	}
	else if (key==1)
	{
		give_item(id, "m4a1")
	}
	else if (key==2)
	{
		give_item(id, "ak47")
	}
}

@LDK: Thanks, nhưng nó khác gì nhau đâu ...
Sao ko dùng switch ấy...

@dias: write_string là tên của SPR mà anh???
 
Sao k ai fix cho mình cái menu thế ?
@Duy: Sai ở chỗ khác 0 ông lại ghi là !0. Fixed lại là !=0, đúng chưa
 
Back
Top