diff --git a/SourceTV/scripting/SourceTV.sp b/SourceTV/scripting/SourceTV.sp new file mode 100644 index 00000000..4da2ff63 --- /dev/null +++ b/SourceTV/scripting/SourceTV.sp @@ -0,0 +1,38 @@ +#include +#include +#include + +#pragma newdecls required + +public Plugin myinfo = { + name = "SourceTV", + author = "BotoX", + description = "SourceTV", + version = "1.0", + url = "" +} + +public void OnPluginStart() +{ + +} + +public void SourceTV_OnSpectatorPutInServer(int client) +{ + static char sName[64]; + static char sIP[16]; + static char sCountry[32]; + + SourceTV_GetClientName(client, sName, sizeof(sName)); + + if(SourceTV_GetClientIP(client, sIP, sizeof(sIP)) && GeoipCountry(sIP, sCountry, sizeof(sCountry))) + PrintToChatAll("\x04[\x03SourceTV\x04] %s connected from %s", sName, sCountry); + else + PrintToChatAll("\x04[\x03SourceTV\x04] %s connected", sName); +} + +public Action SourceTV_OnSpectatorChatMessage(int client, char message[255], char chatgroup[255]) +{ + PrintToChatAll("\x04[\x03SourceTV\x04]\x01 %s", message); + return Plugin_Handled; +}