Math Credits
19 Attachment(s)
Description :
This plugin display math question and the first player who answer correctly earn a random ammount of credits ! Based on this request. Code:
[QUIZ]100 + 64 = ?? >>5 Credits<< None. Feel free to give me some nice shots ;) ! Cvar & Commands Cvar : sm_MathCredits_minimum_number 1 What should be the minimum number for questions ? sm_MathCredits_maximum_number 100 What should be the maximum number for questions ? sm_MathCredits_maximum_credits 50 What should be the maximum number of credits earned for a correct answers ? sm_MathCredits_minimum_credits 5 What should be the minimum number of credits earned for a correct answers ? sm_MathCredits_time_between_questions 50 Time in seconds between each questions. sm_MathCredits_time_answer_questions 10 Time in seconds to give a answer to a question. sm_MathCredits_store_select DEFAULT DEFAULT=Sourcemod store/ZEPHYRUS=use zephyrus store" A config file is created on the first run of the plugin in cfg/sourcemod folder called MathCredits.cfg ! Commands : None Installation 1) Download the smx file 2) Put it into your plugins folder 3) Install Simple Chat Processor Redux 4) reload plugins folder by restarting server OR changing map OR typing sm reload plugins Bugs : Any ! Yay everything is fully working ! Request :
Logs : ------ 0.1 : First public release. ------- |
Re: Math Credits
Nice one.
Any plans on making a quiz based on questions that you can add in a config file along with the answer itself? |
Re: Math Credits
Quote:
|
Re: Math Credits
Quote:
Maybe make it configurable via (dummy)-items in the webpanel. So there is a item for each question. The Question and the Results are defined via the json attrs. Not sure if you can implement it this way, but I think it would be useful to do it that way. About the Math Module: I think it might be useful if you add the option to only ask questions if a certain number of players are dead. Btw. I added the module to the overview |
Re: Math Credits
Quote:
Quote:
PHP Code:
Quote:
Quote:
Quote:
PS: By the way, you have done a pretty nice job with the webpanel :3 ! |
Re: Math Credits
Looks fine to me, only issue I see is the lack of registration. When you have a chance, have a look at the native in the backend module to register your plugin to the store database.
Code:
/** |
Re: Math Credits
Quote:
So my idea is to use the json_attrs to distribute the data. Basically the user adds 1 item for each question that contains the below mentioned attrs. These items will be flagged as unbuyable (so its not listed in the store menu) Once your module loads, it should be possible to get all the items that belong to that category. Once you got the items, you can look at the attrs from each item to get the questions. (Maybe you can use the item price as the reward thats given to the user) Quote:
Oh, and multiple answers would be awesome As I said, this are just some ideas. Quote:
https://forums.alliedmods.net/showthread.php?t=208774 Quote:
|
Re: Math Credits
@r3dw3r3w0lf
Right, in fact, I scripted this without knowing anything about Store (wich was not that clever, I understand.) but, what ? It's recommended that all modules register & refresh each plugin load. What does that part mean ? Like I have to do ServerCommand("sm plugins reload [PLUGIN_NAME]"); after Store_RegisterPluginModule() ? |
Re: Math Credits
Quote:
I'm making a post about it now since It's needed now but basically, this is how you should code it. (Taken from the core module) Code:
public Store_OnDatabaseInitialized() |
Re: Math Credits
Quote:
EDIT: Woups Did I forgot a #include ? Currently I only have the <store> one. |
Re: Math Credits
Hey,
i don't know what it is (there are no error logs), but when a new round starts the plugin stops working (no questions anymore). No error logs. I am using SourceMod 1.7.3-dev+5214. |
Re: Math Credits
Quote:
|
Re: Math Credits
Quote:
I think if you give a timer TIMER_NO_MAPCHANGE, it needs to be in OnMapStart instead of OnPluginStart. |
Re: Math Credits
Quote:
|
Re: Math Credits
Quote:
Is it a setting of my server or a setting of the plugin? |
Re: Math Credits
Quote:
|
Re: Math Credits
Works, thank you!
|
Re: Math Credits
Quote:
|
Re: Math Credits
Arkarr I've seen this in may of your plugins; at the bugs part you say: "any". I suggest using "none".
Thats it really, nice work either way. |
Re: Math Credits
Quote:
|
Re: Math Credits
Nice plugin Arkar,
Request: Could you make it have a config where we can actually supply custom questions and answers, and deligate the amount of credits per correct response. So instead of boring math questions (no offence), we can put questions relating to the game we are playing? would be awesome, regards! |
Re: Math Credits
Quote:
|
Re: Math Credits
Bug report.
When someone will have equiped chatcolor fron this plugin https://forums.alliedmods.net/showthread.php?t=263730 the quizz won't register his answer. |
Re: Math Credits
Quote:
i use green color and answer it work , |
Re: Math Credits
need more difficult math problems like calculus or vector things haha let the John von Neumann fortress 2 BEGINS!
|
Re: Math Credits
Quote:
|
Re: Math Credits
Quote:
For me it doesn't :/. And i have another problem even though i changed my .cfg file it still thinks that everything is set to default My .cfg:
Spoiler
|
Re: Math Credits
Quote:
|
Re: Math Credits
Answers doesnt work on admins with custom flag "o".
|
Re: Math Credits
Quote:
|
Re: Math Credits
The answers of admins are not getting registered, so if admin types the correct answer it wont register it. The next person without admin flag will write completely same answer and will get it right.
|
Re: Math Credits
Quote:
|
Re: Math Credits
Or it might be for the people that uses colors in their name/tag/text.
|
Re: Math Credits
1 Attachment(s)
i made a non store and called by trigger version of Math Credits.
sm_math for a new Quiz. all Credits to Arkarr! |
Re: Math Credits
Quote:
or a plugin that make player tags this way? https://github.com/ecca/SourceMod-Pl...warden.sp#L160 this break some cmds. It's a bad solution in my opinion. |
Re: Math Credits
Hey, am getting this error;
PHP Code:
|
Re: Math Credits
Quote:
|
Re: Math Credits
Quote:
PHP Code:
|
Re: Math Credits
Quote:
|
Re: Math Credits
Quote:
https://forums.alliedmods.net/showpo...&postcount=688 |
All times are GMT -4. The time now is 02:10. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.