read_data()函数的使用方法
哪个大哥能给个使用实例,3q回复: read_data()函数的使用方法
Descriptionread_data - Gets arguments/values from client messages.
Syntax
read_data ( value, [ ... ] )
Notes
To get an array/string:
new string
read_data(argument, string, 31)
To get a float:
new Float:fVal
read_data(argument, fVal)
To get an integer:
read_data(argument)
例如:
下面是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
Structure:
bytekiller
bytevictim
byteheadshot
stringweapon
则,
new killer_id = read_data(1)
new victim_id = read_data(2)
new headshot = read_data(3)
new weaponname
read_data(4,weaponname,31)
回复: read_data()函数的使用方法
如何可以判断 read_data(1)一定是取DeathMsg呢?回复: read_data()函数的使用方法
register_event("DeathMsg","hook_death")public hook_death()
{
new killer_id = read_data(1)
new victim_id = read_data(2)
}
回复: read_data()函数的使用方法
3q,获得完整答案。
页:
[1]