[AMX][Codes] Hỏi đáp về các code của AMX ...

  • Thread starter Thread starter sontung0
  • Ngày gửi Ngày gửi
Status
Không mở trả lời sau này.
Mấy bạn cho hỏi chỉnh cái plugin csdm phần csdm.cfg chỗ nào để chết thì thưởng ít tiền và bảo vệ 3s, với lại súng rơi trên mặt đất bao lâu thì tự mất đi vậy
Mã:
;CSDM Configuration File
; Default settings by BAILOPAN

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;You must be running the Main plugin for this section
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
[settings]

;Sets whether CSDM is enabled or not.
enabled = 1

;Sets whether or not players should be stripped of weapons on round start
; (excludes knife)
strip_weapons = 1

;Sets how long weapons should stay on the ground for after being dropped
;in seconds.  note that enabling this can create lots of lag for clients 
; AND server.  0 is immediate, -1 is infinite.
weapons_stay = 5

;Sets the spawn mode.
; "none" - users spawn at normal map spawn points
; "preset" - csdm_spawn_preset.amxx required, uses predefined spawns in config files
; -- others may be supplied by 3rd party plugins
spawnmode = none

;Sets whether the bomb is removed
remove_bomb = 1

;Sets the spawn waiting time
spawn_wait_time = 3

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;You must be running the FFA plugin for this section
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
[ffa]
;Set whether free for all mode is enabled by default
enabled = 0

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;You must be running the Misc plugin for this section
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
[misc]
;Map objectives are removed by their flags.
; a - as_ maps
; b - buyzones are removed
; c - cs_ maps
; d - de_ maps
remove_objectives = acd

;Blocks people from using all buy commands
block_buy = 0

;Auto-refills ammo when it gets depleted
ammo_refill = 1

;Says a radio command to a player when they respawn
spawn_radio_msg = 1


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;You must be running the ticketing plugin for this section
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
[ticketing]

;Is round ticketing enabled?
enabled = 1

;Number of times a team can have players respawn before they stop
; being able to respawn
tickets = 150


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;You must be running the protection plugin for this section
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
[protection]

;Is spawn protection enabled?
enabled = 1

;Colors of glow shell, leave this in quotes
;The digits are R, G, B, A where A is the alpha transparency
; (as A gets higher, the glow shell is thicker)
colors = "255 255 255 200"

;Number of seconds someone is respawned for.
time = 3


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;You must be running the equip plugin for these sections
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
[equip]

;Equip Menu flags: 
; p - primary
; s - secondary
; a - armor
; g - grenade
; b - buy
menus = psag

;Autoitem flags:
; a - armor
; h - helmet
; g - grenades
; d - defusekit (CTs only!)
; n - nightvision
autoitems = ahg

;Grenade flags:
; f - flashbang
; h - he grenade
; s - smoke grenade
grenades = fhs

;Sets number of flashbangs given if
; grenades are enabled
fnadesnum = 2


;;;;;;;;;;;;;;;;
;;WEAPON MENUS;;
;;;;;;;;;;;;;;;;

;Format for weapon menus is:
;shortname "Display Name" menupage
;Change the '1' to a '0' to block the weapon
;Removing or moving things 
;  from the list will change the order of the menus!

[secondary]
usp USP 1
glock18 Glock 1
deagle Deagle 1
p228 P228 1
elite Elite 1
fiveseven "Five Seven" 1

[primary]
m4a1 M4A1 1
ak47 AK47 1
aug AUG 1
sg552 SG552 1
galil Galil 1
famas Famas 1
scout Scout 1
awp AWP 1
sg550 SG550 1
m249 M249 1
g3sg1 G3SG1 1
ump45 "UMP 45" 1
mp5navy "MP5 Navy" 1
m3 M3 1
xm1014 XM1014 1
tmp TMP 1
mac10 "Mac 10" 1
p90 P90 1

;List weapons here the bots can randomly have
;The short name must match one in the list above
[botsecondary]
deagle
usp

[botprimary]
ak47
m4a1
awp
galil
aug

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;You must be running the item mode plugin for this section
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
[items]

;Is item mode enabled?
enabled = 0

;If set to 1, players will drop a pack of goodies when they die.
drop_packs = 1

;Sets the number of armor given by a battery. Default is 15.
battery = 15

;Sets the number of health given by a medkit. Default is 15.
medkit = 15

;Sets the time to wait for an item to reappear on its place. Default is 20 (0 = permanent)
item_time = 20

;Sets how long packs stay on the ground. (Max is 30 seconds)
drop_time = 20

;Remove semicolons to restrict any of the following items
; or add the short weapon names of the weapons you want to restrict (m4a1, ak47, awp ...)
[item_restrictions]
;longjump
;medkit
;battery
;pistolammo
;rifleammo
;shotammo
;smgammo
;awpammo
;paraammo
;fullammo
;armor
P/s: Mới đầu mình down trên http://forums.alliedmods.net/showthread.php?t=47306 sài thấy ko bảo vệ 3s với mất súng khi rơi nên copy thử plugin bên cso nst vẫn vậy nên hỏi xem anh em
 
Chỉnh sửa cuối:
Bảo vệ 3s tôi không rõ, vũ khí biến mất là dòng weapons_ stay
 
cho tui hỏi :D có ai làm đc plugin add thêm 1 animation ko ? add animation run idle :)
 
chả thấy ai trả lời mình thế nài...
=> Làm sao để khóa nút Drop nhể
PHP:
public plugin_init()
{
	register_clcmd("drop", "cmd_block_drop")
}
public cmd_block_drop(id)
{
	return PLUGIN_HANDLED
}


---------- Post added at 10:53 ---------- Previous post was at 10:49 ----------

Mấy bạn cho hỏi chỉnh cái plugin csdm phần csdm.cfg chỗ nào để chết thì thưởng ít tiền và bảo vệ 3s, với lại súng rơi trên mặt đất bao lâu thì tự mất đi vậy
+ thời gian bảo về lúc hồi sinh ở time = 3
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;You must be running the protection plugin for this section
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
[protection]

;Is spawn protection enabled?
enabled = 1

;Colors of glow shell, leave this in quotes
;The digits are R, G, B, A where A is the alpha transparency
; (as A gets higher, the glow shell is thicker)
colors = "255 255 255 200"

;Number of seconds someone is respawned for.
time = 3
+ thời gian súng mất đi weapons_stay = 5
 
stung đây rồi , ông làm cái plugin nsw wpn của ông (aimsight + fast run) cho default wpn đc ko ? :) + add thêm ani. run idle lun đc hok ? :( làm ơn >.<
 
@sontung0
- Thanks you.
sontung0 có thể chỉ rõ mấy cái return plugins_handle, plugins_ignore,.. dc hem
Trong tài liệu có ghi nhưng chưa hiểu dc tác dụng :(

@Killer.Uno:
- Mấy cái đó dễ mà =.=
 
bf2error.jpg

Ai sửa dùm em cái hud cái .... Bình thường nó ở góc màn hình . Bh tự nhiên lại ở giữa
Đã remove r` cài lại nhưng vẫn ko đc (:|
 
chắc là do khúc set message origin rồi :))
---------------------------------------
Ai giúp cái này với. Đây là code countdown ngon. Nếu nó countdown xong zombie hiện thì ổn. nhưng mà khi mà admin chỉnh ai đó làm zombie sớm hơn thời gian countdown thì nó vẫn cứ countdown khi nào xong thì thôi. ngồi kiếm Native để fix thì ko dc :((. ai fix giùm với.
=> Nếu khi nào zombie đã xuất hiện thì ngừng countdown

PHP:
#include <amxmodx>
#include <amxmisc>
#include <zombieplague>

#define PLUGIN "[ZP] Addons: Countdown"
#define VERSION "1.0"
#define AUTHOR "Dias Leon"

new countdown
new time_s
new sync_hud

public plugin_init() 
{
	register_plugin(PLUGIN, VERSION, AUTHOR)
	register_event("HLTV", "event_round_start", "a", "1=0", "2=0")
	sync_hud = CreateHudSyncObj();
}
public plugin_precache()
{
	precache_sound("zpp43_sound/countdown/timer10.wav" )
	precache_sound("zpp43_sound/countdown/timer09.wav" )
	precache_sound("zpp43_sound/countdown/timer08.wav" )
	precache_sound("zpp43_sound/countdown/timer07.wav" )
	precache_sound("zpp43_sound/countdown/timer06.wav" )
	precache_sound("zpp43_sound/countdown/timer05.wav" )
	precache_sound("zpp43_sound/countdown/timer04.wav" )
	precache_sound("zpp43_sound/countdown/timer03.wav" )
	precache_sound("zpp43_sound/countdown/timer02.wav" )
	precache_sound("zpp43_sound/countdown/timer01.wav" )
}
public event_round_start()
{
	set_task(4.0, "zombie_countdown")
	time_s = 10
	countdown = 9
}
public zombie_countdown()
{ 
	new speak[ 10 ][] = { 
		"zpp43_sound/countdown/timer01.wav", 
		"zpp43_sound/countdown/timer02.wav", 
		"zpp43_sound/countdown/timer03.wav", 
		"zpp43_sound/countdown/timer04.wav", 
		"zpp43_sound/countdown/timer05.wav", 
		"zpp43_sound/countdown/timer06.wav", 
		"zpp43_sound/countdown/timer07.wav", 
		"zpp43_sound/countdown/timer08.wav", 
		"zpp43_sound/countdown/timer09.wav", 
		"zpp43_sound/countdown/timer10.wav" 
	}
		emit_sound( 0, CHAN_VOICE, speak[ countdown ], 1.0, ATTN_NORM, 0, PITCH_NORM )
		set_hudmessage(179, 0, 0, -1.0, 0.28, 2, 0.02, 1.0, 0.01, 0.1, 10); 
		ShowSyncHudMsg(0, sync_hud, "Infection After: %i", time_s)
		
		countdown--
		--time_s;
		if(time_s >= 1)
		{
			set_task(1.0, "zombie_countdown")
		}
}
 
Xem sign quá khổ không thì ăn đạn nhé ~:>.
 
@chief:
- Giúp tui cái kia đi...
 
Chỉnh sửa cuối:
cho mình hỏi mấy cái plugin này là gì vậy mod hay plugin
Realmod regeneration!! (Gev)
realism (for CS)
Blood Hunt (whole mod)
cho bik tên dịch ra sao lun đi có mấy từ khó hỉu và công năng của nó giải thích sơ wa cũng dc

tra lời dùm mình đi này thì 30 char
 
Tôi đã trả lời rồi.. Đề nghị cho biết U lấy những thứ này từ web nào ? Show link ra.. Và không mấy khi nhìn tên plugin mà đọc ra công dụng, cách dùng của nó đâu :|
 
@sontung0
- Thanks you.
sontung0 có thể chỉ rõ mấy cái return plugins_handle, plugins_ignore,.. dc hem
Trong tài liệu có ghi nhưng chưa hiểu dc tác dụng :(

@Killer.Uno:
- Mấy cái đó dễ mà =.=

đối zoi' ông thì dễ , chứ sao tui biết =.=" tui có phải coder đâu , k biết mới lên nhờ ng giúp chứ , ông biết thì chỉ tui đi
 
@Killer.Uno:
- Uhm

@Chief: Code đó tui tự làm lại từ bản Countdown của Biohazard. nên không có link đến plug
 
Ta đâu có bảo chú gì đâu.. Ta bảo tên xích cơ.
 
HƠ lộn.
Sao không ghi @ vào :-ss. dễ hiểu lầm quá...

--------------------------
@Chief:
- ông có thể giải thích cái return plugin_handled, plugin_ignore,... dc ko.
Tui xem tài liệu nhưng chưa hiểu về công dụng của nó... ông hãy giải thích 1 cách dễ hỉu i
 
Chỉnh sửa cuối:
@dias trong task countdount , check nếu zombie_count(native) > 0 nghĩa là đã có it nhất 1 con zombie thì return + remove_task..
 
đấy, ta nói rùi, set khi nào zombie xuất hiện thì remove_task đi...
ko nghe đâu...
 
Cám ơn Ryokin: tui làm dc rồi

@teo:
- ông chỉ bậy chỉ bạ mà còn nói nhìu à :)). cái mồm kêu set. mà ko cho native set = trym à ?
 
Status
Không mở trả lời sau này.
Back
Top