Simple Plugins Core
Description:
Core plugin used in the Simple Plugins project.
Console Variables:None.
Installation:Place the simple-plugins.smx in the /sourcemod/plugins dir.
Place the simple-plugins.inc in the /sourcemod/scripting/include dir. (optional)
Changelog:
Quote:
1.0.90
Added bot check to disconnect function
|
Include File
PHP Code:
/**********************************************************************
* When a player has to moved
*
* @param plugin Plugin that initiated the move
* @param client The client index of the player that was moved
* @param team The team index the player was moved to
* @noreturn
**********************************************************************/
forward SM_OnPlayerMoved(Handle:plugin, client, team);
/**********************************************************************
* Move a player to the supplied team
*
* @param client The client index of the player to be moved
* @param team The team to move the player to
* @noreturn
* @error Invalid client or team index
**********************************************************************/
native SM_MovePlayer(client, team);
/**********************************************************************
* Move a player to the supplied team
*
* @param client The client index of the player to set
* @param team The team to move the to set
* @param override Whether or not to override another plugin
* @return True if successful, false if not
* @error Invalid client or team index
**********************************************************************/
native SM_SetForcedTeam(client, team, bool:override = false);
/**********************************************************************
* Gets the client's forced team index
*
* @param client The client index of the player to check
* @param plugin Optional: The plugin handle of the plugin
that set the team
* @return The team index of the forced team
Zero if no forced team
* @error Invalid client index
**********************************************************************/
native SM_GetForcedTeam(client, &Handle:plugin = INVALID_HANDLE);
/**********************************************************************
* Clears a client's forced team
*
* @param client The client index of the player to check
* @return True if successful, false if not
* @error Invalid client index
**********************************************************************/
native SM_ClearForcedTeam(client);
/**********************************************************************
* Gets a forced player on the wrong that is currently on the wrong team
* This will only return a player if the calling plugin assigned the team
*
* @param team The team index the player should be on
* @return The client index of the player
Zero if no player found
* @error Invalid client index
**********************************************************************/
native SM_GetForcedPlayer(team);
/**********************************************************************
* Assign a players buddy
*
* @param client The client index of the player to assign
* @param player The player index of the player to assign
* @param override Whether or not to override a player lock
* @return True if successful, false if not
* @error Invalid client or player index
**********************************************************************/
native bool:SM_AssignBuddy(client, player, bool:override = false);
/**********************************************************************
* Rturns the client's buddy
*
* @param client The client index of the player to assign
* @return The client index of the player's buddy
Zero if no buddy
* @error Invalid client index
**********************************************************************/
native SM_GetClientBuddy(client);
/**********************************************************************
* Set the buddy lock setting for a client
*
* @param client The client index of the player to assign
* @param setting Setting to set, True or False
* @return True if successful, false if not
* @error Invalid client index
**********************************************************************/
native bool:SM_LockBuddy(client, bool:setting);
/**********************************************************************
* Returns the buddy lock setting for a client
*
* @param client The client index of the player to assign
* @return True if locked, false if not
* @error Invalid client index
**********************************************************************/
native bool:SM_IsBuddyLocked(client);
/**********************************************************************
* Clear a players buddy
*
* @param client The client index of the player to clear
* @param override Whether or not to override a player lock
* @return True if successful, false if not
* @error Invalid client index
**********************************************************************/
native bool:SM_ClearBuddy(client, bool:override = false);
/**********************************************************************
* Determine if the player has the supplied flags
* ADMFLAG_ROOT will always return true
*
* @param client The client index of the player to assign
* @param flags The char flag(s) to check against
* @return True if valid, false if not
**********************************************************************/
native bool:SM_IsValidAdmin(client, const String:flags[]);
/**********************************************************************
* Determine if the team is a valid team
*
* @param team The team index to determine if valid for
currently installed/supported mod
* @return True if valid, false if not
**********************************************************************/
native bool:SM_IsValidTeam(team);
Features/Bugs:
Please use the
project site to report all bugs and request additional features.
Notes:
This plugin by itself does nothing. This plugin is the
core plugin for the following other plugins:
Simple Team Balancer
Simple Team Manager
Simple Spectate
More Coming Soon!
If you want to use any of the above plugins you will need this plugin as well. Of course, anyone else is free to use this for their own plugins too!
There was an issue with the tf2.inc file that comes with sourcemod. I therefore updated that file and also included it in the .zip file.
Plugin is compiled in
1.2.3