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

[ANY] Would You Rather.. v1.0


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Mitchell
~lick~
Join Date: Mar 2010
Plugin ID:
5535
Plugin Version:
1.0.0
Plugin Category:
Fun Stuff
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    A simple version of the game Would You Rather
    Old 02-15-2017 , 19:12   [ANY] Would You Rather.. v1.0
    Reply With Quote #1

    Would You Rather
    A Simple would you rather game that shows in the in game radio menu. Currently there is no tracking of stats, so if a player leaves the server he/she may be answering questions that he has already seen in a previous session. If a client closes the menu then they will have the chance to restart their questions from the beginning, or continue where they left off, if a player restarts they may see questions that were already shown.



    Config

    The config for the questions is setup to be as simple as adding lines to a file or adding an additional file for a new category.

    To add a new category just start an empty file within the /addons/sourcemod/configs/WouldYouRather/ directory. The name of the file is the name of the category.

    To add questions and options to your category just follow the format of

    Code:
    QUESTION|OPTION1|OPTION2
    The delimiter is the '|' character. If you do not have two of the delimiter characters the plugin will unload and tell you what line it is on.

    Convars

    ConVars are auto generated into the /cfg/WouldYouRather.cfg

    Code:
    sm_wouldyourather_random - Default to 1 - When displaying questions to players it will pick a random question from their collection. Set to 0 to go through numerically.
    
    sm_wouldyourather_menuspacer - Default 1 - The menu spacer which is printed as 'Or...', this can be disabled and will show as a normal menu.
    Contributing

    To contribute to the plugin or it's questions please see the contribution guidelines

    Future Plans

    I'm planning on adding a webserver (perferably java) that will communicate through Http requests. This will allow the webserver to hold the stats per player, instead of having the server save all the stats. If I do actually get around to finishing the webserver then it would be in a different destination, as I want to keep them separate.

    Download

    GitHub

    Plugin
    Source

    Last edited by Mitchell; 02-15-2017 at 19:40.
    Mitchell is offline
    404UserNotFound
    BANNED
    Join Date: Dec 2011
    Old 02-16-2017 , 00:45   Re: [ANY] Would You Rather.. v1.0
    Reply With Quote #2

    lol a who would you rather fuck plugin

    yes please add a webpanel that shows all the previous ones done too so i can see all the fucked up shit my admins run through this thing

    Last edited by 404UserNotFound; 02-16-2017 at 00:51.
    404UserNotFound is offline
    Mitchell
    ~lick~
    Join Date: Mar 2010
    Old 02-16-2017 , 02:08   Re: [ANY] Would You Rather.. v1.0
    Reply With Quote #3

    Quote:
    Originally Posted by abrandnewday View Post
    lol a who would you rather fuck plugin

    yes please add a webpanel that shows all the previous ones done too so i can see all the fucked up shit my admins run through this thing
    I was thinking about doing both a webserver version, which holds all the stats and would also hold the questions and options, instead of configs on each of the servers.
    However I was also thinking of just using some kind of quick sql (MySQL/SQLite both) that would send/retrieve stats there. However i was thinking that that sending sql queries every time some one answered a question could be a hazard.

    Maybe i'll do the webserver later as a Java project, as it could be adapted to work with any platform.

    If you know anybody that can do some sick web designing lemme know.

    Edit: let's see if I can't figure out prepared statements for the easiest sql queries. 1.1 Dev branch located here: https://github.com/MitchDizzle/WouldYouRather/tree/1.1

    Last edited by Mitchell; 02-16-2017 at 12:16.
    Mitchell is offline
    404UserNotFound
    BANNED
    Join Date: Dec 2011
    Old 02-16-2017 , 13:16   Re: [ANY] Would You Rather.. v1.0
    Reply With Quote #4

    Yeah, as soon as you get into webpanels and storing info via SQL and calling on it, you have to be extremely careful and make sure you've got any sort of injection prevention. Pain in the ass.

    Last edited by 404UserNotFound; 02-16-2017 at 13:16.
    404UserNotFound is offline
    Mitchell
    ~lick~
    Join Date: Mar 2010
    Old 02-16-2017 , 14:34   Re: [ANY] Would You Rather.. v1.0
    Reply With Quote #5

    Quote:
    Originally Posted by abrandnewday View Post
    Yeah, as soon as you get into webpanels and storing info via SQL and calling on it, you have to be extremely careful and make sure you've got any sort of injection prevention. Pain in the ass.
    If I can re-figure out how Sign-in with Steam works, and secure it, I might be able to use that as the login for admins to add/remove questions. I was also going to make it so the config is auto loaded into the SQL (if they do not exist, plus a convar to turn this off). That way you can have multiple servers running the same questions and holding the same stats. Perhaps with a config to setup admins for adding questions, and another type of admin that can reset all stats from players.
    Mitchell is offline
    404UserNotFound
    BANNED
    Join Date: Dec 2011
    Old 02-16-2017 , 16:08   Re: [ANY] Would You Rather.. v1.0
    Reply With Quote #6

    I've always wanted to set up some form of MOTD-based control panel for admins and even one for donators where they could trigger their benefits and whatnot, but I've noticed in TF2 that the MOTD has a tendency to refresh itself server-wide whenever someone joins the server, causing the MOTD to reload for everyone. It reloads you to the page you were viewing, thank god, but it's still annoying.

    As a result, I've avoided webpanels and such. So I can't quite help you out there D:

    Last edited by 404UserNotFound; 02-16-2017 at 16:08.
    404UserNotFound is offline
    Mitchell
    ~lick~
    Join Date: Mar 2010
    Old 02-16-2017 , 16:58   Re: [ANY] Would You Rather.. v1.0
    Reply With Quote #7

    Quote:
    Originally Posted by abrandnewday View Post
    I've always wanted to set up some form of MOTD-based control panel for admins and even one for donators where they could trigger their benefits and whatnot, but I've noticed in TF2 that the MOTD has a tendency to refresh itself server-wide whenever someone joins the server, causing the MOTD to reload for everyone. It reloads you to the page you were viewing, thank god, but it's still annoying.

    As a result, I've avoided webpanels and such. So I can't quite help you out there D:
    Have you tried using the popup window in tf2, it's nice if you can setup some kind of div with a close button. I have an example that i use in one of my csgo gamemodes i can dig up.

    edit: I think I'm getting to point of not going through the hassle of either or.
    1.0 Will only work only with the text file config, 1.1 and above will only work with a database configured.

    Last edited by Mitchell; 02-16-2017 at 20:51.
    Mitchell is offline
    Mitchell
    ~lick~
    Join Date: Mar 2010
    Old 02-23-2017 , 14:55   Re: [ANY] Would You Rather.. v1.0
    Reply With Quote #8

    If anybody is interested in a MySQL/SQLite verion of this plugin I have a stable(ish) branch here with the database features. https://github.com/MitchDizzle/WouldYouRather/tree/1.1
    I say stable-ish because there can be issues with database connections etc that I have not been able to test fully. However from what I have tested through mySQL and SQLite it works great.
    Mitchell is offline
    psychonic

    BAFFLED
    Join Date: May 2008
    Old 02-23-2017 , 15:10   Re: [ANY] Would You Rather.. v1.0
    Reply With Quote #9

    Not completely ontopic, but seeing this just gave me a similar idea (that I don't plan to follow up on).

    A sort of mashup between Would You Rather and RTD, where it lists two options/effects randomly rolled (both good or both bad) and you have to choose between them... and then it sometimes does the opposite option just to fuck with you.
    psychonic 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 00:30.


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