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.
. mà enum cũng chả quan trọng cho lắm.tạo ra một khối dữ liệu và thiết lập giá trị khác nhau vào nó.
tạo ra các hằng số của riêng bạn
tạo các thẻ của riêng bạn cho các biến.
enum _:PlayerData // PlayerData is no longer a tag
{
Player_Kills,
Player_Deaths,
Float:Player_Speed
}
// ...
new ePlayerData[ PlayerData ]
ePlayerData[ Player_Kills ] = 0
ePlayerData[ Player_Deaths ] = 0
ePlayerData[ Player_Speed ] = 250.0
// this line will work properly
set_task( 1.0, "TaskSetPlayerData", id, ePlayerData, PlayerData )
.. Chú có vấn đề đọc hiểu hay sao toàn thắc mắc vớ vẩn thế.
if(is_user_alive(id) && is_user_zombie(id))
if(is_user_alive(id) || is_user_zombie(id))

....
... coi bộ khó thở.. cái đùng nó xuất hiện 1 biến.. chưa thấy set biết thì đã thấy xài rồi 
load_config()
{
// Build customization file path
new path[64]
get_configsdir(path, charsmax(path))
format(path, charsmax(path), "%s/%s", path, SETTING_FILE)
// File not present
if (!file_exists(path))
{
new error[100]
formatex(error, charsmax(error), "Cannot load customization file %s!", path)
set_fail_state(error)
return;
}
...new const SETTING_FILE[] = "nst_player.ini"

... có j mọi người đừng cười... nói thật là mình chả bik cái j về amx =.='
.. chẳng hạn như ex trong help//This defines a new function called "add_two_floats"
// which takes two floating points and returns the sum
Float:add_two_floats(Float:first, Float:second)
{
new Float:sum = first + second
return sum
}
new Float:a
new Float:b
a = 5.0
b = 6.3
new Float:c
c = add_two_floats( a+b )
//c is now equal to 11.3
//You can even pass arrays! You do not have to specify the size of the array.
//If you do, you must make sure you are calling the function with an array of equal size and type.
add_two_from_array(array[], a, b)
{
new first = array[a]
new second = array[b]
new sum = add_two_numbers(first, second) //use our function from earlier
return sum
}

public plasma_touch(plasma, id)
{
if(!pev_valid(plasma))
return
new Float:fOrigin[3]
new iOrigin[3]
entity_get_vector(plasma, EV_VEC_origin, fOrigin)
FVecIVec(fOrigin, iOrigin)
engfunc(EngFunc_RemoveEntity, plasma)
message_begin(MSG_BROADCAST, SVC_TEMPENTITY)
write_byte(TE_EXPLOSION)
write_coord(iOrigin[0])
write_coord(iOrigin[1])
write_coord(iOrigin[2])
write_short(g_explode)
write_byte(25)
write_byte(25)
write_byte(0)
message_end()
for(new i = 1; i < get_maxplayers(); i++)
{
if(is_user_alive(i) && !zp_get_user_zombie(i))
{
static Float:origin[3]
pev(plasma, pev_origin, origin)
static Float:origin2 [3]
pev(i, pev_origin, origin2)
static Float:distance_float
distance_float = get_distance_f(origin, origin2)
static distance
distance = floatround(distance_float)
if (distance <= RADIUS)
{
screen_effect(i)
set_user_health(id, get_user_health(id) - get_pcvar_num(cvar_explosion_dmg))
}
}
}
}
biến patch khai báo ngay ở đó đây thâycái patch đó ở đâu thế nhỉ ...
new path[64]
get_configsdir ==> lấy url của thư mục configget_configsdir(path, charsmax(path))
format(path, charsmax(path), "%s/%s", path, SETTING_FILE)
return ==> trả về 1 giá trịreturn ~> nó trả lại cái j và vào đâu
new num
num = get_value() // biến num lúc này sẽ có giá trị là 1
get_value()
{
return 1;
}
Anh có thể nói rõ hơn được không...?
Em chẳng hiểu cái gì cả... Có hình minh họa thì tốt quá nhỉ ...![]()
Ném file sma vào thư mục addons/amxmodx/scripting. Sau đó ấn compile và đợi nó compile xong thì sẽ ra thư mục compile. Vào thư mục đó tìm tên file vừa compile dưới định dạng amxx. Lấy file đó quăng vào thư mục plugins.
Kế tiếp viết tên file đó thật đầy đủ cả phần mở rộng .amxx vào file plugin-zplague.ini. File .INI đó nằm ở thư mục addons/amxmodx/config.
Vào game kiểm tra.
P.s: Tốt nhất cậu nên về học lại cách sử dụng amxmodx và những thao tác cơ bản về plugin.
true : false
