Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #pragma semicolon 1
- #include <sourcemod>
- #include <morecolors>
- #define PLUGIN_VERSION "1.1"
- new Handle:g_hCV_Enabled;
- public Plugin:myinfo =
- {
- name = "Favorite Connections",
- author = "RIP?",
- description = "Detect when a player connects to the server via favorites."
- };
- public OnPluginStart()
- {
- LoadTranslations("favoriteconnections.phrases");
- g_hCV_Enabled = CreateConVar("favoriteconnections_enable", "1", "Enable the plugin? 1 = Enable, 0 = Disable");
- }
- public OnClientPostAdminCheck(client)
- {
- if (!GetConVarBool(g_hCV_Enabled))
- {
- return;
- }
- doCheck(client);
- }
- doCheck(client)
- {
- new String:sMethod[32];
- if (GetClientInfo(client, "cl_connectmethod", sMethod, sizeof(sMethod)))
- {
- if (StrEqual(sMethod, "serverbrowser_favorites"))
- {
- for(new i = 1; i <= MaxClients; i++)
- {
- CPrintToChat(i, "%T", "fav connection", i, client);
- }
- AddUserFlags(client, Admin_Custom1);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement