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

[CS:GO] Multi-1v1 (v1.1.10, 2021-10-30)


Post New Thread Reply   
 
Thread Tools Display Modes
splewis
Veteran Member
Join Date: Feb 2014
Location: United States
Old 06-10-2014 , 01:12   Re: [CS:GO] Multi-1v1 (v0.3.2, 2014-6-05)
Reply With Quote #21

Quote:
Originally Posted by dv9unknown View Post
I compiled it exactly the way I described in the comment below. I guess Ill try compiling it in Linux.
https://github.com/splewis/csgo-multi-1v1/blob/master/csgo/addons/sourcemod/scripting/multi1v1.sp#L140


The Cvar is called
Code:
sm_multi1v1_record_connect_times
note the s at the end


I tried playing with your php site, but my incompetence is making it hard for me to get it running, though I saw it in use on another server earlier, it looks good! I'll try to pull it in soon. I'll also have to think about how to organize the repo. I think I might follow sourcebans' idea of a game_upload directory with the plugin and a web_upload directory with the web interface, for releases at least.

Using the last connect time might be worth displaying if you want to (it's in seconds since the unix epoch, too), though I just store it to prevent squatters at the high ranks :p
__________________

Last edited by splewis; 06-10-2014 at 20:11.
splewis is offline
Scuba
Junior Member
Join Date: Jun 2014
Old 06-10-2014 , 15:02   Re: [CS:GO] Multi-1v1 (v0.3.2, 2014-6-05)
Reply With Quote #22

Thank you for this plugin, it is awesome.

I would like to install it on my server, however I have one question.

Is there a way for me to toggle this plugin on and off, as well as the workshop collection??

I run a community of guys that all like to play a little bit of everything, and this 1v1 mode would be fun for us to play after meetings, but would like it to revert back to typical competitive mode afterwards.

Is this possible?

Thanks a bunch,

Scuba
Scuba is offline
dv9unknown
Senior Member
Join Date: Aug 2009
Old 06-10-2014 , 21:01   Re: [CS:GO] Multi-1v1 (v0.3.2, 2014-6-05)
Reply With Quote #23

Quote:
Originally Posted by splewis View Post
https://github.com/splewis/csgo-multi-1v1/blob/master/csgo/addons/sourcemod/scripting/multi1v1.sp#L140


The Cvar is called
Code:
sm_multi1v1_record_connect_times
note the s at the end


I tried playing with your php site, but my incompetence is making it hard for me to get it running, though I saw it in use on another server earlier, it looks good! I'll try to pull it in soon. I'll also have to think about how to organize the repo. I think I might follow sourcebans' idea of a game_upload directory with the plugin and a web_upload directory with the web interface, for releases at least.

Using the last connect time might be worth displaying if you want to (it's in seconds since the unix epoch, too), though I just store it to prevent squatters at the high ranks :p
Yep, ATM, I'm implementing a feature to display if a user is active/inactive. I'm not sure how I am going to go about making the rate removal more admin-friendly since the PHP script is only run if the the page is viewed by a user. It is possible, but the admin would have to set up a cron job on their webserver to run the script and update the tables.

Edit: Regarding the site not running, all you have to do is set up the config.inc.php file with your MySQL credentials. It should be the same as it is in your Python program. The only thing you might, possibly, maybe have to change is the MySQL query in index.php and search.php. The default table name you gave was 'multi1v1_stats' but if you have that changed on your end all you need to do is replace all instances of 'multi1v1_stats' with whatever your table is names. I'll probably add that setting to the config.inc.php file.

Edit 2: Any specific errors you are getting?

Last edited by dv9unknown; 06-10-2014 at 21:23.
dv9unknown is offline
splewis
Veteran Member
Join Date: Feb 2014
Location: United States
Old 06-10-2014 , 22:24   Re: [CS:GO] Multi-1v1 (v0.3.2, 2014-6-05)
Reply With Quote #24

Quote:
Originally Posted by dv9unknown View Post
Yep, ATM, I'm implementing a feature to display if a user is active/inactive. I'm not sure how I am going to go about making the rate removal more admin-friendly since the PHP script is only run if the the page is viewed by a user. It is possible, but the admin would have to set up a cron job on their webserver to run the script and update the tables.

Edit: Regarding the site not running, all you have to do is set up the config.inc.php file with your MySQL credentials. It should be the same as it is in your Python program. The only thing you might, possibly, maybe have to change is the MySQL query in index.php and search.php. The default table name you gave was 'multi1v1_stats' but if you have that changed on your end all you need to do is replace all instances of 'multi1v1_stats' with whatever your table is names. I'll probably add that setting to the config.inc.php file.

Edit 2: Any specific errors you are getting?
Don't worry about me yet, I'm pretty sure I'm setting up the configuration incorrectly, I'll let you know if I can't get it working though. (I was trying to showcase it on my website but it still displays the regular site, I'm probably forgetting something for apache)


With regards to the connection times, I pretty much do that. I have a cron job run once a day that does:

Code:
        if elapsed_time_days > 1.0 and lastTime > 0 and rating > 1500.0:
            rating_loss = 40.0  * elapsed_time_days * (rating - 1500.0) / rating
            new_rating = rating - rating_loss
            # update rating in database

       # update lastTime to current time
I only put this together yesterday, so the 40.0 is a arbitrary constant I might change. Make sure you check if lastTime != 0 since that's the default value. For backwards compatibility it won't be guaranteed to be recorded.



Quote:
Originally Posted by Scuba View Post
Thank you for this plugin, it is awesome.

I would like to install it on my server, however I have one question.

Is there a way for me to toggle this plugin on and off, as well as the workshop collection??

I run a community of guys that all like to play a little bit of everything, and this 1v1 mode would be fun for us to play after meetings, but would like it to revert back to typical competitive mode afterwards.

Is this possible?

Thanks a bunch,

Scuba
I see the use, I actually tested the plugin while waiting for friends to join my server for a 10-man. I'll work on a way to enable/disable the plugin, but it can be kinda tricky so it might be a little while. For the time being I can suggest adding https://forums.alliedmods.net/showthread.php?t=182086 and you can disable/enable the plugin with 1 console command and change map.

For map collections, I'm not sure what you mean. I don't see why you'd ever really want to "disable" using the workshop. I'd suggest making your own workshop collection and add whatever you want so you have full control.
__________________

Last edited by splewis; 06-10-2014 at 22:28.
splewis is offline
dv9unknown
Senior Member
Join Date: Aug 2009
Old 06-11-2014 , 20:22   Re: [CS:GO] Multi-1v1 (v0.3.2, 2014-6-05)
Reply With Quote #25

Quote:
Originally Posted by splewis View Post
With regards to the connection times, I pretty much do that. I have a cron job run once a day that does:

Code:
        if elapsed_time_days > 1.0 and lastTime > 0 and rating > 1500.0:
            rating_loss = 40.0  * elapsed_time_days * (rating - 1500.0) / rating
            new_rating = rating - rating_loss
            # update rating in database

       # update lastTime to current time
I only put this together yesterday, so the 40.0 is a arbitrary constant I might change. Make sure you check if lastTime != 0 since that's the default value. For backwards compatibility it won't be guaranteed to be recorded.
Okay, so I just finished adding the rate removal feature, added a variable in the config file to change the constant and made it so the file can only be accessed by the local machine and not any malicious user trying to remove people's points. ATM, I'm just polishing/changing stuff up.
dv9unknown is offline
splewis
Veteran Member
Join Date: Feb 2014
Location: United States
Old 06-11-2014 , 23:31   Re: [CS:GO] Multi-1v1 (v0.3.2, 2014-6-05)
Reply With Quote #26

I believe the recent update broke the CS_SetClientClanTag(client, tag); function for Windows (my linux server is fine). If you want your server back ASAP I would suggest commenting out that function and recompiling.

It's in SetupPlayer of multi1v1.sp.

The gamedata from sourcemod should update to fix that function pretty soon.
__________________

Last edited by splewis; 06-12-2014 at 00:13.
splewis is offline
Prime247cs
Junior Member
Join Date: Aug 2013
Old 06-13-2014 , 17:57   Re: [CS:GO] Multi-1v1 (v0.3.2, 2014-6-05)
Reply With Quote #27

Sorry for me question and hopefully noone comes with the RTFM

I am new to GO, old to 1.6 and this was friggin hard a few weeks ago. Now I have alot bigger understanding of how sourcemod works but still, I need help. I have googeled I have searched this forum and I have gone blind to find what I seek.

I get this plugin to work with standard maps like dust2 and so on, but as soon as I add workshop maps the server hibernates. Anyone kind out there whant to give me a point in the right direction?? Would appreciate it very much



Prime
Prime247cs is offline
dv9unknown
Senior Member
Join Date: Aug 2009
Old 06-13-2014 , 18:38   Re: [CS:GO] Multi-1v1 (v0.3.2, 2014-6-05)
Reply With Quote #28

Quote:
Originally Posted by Prime247cs View Post
Sorry for me question and hopefully noone comes with the RTFM

I am new to GO, old to 1.6 and this was friggin hard a few weeks ago. Now I have alot bigger understanding of how sourcemod works but still, I need help. I have googeled I have searched this forum and I have gone blind to find what I seek.

I get this plugin to work with standard maps like dust2 and so on, but as soon as I add workshop maps the server hibernates. Anyone kind out there whant to give me a point in the right direction?? Would appreciate it very much



Prime
You're in the wrong subforum. Try "sv_hibernate_when_empty 0".


Getting back on topic, this has probably been suggested before, but a feature where players can request to 1v1 another player in a private arena would be nice. Ranking could optionally be disabled in there.

Last edited by dv9unknown; 06-13-2014 at 18:50.
dv9unknown is offline
Scuba
Junior Member
Join Date: Jun 2014
Old 06-13-2014 , 18:54   Re: [CS:GO] Multi-1v1 (v0.3.2, 2014-6-05)
Reply With Quote #29

Quote:
Originally Posted by splewis View Post
I see the use, I actually tested the plugin while waiting for friends to join my server for a 10-man. I'll work on a way to enable/disable the plugin, but it can be kinda tricky so it might be a little while. For the time being I can suggest adding https://forums.alliedmods.net/showthread.php?t=182086 and you can disable/enable the plugin with 1 console command and change map.

For map collections, I'm not sure what you mean. I don't see why you'd ever really want to "disable" using the workshop. I'd suggest making your own workshop collection and add whatever you want so you have full control.
Thank you for that disable/enable plugin, that is sufficient for my use.

With respect to the workshop, what I mean was, is there a way to switch collections back and forth? Im afraid if I have my standard collection I'm already subscribed to, and I add all of the 1v1 maps to my collection, then when it switches, someone will have to enable the plugin, no? Or can the plugin automatically be turned on upon switching the server to a 1v1 map? That would be the ideal situation, have it shut off upon switching maps, and turn on automatically when one of the 1v1 maps is loaded.
Scuba is offline
dv9unknown
Senior Member
Join Date: Aug 2009
Old 06-13-2014 , 20:03   Re: [CS:GO] Multi-1v1 (v0.3.2, 2014-6-05)
Reply With Quote #30

Quote:
Originally Posted by Scuba View Post
Thank you for that disable/enable plugin, that is sufficient for my use.

With respect to the workshop, what I mean was, is there a way to switch collections back and forth? Im afraid if I have my standard collection I'm already subscribed to, and I add all of the 1v1 maps to my collection, then when it switches, someone will have to enable the plugin, no? Or can the plugin automatically be turned on upon switching the server to a 1v1 map? That would be the ideal situation, have it shut off upon switching maps, and turn on automatically when one of the 1v1 maps is loaded.
Take a look here: https://forums.alliedmods.net/showthread.php?t=62087
dv9unknown 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 16:32.


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