so i was going over my voice codes and, i found a bit problem with it,
when i click on my npc it start talking, and while its talking i also clicked on another npc they both started talking which was annoying,
now is it possible to make when 1 is talking and if i click on another one it should cancelled the first one.
when i click on my npc it start talking, and while its talking i also clicked on another npc they both started talking which was annoying,
now is it possible to make when 1 is talking and if i click on another one it should cancelled the first one.
Code:
_String _string = new _String(true);
_string.UID = client.Entity.UID;
_string.TextsCount = 2;
_string.Type = _String.Sound;
_string.Texts.Add("voice/NPC_10081.wav");
_string.Texts.Add("1");
client.Send(_string);
Code:
public byte[] ToArray()
{
ushort entirelength = 19;
foreach (string list in Texts)
entirelength += (ushort)(list.Length + 1);
byte[] buffer = new byte[entirelength];
WriteUInt16((ushort)(entirelength - 8), 0, buffer);
WriteUInt16(1015, 2, buffer);
WriteUInt32(UID, 4, buffer);
buffer[8] = Type;
Buffer = buffer;
WriteStringList(Texts, 9, Buffer);
return Buffer;
}