Class UserMessage
- Namespace
- CounterStrikeSharp.API.Modules.UserMessages
- Assembly
- CounterStrikeSharp.API.dll
public class UserMessage : NativeObject, IDisposable
- Inheritance
-
objectUserMessage
- Implements
- Inherited Members
Constructors
UserMessage(nint)
public UserMessage(nint pointer)
Parameters
pointer
nint
Properties
DebugString
Returns the debug string of this user message, as defined by protobuf.
CMsgTEFireBullets [452], 452, origin {
x: -1969.24951
y: 2046.12683
z: 60.9242516
}
angles {
x: 32.8350143
y: 19.0894909
z: 0
}
weapon_id: 2441476
mode: 1
seed: 991759080
player: 6390016
inaccuracy: 0.00490000239
recoil_index: 0
spread: 0.0015
sound_type: 9
item_def_index: 61
sound_dsp_effect: 2005810340
ent_origin {
x: -1969.24976
y: 2046.12671
z: -1.92980957
}
num_bullets_remaining: 12
attack_type: 0
public string DebugString { get; }
Property Value
Id
Returns the network message ID of this user message.
public int Id { get; }
Property Value
Name
Returns the network message name of this user message.
public string Name { get; }
Property Value
Recipients
public RecipientFilter Recipients { get; set; }
Property Value
Type
Returns the protobuf message type of this user message.
public string Type { get; }
Property Value
Methods
AddBool(string, bool)
public void AddBool(string fieldName, bool value)
Parameters
AddDouble(string, double)
public void AddDouble(string fieldName, double value)
Parameters
AddFloat(string, float)
public void AddFloat(string fieldName, float value)
Parameters
AddInt(string, int)
public void AddInt(string fieldName, int value)
Parameters
AddInt64(string, long)
public void AddInt64(string fieldName, long value)
Parameters
AddString(string, string)
public void AddString(string fieldName, string value)
Parameters
AddUInt(string, uint)
public void AddUInt(string fieldName, uint value)
Parameters
AddUInt64(string, ulong)
public void AddUInt64(string fieldName, ulong value)
Parameters
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose()
~UserMessage()
protected ~UserMessage()
FindIdByName(string)
Finds a network message ID by name.
public static int FindIdByName(string name)
Parameters
name
string
Returns
FromId(int)
Creates a new user message with a given network message ID.
public static UserMessage FromId(int id)
Parameters
id
int
Returns
FromPartialName(string)
Creates a new user message with a given network message name partial match.
public static UserMessage FromPartialName(string name)
Parameters
name
string
Returns
GetRepeatedFieldCount(string)
public int GetRepeatedFieldCount(string fieldName)
Parameters
fieldName
string
Returns
HasField(string)
public bool HasField(string fieldName)
Parameters
fieldName
string
Returns
ReadBool(string, int?)
public bool ReadBool(string fieldName, int? index = null)
Parameters
Returns
ReadDouble(string, int?)
public double ReadDouble(string fieldName, int? index = null)
Parameters
Returns
ReadFloat(string, int?)
public float ReadFloat(string fieldName, int? index = null)
Parameters
Returns
ReadInt(string, int?)
public int ReadInt(string fieldName, int? index = null)
Parameters
Returns
ReadInt64(string, int?)
public long ReadInt64(string fieldName, int? index = null)
Parameters
Returns
ReadString(string, int?)
public string ReadString(string fieldName, int? index = null)
Parameters
Returns
ReadUInt(string, int?)
public uint ReadUInt(string fieldName, int? index = null)
Parameters
Returns
ReadUInt64(string, int?)
public ulong ReadUInt64(string fieldName, int? index = null)
Parameters
Returns
RemoveRepeatedField(string, int)
public void RemoveRepeatedField(string fieldName, int index)
Parameters
Send()
public void Send()
Send(RecipientFilter)
public void Send(RecipientFilter recipientFilter)
Parameters
recipientFilter
RecipientFilter
SetBool(string, bool, int?)
public void SetBool(string fieldName, bool value, int? index = null)
Parameters
SetDouble(string, double, int?)
public void SetDouble(string fieldName, double value, int? index = null)
Parameters
SetFloat(string, float, int?)
public void SetFloat(string fieldName, float value, int? index = null)
Parameters
SetInt(string, int, int?)
public void SetInt(string fieldName, int value, int? index = null)
Parameters
SetInt64(string, long, int?)
public void SetInt64(string fieldName, long value, int? index = null)
Parameters
SetString(string, string, int?)
public void SetString(string fieldName, string value, int? index = null)
Parameters
SetUInt(string, uint, int?)
public void SetUInt(string fieldName, uint value, int? index = null)
Parameters
SetUInt64(string, ulong, int?)
public void SetUInt64(string fieldName, ulong value, int? index = null)