Add transitional syntax support for Protobuf natives.
This commit is contained in:
@@ -53,13 +53,14 @@ PerformBlind(client, target, amount)
|
||||
new color[4] = { 0, 0, 0, 0 };
|
||||
color[3] = amount;
|
||||
|
||||
new Handle:message = StartMessageEx(g_FadeUserMsgId, targets, 1);
|
||||
Handle message = StartMessageEx(g_FadeUserMsgId, targets, 1);
|
||||
if (GetUserMessageType() == UM_Protobuf)
|
||||
{
|
||||
PbSetInt(message, "duration", duration);
|
||||
PbSetInt(message, "hold_time", holdtime);
|
||||
PbSetInt(message, "flags", flags);
|
||||
PbSetColor(message, "clr", color);
|
||||
Protobuf pb = UserMessageToProtobuf(message);
|
||||
pb.SetInt("duration", duration);
|
||||
pb.SetInt("hold_time", holdtime);
|
||||
pb.SetInt("flags", flags);
|
||||
pb.SetColor("clr", color);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
+12
-12
@@ -58,14 +58,14 @@ KillDrug(client)
|
||||
new flags = (0x0001 | 0x0010);
|
||||
new color[4] = { 0, 0, 0, 0 };
|
||||
|
||||
new Handle:message = StartMessageEx(g_FadeUserMsgId, clients, 1);
|
||||
|
||||
Handle message = StartMessageEx(g_FadeUserMsgId, clients, 1);
|
||||
if (GetUserMessageType() == UM_Protobuf)
|
||||
{
|
||||
PbSetInt(message, "duration", duration);
|
||||
PbSetInt(message, "hold_time", holdtime);
|
||||
PbSetInt(message, "flags", flags);
|
||||
PbSetColor(message, "clr", color);
|
||||
Protobuf pb = UserMessageToProtobuf(message);
|
||||
pb.SetInt("duration", duration);
|
||||
pb.SetInt("hold_time", holdtime);
|
||||
pb.SetInt("flags", flags);
|
||||
pb.SetColor("clr", color);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -177,14 +177,14 @@ public Action:Timer_Drug(Handle:timer, any:client)
|
||||
color[1] = GetRandomInt(0,255);
|
||||
color[2] = GetRandomInt(0,255);
|
||||
|
||||
new Handle:message = StartMessageEx(g_FadeUserMsgId, clients, 1);
|
||||
|
||||
Handle message = StartMessageEx(g_FadeUserMsgId, clients, 1);
|
||||
if (GetUserMessageType() == UM_Protobuf)
|
||||
{
|
||||
PbSetInt(message, "duration", duration);
|
||||
PbSetInt(message, "hold_time", holdtime);
|
||||
PbSetInt(message, "flags", flags);
|
||||
PbSetColor(message, "clr", color);
|
||||
Protobuf pb = UserMessageToProtobuf(message);
|
||||
pb.SetInt("duration", duration);
|
||||
pb.SetInt("hold_time", holdtime);
|
||||
pb.SetInt("flags", flags);
|
||||
pb.SetColor("clr", color);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user