Raised This Month: $51 Target: $400
 12% 

[CSS] Soccer Mod


Post New Thread Reply   
 
Thread Tools Display Modes
Author
EGood
Member
Join Date: Feb 2011
Location: Israel
Plugin ID:
3030
Plugin Version:
1.0
Plugin Category:
Gameplay
Plugin Game:
Counter-Strike: Source
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    soccer mod
    Old 06-20-2012 , 09:19   [CSS] Soccer Mod
    Reply With Quote #1

    Soccer Mod CSS

    Credits:
    Me, For starting the plugin.
    Franc1sco for a SoccerMod code.
    Shaman Plugin: Sprint: Source codes.

    * Auto Respawn
    * Sprint
    * Soccer Mix Mod
    =============

    Cvars :
    =============
    sm_soccer_enable 1/0
    sm_sprint_enable 1/0
    sm_sprint_time X
    sm_sprint_cooldown X
    sm_sprint_speed X
    sm_soccer_respawn_enable 1/0
    sm_soccer_respawn_delay X
    sm_soccer_mixmod_enable 1/0
    =============

    Defaults

    =============
    sm_soccer_enable 1
    sm_sprint_enable 1
    sm_sprint_time 3
    sm_sprint_cooldown 7
    sm_sprint_speed 1.4
    sm_soccer_respawn_enable 1
    sm_soccer_respawn_delay 7
    sm_soccer_mixmod_enable 0

    =============

    Commands :

    Sprint = Bind X Sprint
    sm_info
    sm_score
    sm_start
    sm_stop
    sm_live
    sm_spec

    =============

    Goals = Frags


    New
    Attached Files
    File Type: sp Get Plugin or Get Source (soccermod.sp - 1330 views - 15.8 KB)

    Last edited by EGood; 06-20-2012 at 19:58.
    EGood is offline
    shavit
    AlliedModders Donor
    Join Date: Dec 2011
    Location: Israel
    Old 06-20-2012 , 09:46   Re: [CSS] Soccer Mod
    Reply With Quote #2

    To get the plugin tracked use a public cvar, use a version cvar [recommended] with the FCVAR_NOTIFY flag.
    Also, please credit iDragon for the mix commands. [I think he made them]

    Some fixes:
    "jointeam" Command is a game based command, you need to use AddCommandListener instead of RegConsoleCmd for that.
    Change it to:
    Code:
    AddCommandListener(Command_Team, "jointeam");
    And the Action to:
    Code:
    public Action:Command_Team(client, const String:command[], args)
    Mix change team is using a return in a if statement, also the return is after the if statement, so you dont need to use it here. [you are using the same return]
    __________________
    retired

    Last edited by shavit; 07-07-2012 at 15:59.
    shavit is offline
    minimoney1
    SourceMod Donor
    Join Date: Dec 2010
    Old 06-20-2012 , 09:53   Re: [CSS] Soccer Mod
    Reply With Quote #3

    Quote:
    Originally Posted by shavit View Post
    Very nice!
    To get the plugin tracked use a public cvar, use a version cvar [recommended] with the FCVAR_NOTIFY flag.
    Also, please credit iDragon for the mix commands. [I think he made them]

    Some fixes:
    "jointeam" Command is a game based command, you need to use AddCommandListener instead of RegConsoleCmd for that.
    Change it to:
    Code:
    AddCommandListener(Command_Team, "jointeam");
    And the Action to:
    Code:
    public Action:Command_Team(client, const String:command[], args)
    Mix change team is using a return in a if statement, also the return is after the if statement, so you dont need to use it here. [you are using the same return]
    That's an optimization, but he certainly does not need to do that.
    minimoney1 is offline
    shavit
    AlliedModders Donor
    Join Date: Dec 2011
    Location: Israel
    Old 06-20-2012 , 09:54   Re: [CSS] Soccer Mod
    Reply With Quote #4

    Quote:
    Originally Posted by minimoney1 View Post
    That's an optimization, but he certainly does not need to do that.
    The jointeam part is needed for the mix commands.
    __________________
    retired
    shavit is offline
    minimoney1
    SourceMod Donor
    Join Date: Dec 2010
    Old 06-20-2012 , 10:10   Re: [CSS] Soccer Mod
    Reply With Quote #5

    I'm saying that using RegConsoleCmd() hooks to an already existing command if it finds one, and if it doesn't then it creates a new one, meaning in this case, RegConsoleCmd() would work exactly like AddCommandListener(), but AddCommandListener() would be faster in this case, as RegConsoleCmd() is doing some unnecessary tasks, so it's an optimization, but it's definitely not necessary.
    minimoney1 is offline
    EGood
    Member
    Join Date: Feb 2011
    Location: Israel
    Old 06-20-2012 , 10:30   Re: [CSS] Soccer Mod
    Reply With Quote #6

    Edited .. fix bug !
    ty Shavit
    EGood is offline
    Franc1sco
    Veteran Member
    Join Date: Oct 2010
    Location: Spain (Madrid)
    Old 06-20-2012 , 11:59   Re: [CSS] Soccer Mod
    Reply With Quote #7

    Nice but the code is similar to https://forums.alliedmods.net/showthread.php?p=1473145 and http://forums.alliedmods.net/showthread.php?p=503946 so you should mention.

    My soccermod plugin is a very basic soccer plugin for servers that do not want to put the EventScripts for the ES soccer mod.

    I did not improve my plugin because there was already an exceptional EventScripts plugin for soccermod and I not have time for improve this. So if you want to continue improving it then ahead, but do not forget to mention those who have been involved.
    __________________
    Veteran Coder -> Activity channel
    Coding on CS2 and taking paid and free jobs.

    Contact: Steam, Telegram or discord ( franug ).

    You like my work? +Rep in my steam profile comments or donate.

    Franc1sco is offline
    Send a message via MSN to Franc1sco
    ahmadaddin
    New Member
    Join Date: Apr 2013
    Old 04-05-2013 , 19:10   Re: [CSS] Soccer Mod
    Reply With Quote #8

    Cvars :
    =============
    sm_soccer_enable 1/0
    sm_sprint_enable 1/0
    sm_sprint_time X
    sm_sprint_cooldown X
    sm_sprint_speed X
    sm_soccer_respawn_enable 1/0
    sm_soccer_respawn_delay X
    sm_soccer_mixmod_enable 1/0
    =============

    Defaults

    =============
    sm_soccer_enable 1
    sm_sprint_enable 1
    sm_sprint_time 3
    sm_sprint_cooldown 7
    sm_sprint_speed 1.4
    sm_soccer_respawn_enable 1
    sm_soccer_respawn_delay 7
    sm_soccer_mixmod_enable 0

    =============

    Commands :

    Sprint = Bind X Sprint
    sm_info
    sm_score
    sm_start
    sm_stop
    sm_live
    sm_spec

    =============

    Goals = Frags[/I][/B]

    New[/QUOTE]

    Where i put the CVARS And command?? sorry newbie
    ahmadaddin is offline
    cREANy0
    SourceMod Donor
    Join Date: Jul 2012
    Location: Germany
    Old 04-05-2013 , 20:05   Re: [CSS] Soccer Mod
    Reply With Quote #9

    You can put it into the

    Code:
     Server.cfg @ cfg/server.cfg
    or

    Code:
    Sourcemod.cfg @ cfg/sourcemod/sourcemod.cfg


    greetz cREANy0
    __________________
    cREANy0 is offline
    Blazemonkey
    Junior Member
    Join Date: Apr 2013
    Location: bc.ca
    Old 05-31-2013 , 02:29   Re: [CSS] Soccer Mod
    Reply With Quote #10

    I'd like to use this mod, but only if I can set the sprint command to whatever key the client's walk key is set to. I've taken a look at the source code, but I'm afraid making such a modification is above my head. Is this sort of thing possible with source mod?
    Blazemonkey is offline
    Reply



    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 14:01.


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