[ANY] Favorite Connections
Special thanks to Wolvan for the example and helping me with forwards.
Description:
Small plugin for developers to use as an API using the forward "ClientConnectedViaFavorites" to detect when a player connects through his/her favorites.
Please note that this plugin ALONE literally does nothing and only serves as an API for developers.
Side note: this is my first plugin to publish on here and I am still pretty new to Sourcepawn. Any suggestions are more than welcome, but please be nice!
Dependencies:
Due to the use of "cl_connectmethod", this plugin only works on the following games:
- Team Fortress 2
- Day of Defeat: Source
- Counter-Strike: Source
- Half Life 2: Deathmatch
CVARS:- favoriteconnections_version - Plugin version, no touchy!
- favoriteconnections_enable [0/1] - (Default = 1) Enable plugin = 1 Disable plugin = 0
Forward:
Code:
forward Action:ClientConnectedViaFavorites(client);
Example:
Code:
public Action:ClientConnectedViaFavorites(client)
{
new String:name[MAX_NAME_LENGTH];
GetClientName(client, name, sizeof(name));
PrintToChatAll("%s joined this server through his/her favorites! Thank you!", name);
return Plugin_Continue;
}
Please note that the callback on the end is Plugin_Continue!
Plugins That Use Favorite Connestions:
Changelog:
Installation:- favoriteconnections.smx -> (game)/addons/sourcemod/plugins/
- (for developers) favoriteconnections.sp -> (game)/addons/sourcemod/scripting/
Want to support me?- Leave some feedback of this plugin and/or a suggestion.