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

Quiz Plugin v1.1


Post New Thread Reply   
 
Thread Tools Display Modes
Author
~Gh05t~
Member
Join Date: Oct 2007
Plugin ID:
204
Plugin Version:
1.1
Plugin Category:
Fun Stuff
Plugin Game:
Counter-Strike: Source
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Updated lang file
    Old 10-30-2007 , 15:00   Quiz Plugin v1.1
    Reply With Quote #1

    • Description

      This is a slightly extended Quiz plugin like this one was for AMXModX from Deviance, but for Sourcemod.

      When this plugin is enabled, the server will ask questions to all or only to dead players questions from a questions-file.
      If a user answers right (via chat), he gets a money reward.

      As one feature i have added multiple choice mode. If it is enabled, questions with more then one answer in questions-file will be shown as a select-menu.

      If you have some questions, bugs or feature-requests pm me or post here.
    • Configuration

      Server cvars:
      • sm_quiz_dead_only Default: 1
        1 - Quiz enabled for all players
        0 - Quiz enabled only for dead players
      • sm_quiz_reward Default: 800
        Reward for a correct answered question.
      • sm_quiz_timelimit Default: 30
        Timelimit of a question in sec.
      • sm_quiz_show_answer Default: 0
        Show the correct answer after time is up.
      • sm_quiz_displaymode Default: panel
        Display position of Quiz. Valid values: chat,panel,hint
        (see attached picture)
      • sm_quiz_multiplechoice Default: 1
        0 - disables multiple answers, only first one is correct.
        1 - enables multiple-choice mode if more than one answer is available in question-file. First answer is the correct one (works only with 'sm_quiz_displaymode=panel'!).
        2 - no multiple choice mode, but all answers are correct.
      • sm_quiz_file Default: configs/quiz_file.ini
        Quiz-file to use.
      • sm_quiz_tag Default: <empty>
        If this cvar is set to a non-empty string value, given answers must have this string at the leading position. Wrong answers will no longer be shown to chat then (reduces chat activity). Example: "/quiz".
    • Quiz-File

      The Quizfile should be placed to direction set in sm_quiz_file (Def. <sourcemod_dir>/configs/quiz_file.ini)

      The format of one line of this file is:

      "Question" "Answer" "Answer2" "Answer3" "Answer4"

      The first answer is always the correct one, others are optional (used depending on value of sm_quiz_multiplechoice). Currently max. 4 answers per question are imported.
      Unfortunately i do not have a real questions-file i can provide, but you can search for question-files of IRC-bots or use the one from Deviance.
    • Chat-Commands

      You can use the following chat-commands in game:
      • /question or !question
        Shows the last question again (!question to all, /question silent)
      • /quiz or !quiz
        Enable/Disable quiz (!quiz to all, /quiz silent)

      • <Tag> <answer>
        Answer to current question (if no multiple-choice).
        Tag is only needed if sm_quiz_tag is set.
    Have fun with that!

    greez

    ~Gh05t~

    UPDATES
    v1.1:
    • added france translation to language-file (thanks to J!b and St00ne)
    • Changed default sm_quiz_timelimit to 20 sec
    • (Bugfix) disabled answering when timelimit ran out
    • (Bugfix) dont start plugin if no question-file is found (crashed the server!)
    • Correct answer will not be shown to chat if sm_quiz_show_answer is not set.
    • added quiz answer tag. If this is set, wrong answers will not be shown to chat.
    • added silend /quiz chat command to en/disable quiz
    Attached Thumbnails
    Click image for larger version

Name:	quiz.jpg
Views:	5404
Size:	91.6 KB
ID:	21150  
    Attached Files
    File Type: ini quiz_file.ini (153 Bytes, 2156 views)
    File Type: txt plugin.quiz.txt (2.9 KB, 10025 views)
    File Type: sp Get Plugin or Get Source (quiz.sp - 2318 views - 26.0 KB)

    Last edited by ~Gh05t~; 03-05-2011 at 11:43. Reason: added silent /quiz chat command
    ~Gh05t~ is offline
    Send a message via ICQ to ~Gh05t~
    Rebell
    Veteran Member
    Join Date: Nov 2004
    Location: GERMANY
    Old 10-31-2007 , 14:51   Re: Quiz Plugin
    Reply With Quote #2

    ROFEL....nice plugin ^^
    __________________
    Rebell is offline
    Zervun
    Member
    Join Date: Oct 2007
    Old 11-02-2007 , 16:36   Re: Quiz Plugin
    Reply With Quote #3

    I couldn't figure out where the files go - I put the .smx in sourcemod/plugins quiz.sp in sourcemode/scripts and quiz_file.ini in /sourcemode/configs

    and it doesn't seem to work
    Zervun is offline
    ~Gh05t~
    Member
    Join Date: Oct 2007
    Old 11-04-2007 , 16:27   Re: Quiz Plugin
    Reply With Quote #4

    hmmm... it should work. It is running on my Linux-Server for some days now, ive tested an earlier version some time ago. Do you have error messages on server log? Did you changed the configuration? Remember: by default the quiz is only for dead players...
    When the server is running, try to reload the plugin. It shoud return a message with number of loaded questions. If not, something is wrong with your questions file. I think 'sourcemode' is a typo, but the rest should be all right.
    Oh, do you run a windows server? Iam not shure about the charset of questionsfile... its utf8.
    Would be nice to hear some more info from you, maybe you can PM me for some debuggin...
    ~Gh05t~ is offline
    Send a message via ICQ to ~Gh05t~
    bl4nk
    SourceMod Developer
    Join Date: Jul 2007
    Old 11-05-2007 , 01:31   Re: Quiz Plugin
    Reply With Quote #5

    Zervun: Did you put the translation file (plugin.quiz.txt) into the correct folder? You didn't mention it in your post.

    Also, you don't need to get the source (.sp) file. It's only there to look at the code.
    bl4nk is offline
    Zervun
    Member
    Join Date: Oct 2007
    Old 11-05-2007 , 12:41   Re: Quiz Plugin
    Reply With Quote #6

    That might be where I went wrong

    So put the .smx in sourcemod/plugins
    put the translation file in sourcemod/translations
    and put the quiz file in sourcemod/configs/

    and put all the sm stuff in sourcmod.cfg

    Last edited by Zervun; 11-05-2007 at 15:07.
    Zervun is offline
    Zervun
    Member
    Join Date: Oct 2007
    Old 11-06-2007 , 12:12   Re: Quiz Plugin
    Reply With Quote #7

    Quote:
    Originally Posted by Zervun View Post
    That might be where I went wrong

    So put the .smx in sourcemod/plugins
    put the translation file in sourcemod/translations
    and put the quiz file in sourcemod/configs/

    and put all the sm stuff in sourcmod.cfg
    well I still cannot get this to work correctly, I can reload it in game and it loads fine but does not say anything like it loaded xxx numbedr of questions

    I have the .smx in sourcemod/plugins/quiz.smx
    I have the translation file in sourcemod/translations/plugin.quiz.txt
    I have the quiz_file.ini in sourcemod/configs/quizfile.ini

    and in cfg/sourcemod/sourcemod.cfg I have

    sm_quiz_dead_only 1
    sm_quiz_reward
    800
    sm_quiz_timelimit 30

    sm_quiz_show_answer
    1
    sm_quiz_displaymode
    panel
    sm_quiz_multiplechoice
    1
    sm_quiz_file
    configs/quiz_file.ini
    Zervun is offline
    ~Gh05t~
    Member
    Join Date: Oct 2007
    Old 11-12-2007 , 09:45   Re: Quiz Plugin
    Reply With Quote #8

    Quote:
    Originally Posted by Zervun View Post
    ...
    I have the quiz_file.ini in sourcemod/configs/quizfile.ini

    and in cfg/sourcemod/sourcemod.cfg I have
    ...
    sm_quiz_file
    configs/quiz_file.ini
    If you have quizfile in sourcemod/configs/quizfile.ini you should set sm_quiz_file to 'configs/quizfile.ini'

    Maybe i should add install instructions...
    ~Gh05t~ is offline
    Send a message via ICQ to ~Gh05t~
    Zervun
    Member
    Join Date: Oct 2007
    Old 11-12-2007 , 15:59   Re: Quiz Plugin
    Reply With Quote #9

    sorry I just missed the _ in the typing it is quiz_file in both places
    Zervun is offline
    symphyle
    Member
    Join Date: Aug 2006
    Old 03-18-2008 , 20:38   Re: Quiz Plugin
    Reply With Quote #10

    Hi!

    Could you add a cvar: sm_quiz_enable

    It could activate the plug in the hole!

    Thanks for your work

    Symph
    symphyle 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 12:52.


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