[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
floatround dùng để làm tròn và làm thành int luôn. Chú floatround cái số đã int sẵn thì nó lỗi là phải :))
 
Ơ thế amxx giống vs c hả bác. Cứ / là nó ra int ạ? Hì em tưởng nó sẽ ra float
 
Vậy trong AMXX có hàm nào lấy phần nguyên ko mấy đại ka.
Trong AutoIt có cái Int() sẽ lấy phần nguyên của 1 số. 1.7 -> 1, 1.99 ->1, 1.2 ->1

PHP:
floatround(Float:num, floatround_floor)
 
Mình lập boolean như thế này đc ko nh.
PHP:
new bool:my_bool[33][3]
 
Lập vậy cũng dc nhưng mà Bool thêm cái 3 kia để làm gì thế ?. biết 33 là player rồi. Đừng nói 3 là origin nhá =))
 
không đâu,ta làm mấy cái còn đen tối hơn thế kìa :))
 
Trước có dione boss hôm nay có Oberon boss
[video=youtube;pyTcTtl2igk]http://www.youtube.com/watch?v=pyTcTtl2igk[/URL][/video]
- Includes:
++ Models
++ Sounds
++ Plugin sma

Download: http://dl.dropbox.com/u/13064809/Share Files/oberon_boss.zip

* Thực sự thì ko có ý định làm cái này. Nhưng mà bọn coder ru dám up video khoe mà không share amxx hay sma. Nên ta phải làm để "Break the Monopoly" :))
 
Chỉnh sửa cuối:
good job
mà lúc bị nó hút nó chém mình có drop weapon ko
 
Cái đó thì chưa làm. Nhưng cũng đơn giản thôi. Mà thôi cũng lỡ rồi :))
 
hay nhưng mỗi tội chưa chơi đc vs nst beta3 :) nhưng dù sao cũng cám ơn dias nhiêu. mà hình như chưa có scoreboar tga thì phai, thôi tự code vậy :D
 
kết hai con boss này, giống cso phết
 
^
^
- Cái đó là code sẵn con boss thôi. Còn add vào ZS là 1 chuyện khác :))
 
ko add đk cũng chả sao, mà em alien add đk chắc 2 em này cũng phải có pro add đk chứ
 
mình có 1 plugin ntn :D
PHP:
#include <amxmodx>
#include <hamsandwich>

#define PLUGIN "Hud Health Bar Fit"
#define VERSION "1.1"
#define AUTHOR "SnoW"
#define BAR_SIZE 2

new gBar[ ] = "||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||";
new gMaxHealth[ 33 ];
public plugin_init( ) 
{
	register_plugin( PLUGIN, VERSION, AUTHOR );
	register_event( "Health", "eHealth", "be" );
	RegisterHam( Ham_Spawn, "player", "ham_Spawn", 1 );
}

public eHealth( id )
{
	static health, max_health; 
	health = read_data( 1 );
	max_health = gMaxHealth[ id ];
	if( health > max_health )
		gMaxHealth[ id ] = max_health = health;
	show_bar( id, health * 100 / max_health );
}
	
public ham_Spawn( id )
{
	if( is_user_alive( id ) )
	{
		gMaxHealth[ id ] = get_user_health( id );
		show_bar( id, 100 );
		return HAM_HANDLED;
	}
	return HAM_IGNORED;
}

show_bar( id, health_percent )
{
	set_hudmessage( 255 - health_percent * 2, health_percent * 2, 0, 0.1, 0.9, 0, 6.0, 999.9, 0.0, 0.0, 3 );
	show_hudmessage( id, "%s", gBar[ min( 99, 100 - health_percent / BAR_SIZE ) ] );
}
làm sao để sửa 1 gạch của 1 máu thành 1 gạch của 1 đạn(clip) đc :D
với lại tọa độ ở dòng set_hudmessage chỉ số của nó sẽ đc canh ntn :-/
P/s: lọ mọ mò code @-)
 
bài viết rất ý nghĩa,giúp ích cho các mem mới làm quen với cs như mình thanks bác chủ !
 
^
- Đi chỗ khác mà spam.......................
 
có cách nào chọn font và size trong set_hudmesagge 0 :-/
trong set_hudmessage mình để phần effect là 1 (write chữ) thì thông số nào để chữ chạy nhanh hơn :-/
 
^
- Không có vụ chọn font
- Effect là 1 là nhấp nháy. 2 là ghi từng chữ như viết vào vở ấy. Muốn ghi nhanh thì chỉnh cái time show hay time gì ấy.
 
Valentine qua rồi. Nhưng vẫn có quà để tặng . Author of two plugin is Dias

1. DRAGON CANNON (Resource + SourceCode)
[video=youtube;qzlWSITbPEY]http://www.youtube.com/watch?feature=player_embedded&v=qzlWSITbPEY[/URL][/video]

Name: Dragon Cannon
Version: 1.0
Author: Dias

- Information: A new Powerful weapon from CSO called "Dragon Cannon". Can shoot multi "fire" at a time.
- Cvar:
zp_dcannon_ammo // Default Ammo | Default: 20
zp_firedelay // Fire Delay | Default: 3.5
zp_dmgrandom_start // Random Damage Start from x | Default: 300.0
zp_dmgrandom_end // Random Damage End after x | Default: 500.0
--> In video i use: 300.0 and 2000.0

Download: http://dl.dropbox.com/u/13064809/Share Files/dragon_cannon.zip

[dragon_cannon.zip]
- models
- sound
- sprites
- source code (sma)

2. QuadBarrel (Resource + SourceCode)
[video=youtube;3tZXtqTL5UA]http://www.youtube.com/watch?feature=player_embedded&v=3tZXtqTL5UA[/URL][/video]

Name: Quad Barrel
Type: Weapon
For: Zombie Plague | Team Human
Version: 1.0
Author: Dias
Helper Something about shotgun code: Redplane

1. Information:
- This is a cso hero's weapon. And now is appear in Zombie Plague. Code By Me

2. Usage:
- Press "Left Mouse" to shot one ammo
- Press "Right Mouse" to shot all ammo

3. Cvar:
- zp_qbarrel_default_clip // Default Give and Reloaded Clip | Default: 4
- zp_qbarrel_delay_attack // Delay Time between attack | Default: 0.35 (You shouldn't change this)
- zp_qbarrel_reload_time // Reload Time | Default: 3.0 (You shouldn't change this)

// Note: This is the real damage. Not x of + oh - oh /
- zp_qbarrel_randomdmg_start // Random Damage start from x | Default: 400.0
- zp_qbarrel_randomdmg_end // Random Damage End after x | Default: 600.0

4. Credits:
- Dias | Made Plugin
- RedPlane | Help about Shotgun Code

4. Download:
-> http://dl.dropbox.com/u/13064809/Share Files/zp_extra_quad-barrel.zip
 
[SPOIL]
Valentine qua rồi. Nhưng vẫn có quà để tặng . Author of two plugin is Dias

1. DRAGON CANNON (Resource + SourceCode)
[video=youtube;qzlWSITbPEY]http://www.youtube.com/watch?feature=player_embedded&v=qzlWSITbPEY[/URL][/video]

Name: Dragon Cannon
Version: 1.0
Author: Dias

- Information: A new Powerful weapon from CSO called "Dragon Cannon". Can shoot multi "fire" at a time.
- Cvar:
zp_dcannon_ammo // Default Ammo | Default: 20
zp_firedelay // Fire Delay | Default: 3.5
zp_dmgrandom_start // Random Damage Start from x | Default: 300.0
zp_dmgrandom_end // Random Damage End after x | Default: 500.0
--> In video i use: 300.0 and 2000.0

Download: http://dl.dropbox.com/u/13064809/Share Files/dragon_cannon.zip

[dragon_cannon.zip]
- models
- sound
- sprites
- source code (sma)

2. QuadBarrel (Resource + SourceCode)
[video=youtube;3tZXtqTL5UA]http://www.youtube.com/watch?feature=player_embedded&v=3tZXtqTL5UA[/URL][/video]

Name: Quad Barrel
Type: Weapon
For: Zombie Plague | Team Human
Version: 1.0
Author: Dias
Helper Something about shotgun code: Redplane

1. Information:
- This is a cso hero's weapon. And now is appear in Zombie Plague. Code By Me

2. Usage:
- Press "Left Mouse" to shot one ammo
- Press "Right Mouse" to shot all ammo

3. Cvar:
- zp_qbarrel_default_clip // Default Give and Reloaded Clip | Default: 4
- zp_qbarrel_delay_attack // Delay Time between attack | Default: 0.35 (You shouldn't change this)
- zp_qbarrel_reload_time // Reload Time | Default: 3.0 (You shouldn't change this)

// Note: This is the real damage. Not x of + oh - oh /
- zp_qbarrel_randomdmg_start // Random Damage start from x | Default: 400.0
- zp_qbarrel_randomdmg_end // Random Damage End after x | Default: 600.0

4. Credits:
- Dias | Made Plugin
- RedPlane | Help about Shotgun Code

4. Download:
-> http://dl.dropbox.com/u/13064809/Share Files/zp_extra_quad-barrel.zip

[/SPOIL]

Ghi thêm vô : Redplane sửa plugin cho Dias :P và trực tiếp hướng dẫn các offset cho Dias :P

---------- Post added at 17:28 ---------- Previous post was at 17:22 ----------

@dias: Trên CF có 2 khẩu rất hay đó là Winchester và Bisley. 1 khẩu là Rifle và 1 khẩu là Pistol nhưng có cách nạp đạn là nhét từng viên đạn vào súng. Khi cần có thể cancel giữa chừng và thực hiện tấn công (như shotgun). Winchester cách đây 1 năm anh đã xây dựng thành công, thì Bisley cũng chả nghĩa lý gì. Làm không?
 
Back
Top