• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

DELAY ONSAY CAST

secondlife

Active Member
Joined
Aug 1, 2009
Messages
302
Reaction score
25
Hello bros,
How i can add a delay 1s to speak in cast channel? i'm using casting by @djarek in tfs 1.2, here is the function.
void ProtocolSpectator::parseSpectatorSay(NetworkMessage& msg)
{
SpeakClasses type = (SpeakClasses)msg.getByte();
uint16_t channelId = 0;

if (type == TALKTYPE_CHANNEL_Y) {
channelId = msg.get<uint16_t>();
} else {
return;
}

const std::string text = msg.getString();

if (text.length() > 255 || channelId != CHANNEL_CAST || !client) {
return;
}

if (client) {
if (client->isSpectatorMuted(spectatorId)) {
sendTextMessage(TextMessage(MESSAGE_STATUS_SMALL, "You have been muted."));
return;
}

if (parseCoomand(text)) {
return;
}

g_dispatcher.addTask(createTask(std::bind(&ProtocolCaster::broadcastSpectatorMessage, client, spectatorName, text)));
}
}
Have any idea?
Hugs!!
 
LOL, my bad... i'm wrong I can't help :/
my idea was create some function that set storage to the spectator to check if is >= os.time() :p
 
What do you mean by cast channel?
bro, my idea was set exhaustion in the "spectator" when he say one time set an exhaustion in he, for the interval choosed the spectator will not talk in the channel.. did you understand? but we can''t set exhaustion in spectator, only if he is an object userdata
he is?
 
Back
Top