i trying this and dont working
PHP Code:
new UserMsg:g_FadeUserMsgId;
PerformBlind(client, target, amount)
{
new targets[2];
targets[0] = target;
new duration = 1536;
new holdtime = 1536;
new flags;
if (amount == 0)
{
flags = (0x0001 | 0x0010);
}
else
{
flags = (0x0002 | 0x0008);
}
new color[4] = { 0, 0, 0, 0 };
color[3] = amount;
Handle message = StartMessageEx(g_FadeUserMsgId, targets, 1);
if (GetUserMessageType() == UM_Protobuf)
{
Protobuf pb = UserMessageToProtobuf(message);
pb.SetInt("duration", duration);
pb.SetInt("hold_time", holdtime);
pb.SetInt("flags", flags);
pb.SetColor("clr", color);
}
else
{
BfWrite bf = UserMessageToBfWrite(message);
bf.WriteShort(duration);
bf.WriteShort(holdtime);
bf.WriteShort(flags);
bf.WriteByte(color[0]);
bf.WriteByte(color[1]);
bf.WriteByte(color[2]);
bf.WriteByte(color[3]);
}
EndMessage();
LogAction(client, target, "\"%L\" set blind on \"%L\", amount %d.", client, target, amount);
}
in command
PHP Code:
new target = i;
new amount = 255;
PerformBlind(client, target, amount);