Skip to content

Commit cb7c002

Browse files
Improve mvalue creation for multiple primary types for networking entity
1 parent 70d5b0b commit cb7c002

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

api/AltV.Net.NetworkingEntity/MValueUtils.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,16 @@ public static MValue ToMValue(object value)
3737
}
3838

3939
return new MValue {ListValue = listMValue};
40+
case int currValue:
41+
return new MValue {IntValue = currValue};
42+
case uint currValue:
43+
return new MValue {UintValue = currValue};
44+
case short currValue:
45+
return new MValue {IntValue = currValue};
46+
case ushort currValue:
47+
return new MValue {UintValue = currValue};
48+
case float currValue:
49+
return new MValue {DoubleValue = currValue};
4050
default:
4151
return new MValue {NullValue = false};
4252
}

0 commit comments

Comments
 (0)