|
发表于 2006-5-31 10:10:24
|
显示全部楼层
来自 中国–湖北–武汉
回复: read_data()函数的使用方法
Description
read_data - Gets arguments/values from client messages.
Syntax
read_data ( value, [ ... ] )
Notes
To get an array/string:
new string[32]
read_data(argument, string, 31)
To get a float:
new Float:fVal
read_data(argument, fVal)
To get an integer:
read_data(argument)
[color="Blue"]例如:
下面是DeathMsg Event的描述:
DeathMsg
Fired to all players (MSG_ALL or MSG_BROADCAST) to notify them of a death. This generates the HUD message the client sees in the upper right corner of their screen.
Name: DeathMsg
[color="Blue"]Structure:
byte killer
byte victim
byte headshot
string weapon
则,
new killer_id = read_data(1)
new victim_id = read_data(2)
new headshot = read_data(3)
new weaponname[20]
read_data(4,weaponname,31) |
|