Automated response
crashzk opened this issue · 1 comments
crashzk commented
It would be interesting if the plugin had the automated response function.
HOW IT WILL WORK
I would set up a message in the plugin configuration file, example:
[...]
"2"
{
"pt" "Visit our Site - siteexample.com"
"type" "T"
"trigger" "!site"
}
The Trigger function would be an example of what you could use to use this function in the plugin.
EXAMPLE OF A PLUGIN WITH THE FOLLOWING FUNCTION
I do not know if it helps but I found a plugin that does this already, but it would be perfect if you could implement it in ServerAdvertisement3.
#include <sourcemod>
public OnPluginStart()
{
RegConsoleCmd("sm_groupsteam", Command_GrupoSteam);
RegConsoleCmd("sm_discord", Command_Discord);
}
public Action Command_GrupoSteam(int client, int args)
{
if (IsValidClient(client))
PrintToChat(client, "Grupo Steam: https://steamcommunity.com/groups/LINK_GRUPOSTEAM");
}
public Action Command_Discord(int client, int args)
{
if (IsValidClient(client))
PrintToChat(client, "Discord: https://LINK_DISCORD");
}
stock bool IsValidClient(int client)
{
if (!( 1 <= client <= MaxClients ) || !IsClientInGame(client))
return false;
if (IsFakeClient(client))
return false;
return true;
}
ESK0 commented
Nice idea, will be added probably.