Difference between revisions of "Half-Life 1 Game Events"

From AlliedModders Wiki
Jump to: navigation, search
(ShowMenu)
(VoiceMask)
Line 373: Line 373:
  
 
== VoiceMask ==
 
== VoiceMask ==
{{qnotice|No Information available for this event}}
+
Used to tell a client who he can hear over the microphone.
 
{{begin-hl1msg|VoiceMask|long, long}}
 
{{begin-hl1msg|VoiceMask|long, long}}
{{hl1msg|long|PlayersIndexBitSum}}
+
{{hl1msg|long|AudiblePlayersIndexBitSum}}
{{hl1msg|long|unknown}}
+
{{hl1msg|long|ServerBannedPlayersIndexBitSum}}
 
{{end-hl1msg}}
 
{{end-hl1msg}}
  

Revision as of 19:14, 30 December 2006

Half-Life Events

In Pawn you are able to hook in-game events with register_event. Here are the list of the standard Half-Life 1 and Counter-Strike events and their parameters which can be read with read_data

See the Advanced Scripting article for more on events and messages.

ADStop

Note: No Information available for this event

Name: ADStop
Structure:


AllowSpec

Note: No Information available for this event

Name: AllowSpec
Structure:
byte unknown


AmmoPickup

Temporarily draws HUD the ammo amount and ammo type HUD icon in the middle of the right side of the screen.
Note: Draw time is dependent on the hud_drawhistory_time client CVAR value

Name: AmmoPickup
Structure:
byte AmmoID
byte Ammount


AmmoX

Updates green bar indicator in the HUD weapons-list. Also updates HUD backpack ammo number in the lower right corner of the screen in case the given ammo type are compatible with the current weapon.

Name: AmmoX
Structure:
byte AmmoID
byte Ammount


BarTime

Draws a HUD progress bar which is filled from 0% to 100% for the time Duration seconds and then disappeared.
Note: Set Duration to 0 to hide the bar.

Name: BarTime
Structure:
short Duration


BarTime2

The same as BarTime but StartPC is specify how many per cents of the bar are (already) filled.
Note: Display time can be calculated with this formula: (1 - StartPC/100) / Duration

Name: BarTime2
Structure:
short Duration
short StartPC


Battery

Updates the icon and number of the armor on the HUD.

Name: Battery
Structure:
short Armor


BlinkAcct

Note: No Information available for this event

Name: BlinkAcct
Structure:


BombDrop

The first three arguments are the origin of the dropped bomb. The last argument is set to 1 if the bomb has been planted. It is 0 if the bomb was dropped due to voluntary dropping or death/disconnect. Setting the last argument 1, will also trigger the round timer to hide. It also will show the dropped bomb on the Terrorist team's radar in the location specified by the first three arguments.

Name: BombDrop
Structure:
coord X
coord Y
coord Z
byte Flag


BombPickup

This message just tells the game that the bomb has been picked up. It will cause the dropped/planted bomb to disappear from the Terrorist team's radar.

Name: BombPickup
Structure:


BotProgress

Note: No Information available for this event

Name: BotProgress
Structure:


BotVoice

Note: No Information available for this event

Name: BotVoice
Structure:
byte unknown
byte unknown


Brass

Note: No Information available for this event

Name: Brass
Structure:


BuyClose

Note: No Information available for this event

Name: BuyClose
Structure:


ClCorpse

Spawns a player's corpse. Model is the player's model, for example: "leet". Delay is the delay before animation plaback, can be negative value.
Note: The Origin and Delay is in non-standard format.

Name: ClCorpse
Structure:
string Model
long OriginX
long OriginY
long OriginZ
coord AngleX
coord AngleY
coord AngleZ
long Delay
byte Sequence
byte unknown
byte TeamID
byte PlayerID


Crosshair

Draws/removes the crosshair. If Flag is set to 1 the crosshair will be drawn.

Name: Crosshair
Structure:
byte Flag


CurWeapon

Updates the clip ammo number and weapon's corresponding ammo type icon on the HUD.

Name: CurWeapon
Structure:
byte isActive
byte WeaponID
byte ClipAmmo


CZCareer

Supplies certain updates to the player regarding Condition Zero singleplayer missions.
Note: See the CZCareer page for more information.

Note: Using an invalid type has no repercussions whatsoever. Therefore, you can use this to make your own custom communications (you can send any number of arguments of any type after the first string).
Note: The Type argument is case-sensitive.
Note: This event does nothing in CS and CZ multiplayer.

Name: CZCareer
Structure:
string Type
* Parameters


CZCareerHUD

Displays certain HUD elements regarding Condition Zero singleplayer missions.
Note: See the CZCareerHUD page for more information.

Note: Using an invalid type has no repercussions whatsoever. Therefore, you can use this to make your own custom communications (you can send any number of arguments of any type after the first string).
Note: The Type argument is case-sensitive.
Note: This event has some limited functionality in CS and CZ multiplayer.

Name: CZCareerHUD
Structure:
string Type
* Parameters


Damage

Called when a player takes damage, to display the red locational indicators.

Name: Damage
Structure:
byte Damage save (armor)
byte Damage take (health)
long Damage type
coord X
coord Y
coord Z


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.
Also prints the console text message "KillerName killed VictimName with WeaponName" or "*** KillerName killed VictimName with a headshot from WeaponName ***"

Name: DeathMsg
Structure:
byte KillerID
byte VictimID
byte isHeadshot
string WeaponName


FlashBat

Updates the flashlight battery charge on the HUD. ChargePC is in per cents.

Name: FlashBat
Structure:
byte ChargePC


Flashlight

Updates the flashlight state and battery charge on the HUD. If Flag is set to 1 the flashlight HUD icon will be shown as active.

Name: Flashlight
Structure:
byte Flag
byte ChargePC


Fog

Note: No Information available for this event

Name: Fog
Structure:


ForceCam

Note: No Information available for this event

Name: ForceCam
Structure:


HostageK

Temporary draws a blinking red dot on the CT players' radar when hostage is killed.

Name: HostageK
Structure:
byte HostageID


HostagePos

Draws/updates the blue mark on the CT players' radar which represents the corresponding hostage's position.

Name: HostagePos
Structure:
byte unknown
byte HostageID
coord X
coord Y
coord Z


Money

Updates the Amount of money on the HUD. If the Flag is 1, the additional new-old HUD money amount difference will be also displayed.

Name: Money
Structure:
long Amount
byte Flag


NVGToggle

Toggles night vision mode. For Flag: 1 is on, 0 is off.

Name: NVGToggle
Structure:
byte Flag


ResetHUD

Resets the HUD.

Name: ResetHUD
Structure:


RoundTime

Updates the round timer on the HUD. Time is in seconds.

Name: RoundTime
Structure:
short Time


SayText

Prints say HUD text. Second parameter can be a predefined string or a custom one. In the last case the last two parameters isn't required.
Some values of the predifined string: #Cstrike_Chat_AllDead, #Cstrike_Chat_All

Name: SayText
Structure:
byte SenderID
string String
string unknown
string Text


Scenario

Note: No Information available for this event

Name: Scenario
Structure:
byte unknown


ScoreAttrib

Updates the scoreboard's attribute for the specified player. For the 2nd argument, 0 is nothing, 1 is dead, 2 is bomb, 4 is VIP.
Note: Flag is a bitwise value so if VIP player dying with the bomb the Flag will be 7

Name: ScoreAttrib
Structure:
byte PlayerID
byte Flag


ShowMenu

Displays a "menu" to a player (text on the left side of the screen). Acts like AMXX's show_menu (in fact, this is how AMXX shows a menu).
Note: Multipart should be 1 if your menu takes up multiple messages (ie: string is too big to fit into one). On the final message, Multipart should be 0.

Name: ShowMenu
Structure:
short Keys
char Time
byte Multipart
string Text


StatusIcon

Draws/removes the specified status HUD icon. For Status, 0 is Hide Icon, 1 is Show Icon, 2 is Flash Icon. Red, Green and Blue arguments is optional and is specified only when Status are not 0.

Name: StatusIcon
Structure:
byte Status
string SpriteName
byte Red
byte Green
byte Blue


StatusText

Specifies the status text format.

Name: StatusText
Structure:
byte unknown
string Text


StatusValue

Sends/updates the status values. For the Flag 1 the Value is TeamRelation, for 2 is PlayerID, for 3 is Health. For TeamRelation, 1 is Teammate player, 2 is Non-Teammate player, 3 is Hostage. If TeamRelation is the Hostage, PlayerID will be always 0.
Note: Usually is fired as a triple message, for example:

 (1, 2) - non-teammate player
(2, 7) - player index is 7
(3, 59) - health is 59
Name: StatusValue
Structure:
byte Flag
short Value


TaskTime

Displays a secondary timer above the round timer. Used for Condition Zero singleplayer missions.
If Time is -1, timer dissappears. If Time is any other negative value, it is displayed as green instead of yellow, and considered positive.
If Active is true, timer counts down. Otherwise, it is paused.
If Fade is above zero, the timer will slowly fade out after that many seconds have passed (even if the timer is inactive).
Note: This event can only be used on missions that have an objective requiring a secondary timer!

Name: TaskTime
Structure:
short Time
byte Active
byte Fade


TeamInfo

TeamName is either "UNASSIGNED", "TERRORIST" or "CT".

Name: TeamInfo
Structure:
byte ID
string TeamName


TeamScore

Updates the team score on the score board. TeamName is either "TERRORIST" or "CT".

Name: TeamScore
Structure:
string TeamName
short Score


TextMsg

Note: There does not necessarily have to be a total of 6 arguments, there could be as little as 2. For example you can send a message with the following:
Arg1: 1
Arg2: #Game_join_ct
Arg3: 4HM

Name: TextMsg
Structure:
byte ID
string Message
string Submsg
string Submsg
string Submsg
string Submsg


Train

Note: No Information available for this event

Name: Train
Structure:
byte unknown


TutorClose

Note: No Information available for this event

Name: TutorClose
Structure:


TutorLine

Note: No Information available for this event

Name: TutorLine
Structure:


TutorState

Note: No Information available for this event

Name: TutorState
Structure:


TutorText

Note: No Information available for this event

Name: TutorText
Structure:


VGUIMenu

Displays a predefined VGUI menu. Keys is a keys bit sum.

Name: VGUIMenu
Structure:
byte unknown
short Keys
char unknown
byte unknown
string unknown


ViewMode

Note: No Information available for this event

Name: ViewMode
Structure:


VoiceMask

Used to tell a client who he can hear over the microphone.

Name: VoiceMask
Structure:
long AudiblePlayersIndexBitSum
long ServerBannedPlayersIndexBitSum


WeapPickup

Fired right before weapon is picked up.
Note: Notice: "right before".

Name: WeapPickup
Structure:
byte WeaponID