|
在地图更换前如何执行一个函数?
--------------------------------------------------------------------------------
引用: 作者: Ryu2877 。。。。。。
①语法:
client_cmd(id, const cmd[], {Float,.......})
id是 player index(玩家索引),CS中id取值为 1~32。。。。。
②关于馒头这个问题,比较稳妥的方式是使用“间断事件”:
register_event("30", "e_ChangeMap", "a")
--------------------------------------------------------------------------------
引用: 作者: Rulzy
register_event("30", "e_ChangeMap", "a"),如果是手工换的图,这个事件是不会发生的。
--------------------------------------------------------------------------------
引用: 作者: Ryu2877
是的,但手动(投票等)换图可以轻松拦截到
--------------------------------------------------------------------------------
原帖子见 http://www.dt-club.net/forum/thread/72/36256.htm
我想知道ryu提到的间断事件是什么意思?
我在amxmodx 文档中查到下面的
Messages are a way for Half-Life clients to talk to servers, and vice versa. They are specially formatted lists of parameters. For example, the message "DeathMsg" (message id 83) has three parameters: Attacker (byte), Victim (byte), and Weapon (string). You can either capture messages or send them.
请看"DeathMsg" (message id 83)
那是不是 register_event("DeathMsg", "hook_death", "a")
就可以写成register_event("83", "hook_death", "a")
如果是的话,message id为30对应的事件英文是什么,在哪里可以查询到?
我看后面的在服务器控制台输入meta game可以得到下面的,跟上面却不一致是怎么回事?
[php]
19:46:29 meta game
19:46:30 GameDLL info:
name: cstrike
desc: Counter-Strike
gamedir: E:\game\CS-Server\CS1.6V3647/cstrike
dll file: mp.dll
dll pathname: E:\game\CS-Server\CS1.6V3647/cstrike/dlls/mp.dll
Game registered user msgs: msgid size
VoiceMask 65 8
ReqState 66 0
CurWeapon 67 3
Geiger 68 1
Flashlight 69 2
FlashBat 70 1
Health 71 1
Damage 72 12
Battery 73 2
Train 74 1
HudTextPro 75 -1
HudText 76 -1
SayText 77 -1
TextMsg 78 -1
WeaponList 79 -1
ResetHUD 80 0
InitHUD 81 0
ViewMode 82 0
GameTitle 83 1
DeathMsg 84 -1
ScoreAttrib 85 2
ScoreInfo 86 9
TeamInfo 87 -1
TeamScore 88 -1
GameMode 89 1
MOTD 90 -1
ServerName 91 -1
AmmoPickup 92 2
WeapPickup 93 1
ItemPickup 94 -1
HideWeapon 95 1
SetFOV 96 1
ShowMenu 97 -1
ScreenShake 98 6
ScreenFade 99 10
AmmoX 100 2
SendAudio 101 -1
RoundTime 102 2
Money 103 5
ArmorType 104 1
BlinkAcct 105 1
StatusValue 106 -1
StatusText 107 -1
StatusIcon 108 -1
BarTime 109 2
ReloadSound 110 2
Crosshair 111 1
NVGToggle 112 1
Radar 113 7
Spectator 114 2
VGUIMenu 115 -1
TutorText 116 -1
TutorLine 117 -1
TutorState 118 -1
TutorClose 119 -1
AllowSpec 120 1
BombDrop 121 7
BombPickup 122 0
ClCorpse 123 -1
HostagePos 124 8
HostageK 125 1
HLTV 126 2
SpecHealth 127 1
ForceCam 128 3
ADStop 129 0
ReceiveW 130 1
CZCareer 131 -1
CZCareerHUD 132 -1
ShadowIdx 133 4
TaskTime 134 4
Scenario 135 -1
BotVoice 136 2
BuyClose 137 0
SpecHealth2 138 2
BarTime2 139 4
ItemStatus 140 1
Location 141 -1
BotProgress 142 -1
Brass 143 -1
Fog 144 7
ShowTimer 145 0
HudTextArgs 146 -1
82 game user msgs
[/php] |
|