Difference between revisions of "Counter-Strike: Global Offensive UserMessages"
(Added missing submessages from netmessages.proto) |
m (Add stock UnsignedFixed16ToFloat()) |
||
(14 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
− | |||
Counter-Strike: Global Offensive uses Google's [[Protobuf|Protocol Buffers]] instead of Valve's traditional UserMessages. | Counter-Strike: Global Offensive uses Google's [[Protobuf|Protocol Buffers]] instead of Valve's traditional UserMessages. | ||
− | The data on this page was read from [ | + | The data on this page was read from [https://github.com/SteamDatabase/GameTracking-CSGO/blob/master/Protobufs/cstrike15_usermessages.proto]. |
− | + | The initial versions of these files were provided by Valve and updated by the AlliedModders staff. | |
− | |||
<pre>//====== Copyright (c) 2013, Valve Corporation, All rights reserved. ========// | <pre>//====== Copyright (c) 2013, Valve Corporation, All rights reserved. ========// | ||
Line 34: | Line 32: | ||
// | // | ||
//=============================================================================</pre> | //=============================================================================</pre> | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
== VGUIMenu == | == VGUIMenu == | ||
− | {{begin-hl2msg|SubKey|string}} | + | {{begin-hl2msg|VGUIMenu.SubKey|string}} |
{{hl2msg|string|name|}} | {{hl2msg|string|name|}} | ||
{{hl2msg|string|str|}} | {{hl2msg|string|str|}} | ||
Line 83: | Line 43: | ||
{{hl2msg|string|name|}} | {{hl2msg|string|name|}} | ||
{{hl2msg|bool|show|}} | {{hl2msg|bool|show|}} | ||
− | {{hl2msg|repeated SubKey|subkeys|}} | + | {{hl2msg|repeated VGUIMenu.SubKey|subkeys|}} |
{{end-hl2msg}} | {{end-hl2msg}} | ||
Line 115: | Line 75: | ||
== SayText2 == | == SayText2 == | ||
+ | {{qnotice|As of this writing, params requires four empty strings or it will crash the client}} | ||
{{begin-hl2msg|SayText2|string}} | {{begin-hl2msg|SayText2|string}} | ||
{{hl2msg|int32|ent_idx|}} | {{hl2msg|int32|ent_idx|}} | ||
Line 151: | Line 112: | ||
{{hl2msg|float|local_amplitude|}} | {{hl2msg|float|local_amplitude|}} | ||
{{hl2msg|float|frequency|}} | {{hl2msg|float|frequency|}} | ||
− | {{hl2msg|float|duration|}} | + | {{hl2msg|float|duration|Time to shake (In seconds)}} |
{{end-hl2msg}} | {{end-hl2msg}} | ||
+ | |||
+ | '''Shake.Command:''' | ||
+ | |||
+ | <sourcepawn> | ||
+ | #define SHAKE_START (0) // Starts the screen shake for all players within the radius | ||
+ | #define SHAKE_STOP (1) // Stops the screen shake for all players within the radius | ||
+ | #define SHAKE_AMPLITUDE (2) // Modifies the amplitude of an active screen shake for all players within the radius | ||
+ | #define SHAKE_FREQUENCY (3) // Modifies the frequency of an active screen shake for all players within the radius | ||
+ | #define SHAKE_START_RUMBLEONLY (4) // Starts a shake effect that only rumbles the controller, no screen effect | ||
+ | #define SHAKE_START_NORUMBLE (5) // Starts a shake that does NOT rumble the controller | ||
+ | </sourcepawn> | ||
== Fade == | == Fade == | ||
{{begin-hl2msg|Fade|string}} | {{begin-hl2msg|Fade|string}} | ||
− | {{hl2msg|int32|duration|}} | + | {{hl2msg|int32|duration|Time to fade in/out (In seconds)}} |
− | {{hl2msg|int32|hold_time|}} | + | {{hl2msg|int32|hold_time|Time to hold the faded in/out state (In seconds)}} |
− | {{hl2msg|int32|flags| | + | {{hl2msg|int32|flags|}} |
{{hl2msg|CMsgRGBA|clr|}} | {{hl2msg|CMsgRGBA|clr|}} | ||
{{end-hl2msg}} | {{end-hl2msg}} | ||
+ | |||
+ | '''Fade.Duration:''' | ||
+ | |||
+ | Even if a 32 bits integer is requested, the value must be in [https://en.wikipedia.org/wiki/Q_(number_format) Q7.9 format] ! | ||
+ | |||
+ | '''Fade.HoldTime:''' | ||
+ | |||
+ | Even if a 32 bits integer is requested, the value must be in [https://en.wikipedia.org/wiki/Q_(number_format) Q7.9 format] ! | ||
+ | |||
+ | '''Fade.Flags:''' | ||
+ | |||
+ | <sourcepawn> | ||
+ | #define FFADE_IN (0x0001) // Fade in | ||
+ | #define FFADE_OUT (0x0002) // Fade out | ||
+ | #define FFADE_MODULATE (0x0004) // Modulate (Don't blend) | ||
+ | #define FFADE_STAYOUT (0x0008) // Ignores the duration, stays faded out until a new fade message is received | ||
+ | #define FFADE_PURGE (0x0010) // Purges all other fades, replacing them with this one | ||
+ | </sourcepawn> | ||
+ | |||
+ | '''Stocks:''' | ||
+ | |||
+ | <sourcepawn> | ||
+ | #define CSGO_SCREENFADE_FRACTIONAL_BITS (9) | ||
+ | |||
+ | // ---------------------------------------------------------------- | ||
+ | // Convert a float to an unsigned fixed 16 bits | ||
+ | // ---------------------------------------------------------------- | ||
+ | stock int FloatToUnsignedFixed16(float input, int nb_fractional_bits) | ||
+ | { | ||
+ | int output = RoundFloat(input * (1 << nb_fractional_bits)); | ||
+ | |||
+ | if (output < 0) output = 0; | ||
+ | if (output > 65535) output = 65535; | ||
+ | |||
+ | return output; | ||
+ | } | ||
+ | |||
+ | // ---------------------------------------------------------------- | ||
+ | // Convert an unsigned fixed 16 bits to a float | ||
+ | // ---------------------------------------------------------------- | ||
+ | stock float UnsignedFixed16ToFloat(int input, int nb_fractional_bits) | ||
+ | { | ||
+ | if (input < 0) input = 0; | ||
+ | if (input > 65535) input = 65535; | ||
+ | |||
+ | return (float(input) / (1 << nb_fractional_bits)); | ||
+ | } | ||
+ | |||
+ | // ---------------------------------------------------------------- | ||
+ | // Fade the screen of a client | ||
+ | // ---------------------------------------------------------------- | ||
+ | stock void CSGO_ScreenFadeClient(int clientIndex, float duration, float holdTime, int flags, int color[4]) | ||
+ | { | ||
+ | Protobuf message = UserMessageToProtobuf(StartMessageOne("Fade", clientIndex, USERMSG_RELIABLE)); | ||
+ | |||
+ | message.SetInt ("duration", FloatToUnsignedFixed16(duration, CSGO_SCREENFADE_FRACTIONAL_BITS)); | ||
+ | message.SetInt ("hold_time", FloatToUnsignedFixed16(holdTime, CSGO_SCREENFADE_FRACTIONAL_BITS)); | ||
+ | message.SetInt ("flags", flags); | ||
+ | message.SetColor("clr", color); | ||
+ | |||
+ | EndMessage(); | ||
+ | } | ||
+ | </sourcepawn> | ||
== Rumble == | == Rumble == | ||
Line 170: | Line 205: | ||
{{hl2msg|int32|flags|}} | {{hl2msg|int32|flags|}} | ||
{{end-hl2msg}} | {{end-hl2msg}} | ||
+ | |||
+ | '''Rumble.Index:''' | ||
+ | |||
+ | <sourcepawn> | ||
+ | #define RUMBLE_INVALID (-1) | ||
+ | #define RUMBLE_STOP_ALL (0) // Cease all current rumbling effects. | ||
+ | #define RUMBLE_PISTOL (1) | ||
+ | #define RUMBLE_357 (2) | ||
+ | #define RUMBLE_SMG1 (3) | ||
+ | #define RUMBLE_AR2 (4) | ||
+ | #define RUMBLE_SHOTGUN_SINGLE (5) | ||
+ | #define RUMBLE_SHOTGUN_DOUBLE (6) | ||
+ | #define RUMBLE_AR2_ALT_FIRE (7) | ||
+ | #define RUMBLE_RPG_MISSILE (8) | ||
+ | #define RUMBLE_CROWBAR_SWING (9) | ||
+ | #define RUMBLE_AIRBOAT_GUN (10) | ||
+ | #define RUMBLE_JEEP_ENGINE_LOOP (11) | ||
+ | #define RUMBLE_FLAT_LEFT (12) | ||
+ | #define RUMBLE_FLAT_RIGHT (13) | ||
+ | #define RUMBLE_FLAT_BOTH (14) | ||
+ | #define RUMBLE_DMG_LOW (15) | ||
+ | #define RUMBLE_DMG_MED (16) | ||
+ | #define RUMBLE_DMG_HIGH (17) | ||
+ | #define RUMBLE_FALL_LONG (18) | ||
+ | #define RUMBLE_FALL_SHORT (19) | ||
+ | #define RUMBLE_PHYSCANNON_OPEN (20) | ||
+ | #define RUMBLE_PHYSCANNON_PUNT (21) | ||
+ | #define RUMBLE_PHYSCANNON_LOW (22) | ||
+ | #define RUMBLE_PHYSCANNON_MEDIUM (23) | ||
+ | #define RUMBLE_PHYSCANNON_HIGH (24) | ||
+ | #define RUMBLE_PORTALGUN_LEFT (25) | ||
+ | #define RUMBLE_PORTALGUN_RIGHT (26) | ||
+ | #define RUMBLE_PORTAL_PLACEMENT_FAILURE (27) | ||
+ | </sourcepawn> | ||
+ | |||
+ | '''Rumble.Flags:''' | ||
+ | |||
+ | <sourcepawn> | ||
+ | #define RUMBLE_FLAGS_NONE (0x0000) | ||
+ | #define RUMBLE_FLAG_STOP (0x0001) // Stop any instance of this type of effect that's already playing | ||
+ | #define RUMBLE_FLAG_LOOP (0x0002) // Make this effect loop | ||
+ | #define RUMBLE_FLAG_RESTART (0x0004) // If this effect is already playing, restart it | ||
+ | #define RUMBLE_FLAG_UPDATE_SCALE (0x0008) // Apply DATA to this effect if already playing, but don't restart | ||
+ | #define RUMBLE_FLAG_ONLYONE (0x0010) // Don't play this effect if it is already playing | ||
+ | #define RUMBLE_FLAG_RANDOM_AMPLITUDE (0x0020) // Amplitude scale will be randomly chosen (Between 10% and 100%) | ||
+ | #define RUMBLE_FLAG_INITIAL_SCALE (0x0040) // Data is the initial scale to start this effect (* 100) | ||
+ | </sourcepawn> | ||
== CloseCaption == | == CloseCaption == | ||
Line 176: | Line 258: | ||
{{hl2msg|uint32|hash|}} | {{hl2msg|uint32|hash|}} | ||
{{hl2msg|int32|duration|}} | {{hl2msg|int32|duration|}} | ||
− | {{hl2msg|bool|from_player}} | + | {{hl2msg|bool|from_player|}} |
+ | {{hl2msg|string|cctoken|}} | ||
{{end-hl2msg}} | {{end-hl2msg}} | ||
Line 184: | Line 267: | ||
{{hl2msg|uint32|hash|}} | {{hl2msg|uint32|hash|}} | ||
{{hl2msg|int32|duration|}} | {{hl2msg|int32|duration|}} | ||
− | {{hl2msg|bool|from_player}} | + | {{hl2msg|bool|from_player|}} |
{{end-hl2msg}} | {{end-hl2msg}} | ||
Line 204: | Line 287: | ||
== VoiceMask == | == VoiceMask == | ||
− | {{begin-hl2msg|PlayerMask|string}} | + | {{begin-hl2msg|VoiceMask.PlayerMask|string}} |
{{hl2msg|int32|game_rules_mask|}} | {{hl2msg|int32|game_rules_mask|}} | ||
{{hl2msg|int32|ban_masks|}} | {{hl2msg|int32|ban_masks|}} | ||
Line 210: | Line 293: | ||
{{begin-hl2msg|VoiceMask|string}} | {{begin-hl2msg|VoiceMask|string}} | ||
− | {{hl2msg|repeated PlayerMask|player_masks|}} | + | {{hl2msg|repeated VoiceMask.PlayerMask|player_masks|}} |
{{hl2msg|bool|player_mod_enable|}} | {{hl2msg|bool|player_mod_enable|}} | ||
{{end-hl2msg}} | {{end-hl2msg}} | ||
Line 219: | Line 302: | ||
{{hl2msg|int32|amount|}} | {{hl2msg|int32|amount|}} | ||
{{hl2msg|CMsgVector|inflictor_world_pos|}} | {{hl2msg|CMsgVector|inflictor_world_pos|}} | ||
+ | {{hl2msg|int32|victim_entindex|}} | ||
{{end-hl2msg}} | {{end-hl2msg}} | ||
Line 243: | Line 327: | ||
== ProcessSpottedEntityUpdate == | == ProcessSpottedEntityUpdate == | ||
+ | |||
{{qnotice|gurjeets - Message below is slightly bigger in size than the non-protobuf version, by around 8 bits. }} | {{qnotice|gurjeets - Message below is slightly bigger in size than the non-protobuf version, by around 8 bits. }} | ||
− | {{begin-hl2msg|SpottedEntityUpdate|string}} | + | {{begin-hl2msg|ProcessSpottedEntityUpdate.SpottedEntityUpdate|string}} |
{{hl2msg|int32|entity_idx|}} | {{hl2msg|int32|entity_idx|}} | ||
{{hl2msg|int32|class_id|}} | {{hl2msg|int32|class_id|}} | ||
Line 257: | Line 342: | ||
{{begin-hl2msg|ProcessSpottedEntityUpdate|string}} | {{begin-hl2msg|ProcessSpottedEntityUpdate|string}} | ||
− | {{hl2msg|repeated SpottedEntityUpdate|entity_updates|}} | + | {{hl2msg|bool|new_update|}} |
+ | {{hl2msg|repeated ProcessSpottedEntityUpdate.SpottedEntityUpdate|entity_updates|}} | ||
+ | {{end-hl2msg}} | ||
+ | |||
+ | == SendPlayerItemDrops == | ||
+ | |||
+ | {{begin-hl2msg|SendPlayerItemDrops|string}} | ||
+ | {{hl2msg|repeated ?|entity_updates|}} | ||
+ | {{end-hl2msg}} | ||
+ | |||
+ | == SendPlayerItemFound == | ||
+ | |||
+ | {{begin-hl2msg|SendPlayerItemFound|string}} | ||
+ | {{hl2msg|?|iteminfo|}} | ||
+ | {{hl2msg|int32|entindex|}} | ||
+ | {{end-hl2msg}} | ||
+ | |||
+ | == RetakeUpdatePlayerCardList == | ||
+ | |||
+ | {{begin-hl2msg|RetakeUpdatePlayerCardList|string}} | ||
+ | {{hl2msg|bool|defuse_kit|}} | ||
+ | {{hl2msg|repeated int32|round_idx|}} | ||
+ | {{hl2msg|repeated int32|loadout_idx|}} | ||
+ | {{hl2msg|repeated int32|card_idx|}} | ||
+ | {{hl2msg|repeated int32|type_idx|}} | ||
+ | {{hl2msg|int32|mvp_boost_round_idx|}} | ||
+ | {{hl2msg|int32|mvp_boost_loadout_idx|}} | ||
+ | {{hl2msg|int32|mvp_boost_card_idx|}} | ||
+ | {{hl2msg|int32|mvp_boost_extra_utility|}} | ||
+ | {{end-hl2msg}} | ||
+ | |||
+ | == RetakeUpdatePlayerCardSelection == | ||
+ | |||
+ | {{begin-hl2msg|RetakeUpdatePlayerCardSelection|string}} | ||
+ | {{hl2msg|int32|round_idx|}} | ||
+ | {{hl2msg|int32|loadout_idx|}} | ||
+ | {{hl2msg|int32|card_idx|}} | ||
+ | {{hl2msg|int32|type_idx|}} | ||
{{end-hl2msg}} | {{end-hl2msg}} | ||
Line 264: | Line 386: | ||
{{begin-hl2msg|ReloadEffect|string}} | {{begin-hl2msg|ReloadEffect|string}} | ||
{{hl2msg|int32|entidx|}} | {{hl2msg|int32|entidx|}} | ||
+ | {{hl2msg|int32|actanim|}} | ||
+ | {{hl2msg|float|origin_x|}} | ||
+ | {{hl2msg|float|origin_y|}} | ||
+ | {{hl2msg|float|origin_z|}} | ||
+ | {{end-hl2msg}} | ||
+ | |||
+ | == WeaponSound == | ||
+ | |||
+ | {{begin-hl2msg|WeaponSound|string}} | ||
+ | {{hl2msg|int32|entidx|}} | ||
+ | {{hl2msg|float|origin_x|}} | ||
+ | {{hl2msg|float|origin_y|}} | ||
+ | {{hl2msg|float|origin_z|}} | ||
+ | {{hl2msg|string|sound|}} | ||
+ | {{hl2msg|float|timestamp|}} | ||
+ | {{end-hl2msg}} | ||
+ | |||
+ | == UpdateScreenHealthBar == | ||
+ | |||
+ | {{begin-hl2msg|UpdateScreenHealthBar|string}} | ||
+ | {{hl2msg|int32|entidx|}} | ||
+ | {{hl2msg|float|healthratio_old|}} | ||
+ | {{hl2msg|float|healthratio_new|}} | ||
+ | {{hl2msg|int32|style|}} | ||
+ | {{end-hl2msg}} | ||
+ | |||
+ | == EntityOutlineHighlight == | ||
+ | |||
+ | {{begin-hl2msg|EntityOutlineHighlight|string}} | ||
+ | {{hl2msg|int32|entidx|}} | ||
+ | {{hl2msg|bool|removehighlight|}} | ||
{{end-hl2msg}} | {{end-hl2msg}} | ||
Line 270: | Line 423: | ||
{{begin-hl2msg|AdjustMoney|string}} | {{begin-hl2msg|AdjustMoney|string}} | ||
{{hl2msg|int32|amount|}} | {{hl2msg|int32|amount|}} | ||
+ | {{end-hl2msg}} | ||
+ | |||
+ | == ReportHit == | ||
+ | |||
+ | {{begin-hl2msg|ReportHit|string}} | ||
+ | {{hl2msg|float|pos_x|}} | ||
+ | {{hl2msg|float|pos_y|}} | ||
+ | {{hl2msg|float|pos_z|}} | ||
+ | {{hl2msg|float|timestamp|}} | ||
{{end-hl2msg}} | {{end-hl2msg}} | ||
Line 314: | Line 476: | ||
== PlayerStatsUpdate == | == PlayerStatsUpdate == | ||
− | {{begin-hl2msg|Stat|string}} | + | {{begin-hl2msg|PlayerStatsUpdate.Stat|string}} |
{{hl2msg|int32|idx|}} | {{hl2msg|int32|idx|}} | ||
{{hl2msg|int32|delta|}} | {{hl2msg|int32|delta|}} | ||
Line 321: | Line 483: | ||
{{begin-hl2msg|PlayerStatsUpdate|string}} | {{begin-hl2msg|PlayerStatsUpdate|string}} | ||
{{hl2msg|int32|version|}} | {{hl2msg|int32|version|}} | ||
− | + | {{hl2msg|repeated PlayerStatsUpdate.Stat|stats|}} | |
− | {{hl2msg|repeated Stat|stats|}} | ||
{{hl2msg|int32|user_id|}} | {{hl2msg|int32|user_id|}} | ||
{{hl2msg|int32|crc|}} | {{hl2msg|int32|crc|}} | ||
Line 332: | Line 493: | ||
{{hl2msg|bool|display|}} | {{hl2msg|bool|display|}} | ||
{{hl2msg|int32|user_id|}} | {{hl2msg|int32|user_id|}} | ||
+ | {{end-hl2msg}} | ||
+ | |||
+ | == QuestProgress == | ||
+ | |||
+ | {{begin-hl2msg|QuestProgress|string}} | ||
+ | {{hl2msg|uint32|quest_id|}} | ||
+ | {{hl2msg|uint32|normal_points|}} | ||
+ | {{hl2msg|uint32|bonus_points|}} | ||
+ | {{hl2msg|bool|is_event_quest|}} | ||
+ | {{end-hl2msg}} | ||
+ | |||
+ | == ScoreLeaderboardData == | ||
+ | |||
+ | {{begin-hl2msg|ScoreLeaderboardData|string}} | ||
+ | {{hl2msg|?|data|}} | ||
+ | {{end-hl2msg}} | ||
+ | |||
+ | == PlayerDecalDigitalSignature == | ||
+ | |||
+ | {{begin-hl2msg|PlayerDecalDigitalSignature|string}} | ||
+ | {{hl2msg|?|data|}} | ||
{{end-hl2msg}} | {{end-hl2msg}} | ||
== XRankGet == | == XRankGet == | ||
+ | {{qnotice|Get ELO Rank Value from Client}} | ||
{{begin-hl2msg|XRankGet|string}} | {{begin-hl2msg|XRankGet|string}} | ||
{{hl2msg|int32|mode_idx|}} | {{hl2msg|int32|mode_idx|}} | ||
Line 343: | Line 526: | ||
== XRankUpd == | == XRankUpd == | ||
+ | {{qnotice|Update ELO Rank Value on Client}} | ||
{{begin-hl2msg|XRankUpd|string}} | {{begin-hl2msg|XRankUpd|string}} | ||
{{hl2msg|int32|mode_idx|}} | {{hl2msg|int32|mode_idx|}} | ||
Line 366: | Line 550: | ||
{{hl2msg|string|other_team_str|}} | {{hl2msg|string|other_team_str|}} | ||
{{hl2msg|bool|is_yes_no_vote|}} | {{hl2msg|bool|is_yes_no_vote|}} | ||
+ | {{hl2msg|int32|entidx_target|}} | ||
{{end-hl2msg}} | {{end-hl2msg}} | ||
Line 401: | Line 586: | ||
== ServerRankUpdate == | == ServerRankUpdate == | ||
− | {{begin-hl2msg|RankUpdate|string}} | + | {{begin-hl2msg|ServerRankUpdate.RankUpdate|string}} |
{{hl2msg|int32|account_id|}} | {{hl2msg|int32|account_id|}} | ||
{{hl2msg|int32|rank_old|}} | {{hl2msg|int32|rank_old|}} | ||
Line 407: | Line 592: | ||
{{hl2msg|int32|num_wins|}} | {{hl2msg|int32|num_wins|}} | ||
{{hl2msg|float|rank_change|}} | {{hl2msg|float|rank_change|}} | ||
+ | {{hl2msg|int32|rank_type_id|}} | ||
{{end-hl2msg}} | {{end-hl2msg}} | ||
{{begin-hl2msg|ServerRankUpdate|string}} | {{begin-hl2msg|ServerRankUpdate|string}} | ||
− | {{hl2msg|repeated RankUpdate|rank_update|}} | + | {{hl2msg|repeated ServerRankUpdate.RankUpdate|rank_update|}} |
+ | {{end-hl2msg}} | ||
+ | |||
+ | == XpUpdate == | ||
+ | |||
+ | {{begin-hl2msg|XpUpdate|string}} | ||
+ | {{hl2msg|?|data|}} | ||
{{end-hl2msg}} | {{end-hl2msg}} | ||
Line 421: | Line 613: | ||
== ShowMenu == | == ShowMenu == | ||
+ | {{qnotice|show hud menu}} | ||
{{begin-hl2msg|ShowMenu|string}} | {{begin-hl2msg|ShowMenu|string}} | ||
{{hl2msg|int32|bits_valid_slots|}} | {{hl2msg|int32|bits_valid_slots|}} | ||
Line 429: | Line 622: | ||
== BarTime == | == BarTime == | ||
+ | {{qnotice|For the C4 progress bar}} | ||
{{begin-hl2msg|BarTime|string}} | {{begin-hl2msg|BarTime|string}} | ||
{{hl2msg|string|time|}} | {{hl2msg|string|time|}} | ||
Line 464: | Line 658: | ||
{{end-hl2msg}} | {{end-hl2msg}} | ||
− | {{ | + | == RoundBackupFilenames == |
+ | |||
+ | {{begin-hl2msg|RoundBackupFilenames|string}} | ||
+ | {{hl2msg|int32|count|}} | ||
+ | {{hl2msg|int32|index|}} | ||
+ | {{hl2msg|string|filename|}} | ||
+ | {{hl2msg|string|nicename|}} | ||
+ | {{end-hl2msg}} | ||
+ | |||
+ | == SSUI == | ||
+ | |||
+ | {{begin-hl2msg|SSUI|string}} | ||
+ | {{hl2msg|bool|show|}} | ||
+ | {{hl2msg|float|start_time|}} | ||
+ | {{hl2msg|float|end_time|}} | ||
+ | {{end-hl2msg}} | ||
+ | |||
+ | == SurvivalStats == | ||
+ | |||
+ | {{begin-hl2msg|SurvivalStats.Fact|string}} | ||
+ | {{hl2msg|int32|type|}} | ||
+ | {{hl2msg|int32|display|}} | ||
+ | {{hl2msg|int32|value|}} | ||
+ | {{hl2msg|float|interestingness|}} | ||
+ | {{end-hl2msg}} | ||
+ | |||
+ | {{begin-hl2msg|SurvivalStats.Placement|string}} | ||
+ | {{hl2msg|uint64|xuid|}} | ||
+ | {{hl2msg|int32|teamnumber|}} | ||
+ | {{hl2msg|int32|placement|}} | ||
+ | {{end-hl2msg}} | ||
+ | |||
+ | {{begin-hl2msg|SurvivalStats.Damage|string}} | ||
+ | {{hl2msg|uint64|xuid|}} | ||
+ | {{hl2msg|int32|to|}} | ||
+ | {{hl2msg|int32|to_hits|}} | ||
+ | {{hl2msg|int32|from|}} | ||
+ | {{hl2msg|int32|from_hits|}} | ||
+ | {{end-hl2msg}} | ||
+ | |||
+ | {{begin-hl2msg|SurvivalStats|string}} | ||
+ | {{hl2msg|uint64|xuid|}} | ||
+ | {{hl2msg|repeated SurvivalStats.Fact|facts|}} | ||
+ | {{hl2msg|repeated SurvivalStats.Placement|users|}} | ||
+ | {{hl2msg|repeated SurvivalStats.Damage|damages|}} | ||
+ | {{hl2msg|int32|ticknumber|}} | ||
+ | {{end-hl2msg}} | ||
+ | |||
+ | == EndOfMatchAllPlayersData == | ||
+ | |||
+ | {{begin-hl2msg|EndOfMatchAllPlayersData.Accolade|string}} | ||
+ | {{hl2msg|int32|eaccolade|}} | ||
+ | {{hl2msg|float|value|}} | ||
+ | {{hl2msg|int32|position|}} | ||
+ | {{end-hl2msg}} | ||
+ | |||
+ | {{begin-hl2msg|EndOfMatchAllPlayersData.PlayerData|string}} | ||
+ | {{hl2msg|int32|entindex|}} | ||
+ | {{hl2msg|uint64|xuid|}} | ||
+ | {{hl2msg|string|name|}} | ||
+ | {{hl2msg|int32|teamnumber|}} | ||
+ | {{hl2msg|EndOfMatchAllPlayersData.Accolade|nomination|}} | ||
+ | {{hl2msg|repeated ?|items|}} | ||
+ | {{hl2msg|int32|playercolor|}} | ||
+ | {{hl2msg|bool|isbot|}} | ||
+ | {{end-hl2msg}} | ||
+ | |||
+ | {{begin-hl2msg|EndOfMatchAllPlayersData|string}} | ||
+ | {{hl2msg|repeated EndOfMatchAllPlayersData.PlayerData|allplayerdata|}} | ||
+ | {{hl2msg|int32|scene|}} | ||
+ | {{end-hl2msg}} | ||
+ | |||
+ | == RoundImpactScoreData == | ||
+ | |||
+ | {{begin-hl2msg|RoundImpactScoreData.RisEvent.Victim|string}} | ||
+ | {{hl2msg|int32|team_number|}} | ||
+ | {{hl2msg|int32|entindex|}} | ||
+ | {{hl2msg|uint64|xuid|}} | ||
+ | {{hl2msg|int32|color|}} | ||
+ | {{hl2msg|bool|is_bot|}} | ||
+ | {{hl2msg|bool|is_dead|}} | ||
+ | {{end-hl2msg}} | ||
+ | |||
+ | {{begin-hl2msg|RoundImpactScoreData.RisEvent.Objective|string}} | ||
+ | {{hl2msg|int32|type|}} | ||
+ | {{end-hl2msg}} | ||
+ | |||
+ | {{begin-hl2msg|RoundImpactScoreData.RisEvent.Damage|string}} | ||
+ | {{hl2msg|int32|target_entindex|}} | ||
+ | {{hl2msg|uint64|target_xuid|}} | ||
+ | {{hl2msg|int32|health_removed|}} | ||
+ | {{hl2msg|int32|num_hits|}} | ||
+ | {{hl2msg|int32|return_health_removed|}} | ||
+ | {{hl2msg|int32|num_return_hits|}} | ||
+ | {{end-hl2msg}} | ||
+ | |||
+ | {{begin-hl2msg|RoundImpactScoreData.RisEvent|string}} | ||
+ | {{hl2msg|float|timestamp|}} | ||
+ | {{hl2msg|int32|terrorist_odds|}} | ||
+ | {{hl2msg|int32|ct_alive|}} | ||
+ | {{hl2msg|int32|t_alive|}} | ||
+ | {{hl2msg|RoundImpactScoreData.RisEvent.Victim|victim_data|}} | ||
+ | {{hl2msg|RoundImpactScoreData.RisEvent.Objective|objective_data|}} | ||
+ | {{hl2msg|repeated RoundImpactScoreData.RisEvent.Damage|all_damage_data|}} | ||
+ | {{end-hl2msg}} | ||
+ | |||
+ | {{begin-hl2msg|RoundImpactScoreData.InitialConditions|string}} | ||
+ | {{hl2msg|int32|ct_equip_value|}} | ||
+ | {{hl2msg|int32|t_equip_value|}} | ||
+ | {{hl2msg|int32|terrorist_odds|}} | ||
+ | {{end-hl2msg}} | ||
+ | |||
+ | {{begin-hl2msg|RoundImpactScoreData|string}} | ||
+ | {{hl2msg|RoundImpactScoreData.InitialConditions|init_conditions|}} | ||
+ | {{hl2msg|repeated RoundImpactScoreData.RisEvent|all_ris_event_data|}} | ||
+ | {{end-hl2msg}} | ||
+ | |||
+ | == CurrentRoundOdds == | ||
+ | |||
+ | {{begin-hl2msg|CurrentRoundOdds|string}} | ||
+ | {{hl2msg|int32|odds|}} | ||
+ | {{end-hl2msg}} | ||
+ | |||
+ | == DeepStats == | ||
+ | |||
+ | {{begin-hl2msg|DeepStats|string}} | ||
+ | {{hl2msg|?|stats|}} | ||
+ | {{end-hl2msg}} | ||
== ResetHud == | == ResetHud == | ||
Line 511: | Line 832: | ||
{{begin-hl2msg|ServerRankRevealAll|string}} | {{begin-hl2msg|ServerRankRevealAll|string}} | ||
− | {{hl2msg|int32| | + | {{hl2msg|int32|seconds_till_shutdown|}} |
+ | {{hl2msg|?|reservation|}} | ||
{{end-hl2msg}} | {{end-hl2msg}} |
Latest revision as of 06:06, 20 December 2020
Counter-Strike: Global Offensive uses Google's Protocol Buffers instead of Valve's traditional UserMessages.
The data on this page was read from [1]. The initial versions of these files were provided by Valve and updated by the AlliedModders staff.
//====== Copyright (c) 2013, Valve Corporation, All rights reserved. ========// // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are met: // // Redistributions of source code must retain the above copyright notice, this // list of conditions and the following disclaimer. // Redistributions in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation // and/or other materials provided with the distribution. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE // ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE // LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN // CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF // THE POSSIBILITY OF SUCH DAMAGE. //===========================================================================// // // Purpose: The file defines our Google Protocol Buffers which are used in over // the wire messages for the Source engine. // //=============================================================================
Contents
- 1 VGUIMenu
- 2 Geiger
- 3 Train
- 4 HudText
- 5 SayText
- 6 SayText2
- 7 TextMsg
- 8 HudMsg
- 9 Shake
- 10 Fade
- 11 Rumble
- 12 CloseCaption
- 13 CloseCaptionDirect
- 14 SendAudio
- 15 RawAudio
- 16 VoiceMask
- 17 Damage
- 18 RadioText
- 19 HintText
- 20 KeyHintText
- 21 ProcessSpottedEntityUpdate
- 22 SendPlayerItemDrops
- 23 SendPlayerItemFound
- 24 RetakeUpdatePlayerCardList
- 25 RetakeUpdatePlayerCardSelection
- 26 ReloadEffect
- 27 WeaponSound
- 28 UpdateScreenHealthBar
- 29 EntityOutlineHighlight
- 30 AdjustMoney
- 31 ReportHit
- 32 KillCam
- 33 DesiredTimescale
- 34 CurrentTimescale
- 35 AchievementEvent
- 36 MatchEndConditions
- 37 PlayerStatsUpdate
- 38 DisplayInventory
- 39 QuestProgress
- 40 ScoreLeaderboardData
- 41 PlayerDecalDigitalSignature
- 42 XRankGet
- 43 XRankUpd
- 44 CallVoteFailed
- 45 VoteStart
- 46 VotePass
- 47 VoteFailed
- 48 VoteSetup
- 49 SendLastKillerDamageToClient
- 50 ServerRankUpdate
- 51 XpUpdate
- 52 ItemPickup
- 53 ShowMenu
- 54 BarTime
- 55 AmmoDenied
- 56 MarkAchievement
- 57 MatchStatsUpdate
- 58 ItemDrop
- 59 GlowPropTurnOff
- 60 RoundBackupFilenames
- 61 SSUI
- 62 SurvivalStats
- 63 EndOfMatchAllPlayersData
- 64 RoundImpactScoreData
- 65 CurrentRoundOdds
- 66 DeepStats
- 67 ResetHud
- 68 GameTitle
- 69 RequestState
- 70 StopSpectatorMode
- 71 DisconnectToLobby
- 72 WarmupHasEnded
- 73 ClientInfo
- 74 ServerRankRevealAll
VGUIMenu
Name: | VGUIMenu.SubKey | ||||||
Structure: |
|
Name: | VGUIMenu | |||||||||
Structure: |
|
Geiger
Name: | Geiger | |||
Structure: |
|
Train
Name: | Train | |||
Structure: |
|
HudText
Name: | HudText | |||
Structure: |
|
SayText
Name: | SayText | ||||||||||||
Structure: |
|
SayText2
Note: As of this writing, params requires four empty strings or it will crash the client
Name: | SayText2 | |||||||||||||||
Structure: |
|
TextMsg
Name: | TextMsg | ||||||
Structure: |
|
HudMsg
Name: | HudMsg | ||||||||||||||||||||||||||||||
Structure: |
|
Shake
Name: | Shake | ||||||||||||
Structure: |
|
Shake.Command:
#define SHAKE_START (0) // Starts the screen shake for all players within the radius #define SHAKE_STOP (1) // Stops the screen shake for all players within the radius #define SHAKE_AMPLITUDE (2) // Modifies the amplitude of an active screen shake for all players within the radius #define SHAKE_FREQUENCY (3) // Modifies the frequency of an active screen shake for all players within the radius #define SHAKE_START_RUMBLEONLY (4) // Starts a shake effect that only rumbles the controller, no screen effect #define SHAKE_START_NORUMBLE (5) // Starts a shake that does NOT rumble the controller
Fade
Name: | Fade | ||||||||||||
Structure: |
|
Fade.Duration:
Even if a 32 bits integer is requested, the value must be in Q7.9 format !
Fade.HoldTime:
Even if a 32 bits integer is requested, the value must be in Q7.9 format !
Fade.Flags:
#define FFADE_IN (0x0001) // Fade in #define FFADE_OUT (0x0002) // Fade out #define FFADE_MODULATE (0x0004) // Modulate (Don't blend) #define FFADE_STAYOUT (0x0008) // Ignores the duration, stays faded out until a new fade message is received #define FFADE_PURGE (0x0010) // Purges all other fades, replacing them with this one
Stocks:
#define CSGO_SCREENFADE_FRACTIONAL_BITS (9) // ---------------------------------------------------------------- // Convert a float to an unsigned fixed 16 bits // ---------------------------------------------------------------- stock int FloatToUnsignedFixed16(float input, int nb_fractional_bits) { int output = RoundFloat(input * (1 << nb_fractional_bits)); if (output < 0) output = 0; if (output > 65535) output = 65535; return output; } // ---------------------------------------------------------------- // Convert an unsigned fixed 16 bits to a float // ---------------------------------------------------------------- stock float UnsignedFixed16ToFloat(int input, int nb_fractional_bits) { if (input < 0) input = 0; if (input > 65535) input = 65535; return (float(input) / (1 << nb_fractional_bits)); } // ---------------------------------------------------------------- // Fade the screen of a client // ---------------------------------------------------------------- stock void CSGO_ScreenFadeClient(int clientIndex, float duration, float holdTime, int flags, int color[4]) { Protobuf message = UserMessageToProtobuf(StartMessageOne("Fade", clientIndex, USERMSG_RELIABLE)); message.SetInt ("duration", FloatToUnsignedFixed16(duration, CSGO_SCREENFADE_FRACTIONAL_BITS)); message.SetInt ("hold_time", FloatToUnsignedFixed16(holdTime, CSGO_SCREENFADE_FRACTIONAL_BITS)); message.SetInt ("flags", flags); message.SetColor("clr", color); EndMessage(); }
Rumble
Name: | Rumble | |||||||||
Structure: |
|
Rumble.Index:
#define RUMBLE_INVALID (-1) #define RUMBLE_STOP_ALL (0) // Cease all current rumbling effects. #define RUMBLE_PISTOL (1) #define RUMBLE_357 (2) #define RUMBLE_SMG1 (3) #define RUMBLE_AR2 (4) #define RUMBLE_SHOTGUN_SINGLE (5) #define RUMBLE_SHOTGUN_DOUBLE (6) #define RUMBLE_AR2_ALT_FIRE (7) #define RUMBLE_RPG_MISSILE (8) #define RUMBLE_CROWBAR_SWING (9) #define RUMBLE_AIRBOAT_GUN (10) #define RUMBLE_JEEP_ENGINE_LOOP (11) #define RUMBLE_FLAT_LEFT (12) #define RUMBLE_FLAT_RIGHT (13) #define RUMBLE_FLAT_BOTH (14) #define RUMBLE_DMG_LOW (15) #define RUMBLE_DMG_MED (16) #define RUMBLE_DMG_HIGH (17) #define RUMBLE_FALL_LONG (18) #define RUMBLE_FALL_SHORT (19) #define RUMBLE_PHYSCANNON_OPEN (20) #define RUMBLE_PHYSCANNON_PUNT (21) #define RUMBLE_PHYSCANNON_LOW (22) #define RUMBLE_PHYSCANNON_MEDIUM (23) #define RUMBLE_PHYSCANNON_HIGH (24) #define RUMBLE_PORTALGUN_LEFT (25) #define RUMBLE_PORTALGUN_RIGHT (26) #define RUMBLE_PORTAL_PLACEMENT_FAILURE (27)
Rumble.Flags:
#define RUMBLE_FLAGS_NONE (0x0000) #define RUMBLE_FLAG_STOP (0x0001) // Stop any instance of this type of effect that's already playing #define RUMBLE_FLAG_LOOP (0x0002) // Make this effect loop #define RUMBLE_FLAG_RESTART (0x0004) // If this effect is already playing, restart it #define RUMBLE_FLAG_UPDATE_SCALE (0x0008) // Apply DATA to this effect if already playing, but don't restart #define RUMBLE_FLAG_ONLYONE (0x0010) // Don't play this effect if it is already playing #define RUMBLE_FLAG_RANDOM_AMPLITUDE (0x0020) // Amplitude scale will be randomly chosen (Between 10% and 100%) #define RUMBLE_FLAG_INITIAL_SCALE (0x0040) // Data is the initial scale to start this effect (* 100)
CloseCaption
Name: | CloseCaption | ||||||||||||
Structure: |
|
CloseCaptionDirect
Name: | CloseCaptionDirect | |||||||||
Structure: |
|
SendAudio
Name: | SendAudio | |||
Structure: |
|
RawAudio
Name: | RawAudio | ||||||||||||
Structure: |
|
VoiceMask
Name: | VoiceMask.PlayerMask | ||||||
Structure: |
|
Name: | VoiceMask | ||||||
Structure: |
|
Damage
Name: | Damage | |||||||||
Structure: |
|
RadioText
Name: | RadioText | ||||||||||||
Structure: |
|
HintText
Name: | HintText | |||
Structure: |
|
KeyHintText
Name: | KeyHintText | |||
Structure: |
|
ProcessSpottedEntityUpdate
Note: gurjeets - Message below is slightly bigger in size than the non-protobuf version, by around 8 bits.
Name: | ProcessSpottedEntityUpdate.SpottedEntityUpdate | |||||||||||||||||||||||||||
Structure: |
|
Name: | ProcessSpottedEntityUpdate | ||||||
Structure: |
|
SendPlayerItemDrops
Name: | SendPlayerItemDrops | |||
Structure: |
|
SendPlayerItemFound
Name: | SendPlayerItemFound | ||||||
Structure: |
|
RetakeUpdatePlayerCardList
Name: | RetakeUpdatePlayerCardList | |||||||||||||||||||||||||||
Structure: |
|
RetakeUpdatePlayerCardSelection
Name: | RetakeUpdatePlayerCardSelection | ||||||||||||
Structure: |
|
ReloadEffect
Name: | ReloadEffect | |||||||||||||||
Structure: |
|
WeaponSound
Name: | WeaponSound | ||||||||||||||||||
Structure: |
|
UpdateScreenHealthBar
Name: | UpdateScreenHealthBar | ||||||||||||
Structure: |
|
EntityOutlineHighlight
Name: | EntityOutlineHighlight | ||||||
Structure: |
|
AdjustMoney
Name: | AdjustMoney | |||
Structure: |
|
ReportHit
Name: | ReportHit | ||||||||||||
Structure: |
|
KillCam
Name: | KillCam | |||||||||
Structure: |
|
DesiredTimescale
Name: | DesiredTimescale | ||||||||||||
Structure: |
|
CurrentTimescale
Name: | CurrentTimescale | |||
Structure: |
|
AchievementEvent
Name: | AchievementEvent | |||||||||
Structure: |
|
MatchEndConditions
Name: | MatchEndConditions | ||||||||||||
Structure: |
|
PlayerStatsUpdate
Name: | PlayerStatsUpdate.Stat | ||||||
Structure: |
|
Name: | PlayerStatsUpdate | ||||||||||||
Structure: |
|
DisplayInventory
Name: | DisplayInventory | ||||||
Structure: |
|
QuestProgress
Name: | QuestProgress | ||||||||||||
Structure: |
|
ScoreLeaderboardData
Name: | ScoreLeaderboardData | |||
Structure: |
|
PlayerDecalDigitalSignature
Name: | PlayerDecalDigitalSignature | |||
Structure: |
|
XRankGet
Note: Get ELO Rank Value from Client
Name: | XRankGet | ||||||
Structure: |
|
XRankUpd
Note: Update ELO Rank Value on Client
Name: | XRankUpd | |||||||||
Structure: |
|
CallVoteFailed
Name: | CallVoteFailed | ||||||
Structure: |
|
VoteStart
Name: | VoteStart | ||||||||||||||||||||||||
Structure: |
|
VotePass
Name: | VotePass | ||||||||||||
Structure: |
|
VoteFailed
Name: | VoteFailed | ||||||
Structure: |
|
VoteSetup
Name: | VoteSetup | |||
Structure: |
|
SendLastKillerDamageToClient
Name: | SendLastKillerDamageToClient | ||||||||||||
Structure: |
|
ServerRankUpdate
Name: | ServerRankUpdate.RankUpdate | ||||||||||||||||||
Structure: |
|
Name: | ServerRankUpdate | |||
Structure: |
|
XpUpdate
Name: | XpUpdate | |||
Structure: |
|
ItemPickup
Name: | ItemPickup | |||
Structure: |
|
ShowMenu
Note: show hud menu
Name: | ShowMenu | |||||||||
Structure: |
|
BarTime
Note: For the C4 progress bar
Name: | BarTime | |||
Structure: |
|
AmmoDenied
Name: | AmmoDenied | |||
Structure: |
|
MarkAchievement
Name: | MarkAchievement | |||
Structure: |
|
MatchStatsUpdate
Name: | MatchStatsUpdate | |||
Structure: |
|
ItemDrop
Name: | ItemDrop | ||||||
Structure: |
|
GlowPropTurnOff
Name: | GlowPropTurnOff | |||
Structure: |
|
RoundBackupFilenames
Name: | RoundBackupFilenames | ||||||||||||
Structure: |
|
SSUI
Name: | SSUI | |||||||||
Structure: |
|
SurvivalStats
Name: | SurvivalStats.Fact | ||||||||||||
Structure: |
|
Name: | SurvivalStats.Placement | |||||||||
Structure: |
|
Name: | SurvivalStats.Damage | |||||||||||||||
Structure: |
|
Name: | SurvivalStats | |||||||||||||||
Structure: |
|
EndOfMatchAllPlayersData
Name: | EndOfMatchAllPlayersData.Accolade | |||||||||
Structure: |
|
Name: | EndOfMatchAllPlayersData.PlayerData | ||||||||||||||||||||||||
Structure: |
|
Name: | EndOfMatchAllPlayersData | ||||||
Structure: |
|
RoundImpactScoreData
Name: | RoundImpactScoreData.RisEvent.Victim | ||||||||||||||||||
Structure: |
|
Name: | RoundImpactScoreData.RisEvent.Objective | |||
Structure: |
|
Name: | RoundImpactScoreData.RisEvent.Damage | ||||||||||||||||||
Structure: |
|
Name: | RoundImpactScoreData.RisEvent | |||||||||||||||||||||
Structure: |
|
Name: | RoundImpactScoreData.InitialConditions | |||||||||
Structure: |
|
Name: | RoundImpactScoreData | ||||||
Structure: |
|
CurrentRoundOdds
Name: | CurrentRoundOdds | |||
Structure: |
|
DeepStats
Name: | DeepStats | |||
Structure: |
|
ResetHud
Name: | ResetHud | |||
Structure: |
|
GameTitle
Name: | GameTitle | |||
Structure: |
|
RequestState
Name: | RequestState | |||
Structure: |
|
StopSpectatorMode
Name: | StopSpectatorMode | |||
Structure: |
|
DisconnectToLobby
Name: | DisconnectToLobby | |||
Structure: |
|
WarmupHasEnded
Name: | WarmupHasEnded | |||
Structure: |
|
ClientInfo
Name: | ClientInfo | |||
Structure: |
|
ServerRankRevealAll
Name: | ServerRankRevealAll | ||||||
Structure: |
|