Raised This Month: $32 Target: $400
 8% 

Simple Plugins Core


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Antithasys
Moderator
Join Date: Apr 2008
Plugin ID:
1041
Plugin Version:
1.0.90
Plugin Category:
Technical/Development
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
    16 
    Plugin Description:
    Core plugin used in the Simple Plugins project.
    Old 07-26-2009 , 18:16   Simple Plugins Core
    Reply With Quote #1

    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:pluginclientteam);

    /**********************************************************************
     * 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(clientteam);

    /**********************************************************************
     * 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(clientteambool: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(clientplayerbool: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(clientbool: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(clientbool: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
    Attached Files
    File Type: zip Simple SourceMod Plugins Core.zip (18.9 KB, 4180 views)
    __________________
    [my plugins]

    When you think about asking a question... consider what have you tried?

    Last edited by Antithasys; 12-30-2009 at 16:02. Reason: formatting
    Antithasys is offline
    Antithasys
    Moderator
    Join Date: Apr 2008
    Old 07-26-2009 , 18:39   Re: Simple SourceMod Plugins Core
    Reply With Quote #2

    Reserved
    __________________
    [my plugins]

    When you think about asking a question... consider what have you tried?
    Antithasys is offline
    Zuko
    SourceMod Donor
    Join Date: Sep 2006
    Location: Poland
    Old 07-26-2009 , 18:41   Re: Simple SourceMod Plugins Core
    Reply With Quote #3

    Why you put ".svn" directories in zip?
    __________________
    Zuko is offline
    Send a message via ICQ to Zuko
    Antithasys
    Moderator
    Join Date: Apr 2008
    Old 07-26-2009 , 18:43   Re: Simple SourceMod Plugins Core
    Reply With Quote #4

    Pretty sure I removed those. I do not seem them in the zip file. Hmm.
    __________________
    [my plugins]

    When you think about asking a question... consider what have you tried?
    Antithasys is offline
    Zuko
    SourceMod Donor
    Join Date: Sep 2006
    Location: Poland
    Old 07-26-2009 , 18:57   Re: Simple SourceMod Plugins Core
    Reply With Quote #5

    __________________
    Zuko is offline
    Send a message via ICQ to Zuko
    Antithasys
    Moderator
    Join Date: Apr 2008
    Old 07-26-2009 , 19:06   Re: Simple SourceMod Plugins Core
    Reply With Quote #6

    Ok, well they appeared to be more files that were just hidden from me. I think I got it all cleared out and it's just the plugin now.
    __________________
    [my plugins]

    When you think about asking a question... consider what have you tried?
    Antithasys is offline
    Antithasys
    Moderator
    Join Date: Apr 2008
    Old 08-28-2009 , 18:59   Re: Simple SourceMod Plugins Core
    Reply With Quote #7

    Quote:
    1.0.74
    Corrected dir structure error for CSS
    Moved extension loading to .sp file
    Modified code to get more accurate account of when the teams were swapped by the game
    Added extension error reporting and checking
    This should fix the problems that people were having with loading this plugin on CSS and DOD.
    __________________
    [my plugins]

    When you think about asking a question... consider what have you tried?
    Antithasys is offline
    Antithasys
    Moderator
    Join Date: Apr 2008
    Old 08-29-2009 , 13:25   Re: Simple SourceMod Plugins Core
    Reply With Quote #8

    Quote:
    1.0.75
    Moved extension loading back to .inc file
    __________________
    [my plugins]

    When you think about asking a question... consider what have you tried?
    Antithasys is offline
    Jamster
    Veteran Member
    Join Date: Jun 2008
    Old 09-08-2009 , 23:12   Re: Simple SourceMod Plugins Core
    Reply With Quote #9

    I keep getting this with the simple plugins core and with simple spectate loaded. I use SourceTV on the server so I guess that could be the problem here.

    Code:
    L 09/08/2009 - 21:39:53: [SM] Native "ThrowNativeError" reported: Bots are not supported
    L 09/08/2009 - 21:39:53: [SM] Displaying call stack trace for plugin "simple-plugins.smx":
    L 09/08/2009 - 21:39:53: [SM]   [0]  Line 574, C:\Compiler\scripting\simple-plugins.sp::Native_SM_ClearBuddy()
    L 09/08/2009 - 21:39:53: [SM] Native "SM_ClearBuddy" reported: Error encountered while processing a dynamic native
    L 09/08/2009 - 21:39:53: [SM] Displaying call stack trace for plugin "simple-plugins.smx":
    L 09/08/2009 - 21:39:53: [SM]   [0]  Line 182, C:\Compiler\scripting\simple-plugins.sp::OnClientDisconnect()
    Jamster is offline
    zerosin
    Member
    Join Date: Sep 2005
    Location: San Francisco
    Old 09-14-2009 , 16:32   Re: Simple SourceMod Plugins Core
    Reply With Quote #10

    Hey there,
    I'm getting this error as well, hope we can resolve this issue, I wonder if this is why simple_teambalancer is not working as well for me.

    MM 1.7.1
    SM 1.2.3

    Code:
    L 09/14/2009 - 13:15:08: [SM] Native "ThrowNativeError" reported: Bots are not supported
    L 09/14/2009 - 13:15:08: [SM] Displaying call stack trace for plugin "simple-plugins.smx":
    L 09/14/2009 - 13:15:08: [SM]   [0]  Line 574, C:\Compiler\scripting\simple-plugins.sp::Native_SM_ClearBuddy()
    L 09/14/2009 - 13:15:08: [SM] Native "SM_ClearBuddy" reported: Error encountered while processing a dynamic native
    L 09/14/2009 - 13:15:08: [SM] Displaying call stack trace for plugin "simple-plugins.smx":
    L 09/14/2009 - 13:15:08: [SM]   [0]  Line 182, C:\Compiler\scripting\simple-plugins.sp::OnClientDisconnect()
    Thanks in advance
    zero
    zerosin is offline
    Reply


    Thread Tools
    Display Modes

    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is On
    HTML code is Off

    Forum Jump


    All times are GMT -4. The time now is 07:46.


    Powered by vBulletin®
    Copyright ©2000 - 2024, vBulletin Solutions, Inc.
    Theme made by Freecode