Lua Hook
always
assist
attack
attack2
bombdefuse
bombexplode
bombplant
break
build
buildattempt
buy
clientdata
collect
die
dominate
drop
endround
flagcapture
flagtake
flashlight
hit
hitzone
hostagerescue
httpdata
join
key
kill
leave
log
mapchange
menu
minute
move
movetile
ms100
name
objectdamage
objectkill
objectupgrade
parse
projectile
radio
rcon
reload
say
sayteam
second
select
serveraction
shieldhit
shutdown
spawn
specswitch
spray
startround
startround_prespawn
suicide
team
trigger
triggerentity
turretscan
use
usebutton
vipescape
vote
walkover
Lua 命令
addbind
addhook
ai_aim
ai_attack
ai_build
ai_buy
ai_debug
ai_drop
ai_findtarget
ai_freeline
ai_goto
ai_iattack
ai_move
ai_radio
ai_reload
ai_respawn
ai_rotate
ai_say
ai_sayteam
ai_selectweapon
ai_spray
ai_use
checksumfile
checksumstring
closehostage
closeitems
closeobjects
entity
entitylist
freehook
freeimage
freetimer
funcs
game
hostage
image
imagealpha
imageblend
imagecolor
imageframe
imagehitzone
imagepos
imagescale
inentityzone
item
itemtype
map
menu
msg
msg2
object
objectat
objecttype
parse
player
playerammo
playerweapons
print
projectile
projectilelist
randomentity
randomhostage
reqcld
reqhttp
setentityaistate
sethookstate
stats
steamstats
tile
timer
tween_alpha
tween_animate
tween_color
tween_frame
tween_move
tween_rotate
tween_rotateconstantly
tween_scale
vars

menu

分类

玩家

参数

    id : 菜单id
    menu-content : 菜单设置

说明

id:在某个玩家的屏幕显示该菜单(id为0时为每个玩家的屏幕上打开菜单)

menu-content定义菜单的外观和内容。
方案:“ title,b1,b2,...,b9”

title =菜单的标题(对于较大的菜单,在标题末尾附加@b;对于不可见的菜单,附加@i)
b1-b9 =最多9个按钮标题。留空则不会显示该按钮。可以使用“ |”分为两部分 (方案:“左字幕|右字幕”)。
此外,您可以将()放在标题旁以使按钮失效。

该菜单当玩家点击菜单按钮,用鼠标或按相应的数字键执行-hook。

注意:此命令只有两个(2)参数!第一个是玩家ID,第二个是定义菜单内容的字符串!

例子1:对玩家1显示菜单
menu(1,"Sample Menu With 3 Buttons,Button 1,Button 2,Button 3")

例子2:对玩家2显示一个大菜单
menu(2,"Big Menu With 3 Buttons@b,Button 1,Button 2,Button 3")

例子3:在按钮1和2中有一个间隙
menu(1,"Space,Button 1,,Button 2")

例子4:具有副标题的按钮和禁用按钮的菜单
menu(1,"Custom Buy Menu,Item 1|$5,Item 2|$50,(Item 3|$999999),Item 4|$0")

例子5:一个不可见的菜单
menu(1,"Hidden@i,b1,b2,b3")

用menu这个hook处理这个点击后的这个命令
addhook("menu","myMenu")

function myMenu(id,title,button)
msg("player "..player(id,"name").." has pressed button #"..button.." in the menu ..title..!")
end

修改词条 删除词条