PDA

View Full Version : [Searching] CSGO Plugin that sends messages


NicDOU
12-08-2020, 20:58
Hi! Im searching a plugin that sends messages in the chat every defined time. In which I can personalize your message. Thnaks for the help!

Rugal
12-09-2020, 06:16
Hi! Im searching a plugin that sends messages in the chat every defined time. In which I can personalize your message. Thnaks for the help!

Need a plugin to send messages at a specific time?
Or a plugin that automatically sends messages on your server?
Please explain.

NicDOU
12-09-2020, 10:32
Need a plugin to send messages at a specific time?
Or a plugin that automatically sends messages on your server?
Please explain.

A plugin that automatically sends messages

L4D2Noob
12-09-2020, 10:43
The plugin either sends messages after a certain cycle. Or if any condition is met.
Tell me more. Why should everyone think for you?

GsiX
12-09-2020, 11:03
GsiX got you covered..


#pragma semicolon 1
#pragma newdecls required
#include <sourcemod>
#include <sdktools>

#define CHAT_TAG "NicDOU"

#define CHAT_INTERVAL 10.0 // chat message every 10 sec after round start
#define CHAT_MSG "This is a Christmas Announchment" // this is chat message

#define HINT_INTERVAL 15.0 // Hint message every 15 sec after round start
#define HINT_MSG "Tell Everyone Santa Come Into Town" // This is the Hint message

Handle g_hChat = null;
Handle g_hHint = null;

bool CHAT_ENABLE = true; // true = enable | false = disable chat
bool HINT_ENABLE = true; // true = enable | false = disable hint

public Plugin myinfo =
{
name = "nicdou_announcement",
author = "NicDOU",
description = "Awesome Auto Message",
version = "1.0.0",
url = ""
};

public void OnPluginStart()
{
HookEvent( "round_start", Event_RoundStartEnd );
HookEvent( "round_end", Event_RoundStartEnd );
}

public void OnMapStart()
{
delete g_hChat;
delete g_hHint;
}

public Action Event_RoundStartEnd(Event event, const char[] name, bool dontBroadcast)
{
if( StrEqual( name, "round_start", false ))
{
if( CHAT_ENABLE )
{
delete g_hChat;
g_hChat = CreateTimer( CHAT_INTERVAL, Timer_Interval_Chat, 0, TIMER_REPEAT );
}

if( HINT_ENABLE )
{
delete g_hHint;
g_hHint = CreateTimer( HINT_INTERVAL, Timer_Interval_Hint, 0, TIMER_REPEAT );
}
}
else if( StrEqual( name, "round_end", false ))
{
delete g_hChat;
delete g_hHint;
}
}

public Action Timer_Interval_Chat( Handle timer, any userid )
{
PrintToChatAll( "\x03[%s]:\x05 ", CHAT_TAG, CHAT_MSG );
}

public Action Timer_Interval_Hint( Handle timer, any userid )
{
PrintHintTextToAll( "%s", HINT_MSG );
}
.

The plugin either sends messages after a certain cycle. Or if any condition is met.
Tell me more. Why should everyone think for you?

sometime we don't ask. :oops:

Rugal
12-09-2020, 12:10
A plugin that automatically sends messages

Here is a perfect plugin for that, just configure it.

https://forums.alliedmods.net/showthread.php?p=2199152