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. |
All times are GMT -4. The time now is 02:28. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.