Raised This Month: $ Target: $400
 0% 

[IDEA]Store's Quiz Plugin


Post New Thread Reply   
 
Thread Tools Display Modes
spancer35
Senior Member
Join Date: Dec 2014
Location: City 17
Old 06-21-2015 , 16:52   Re: [IDEA]Store's Quiz Plugin
Reply With Quote #11

hey can i ask u few question?
if ur answer is yes read it
1.When first typer won the credits second and third typer win too?
2.in my server give player credits command is "sm_krediver playername quantity" can i do it With ServerCommand?

edit: and i can't compile it :S


Last edited by spancer35; 06-21-2015 at 16:55.
spancer35 is offline
Arkarr
Veteran Member
Join Date: Sep 2012
Location: Just behind my PC screen
Old 06-21-2015 , 17:19   Re: [IDEA]Store's Quiz Plugin
Reply With Quote #12

Quote:
Originally Posted by spancer35 View Post
hey can i ask u few question?
if ur answer is yes read it
1.When first typer won the credits second and third typer win too?
2.in my server give player credits command is "sm_krediver playername quantity" can i do it With ServerCommand?

edit: and i can't compile it :S

Update your simple chat processor include with the CS:GO edition if you are using the plugin on CS:GO server, I also updated my script. Itwork now, I tested it
When the firt guy who said the correct answer won the credit, the others can't and should wait the next question.

And for question 2, yes, why not ?

Gotta sleep [ZzzzZZZzz]
__________________
Want to check my plugins ?

Last edited by Arkarr; 06-21-2015 at 17:19.
Arkarr is offline
spancer35
Senior Member
Join Date: Dec 2014
Location: City 17
Old 06-21-2015 , 17:24   Re: [IDEA]Store's Quiz Plugin
Reply With Quote #13

wow thank youu good night
spancer35 is offline
Arkarr
Veteran Member
Join Date: Sep 2012
Location: Just behind my PC screen
Old 06-21-2015 , 17:31   Re: [IDEA]Store's Quiz Plugin
Reply With Quote #14

Quote:
Originally Posted by spancer35 View Post
wow thank youu good night
So it worked I guess ?
__________________
Want to check my plugins ?
Arkarr is offline
spancer35
Senior Member
Join Date: Dec 2014
Location: City 17
Old 06-21-2015 , 17:44   Re: [IDEA]Store's Quiz Plugin
Reply With Quote #15

nor really but really i update the SCP but doesn't work can u compile it and make it with ServerCommand

command is;
sm_krediver "PlayerName" "quantity"

Last edited by spancer35; 06-21-2015 at 17:49.
spancer35 is offline
ThatOneGuy
Veteran Member
Join Date: Jul 2012
Location: Oregon, USA
Old 06-22-2015 , 01:11   Re: [IDEA]Store's Quiz Plugin
Reply With Quote #16

Bugs I see:
  1. You are saving the correct answer as an integer. If the question is division (/), you will likely return a float. You should convert the whole thing to floats to handle this, else you could round you float to the nearest, but then they have to know that it is rounded. Additionally, 0.333333 != 0.33, so really you need it rounded else division wont work outside of putting a tolerance of 1.0 on it for division problems.
  2. You create a datapack, send if off, then put something in it after sending. I'm not positive, but I dont believe you can save to a datapack after you send it, can you? To be honest, I'm not sure why you dont process the PrintToChat message in the same frame. Was it showing up before the clients answer?
  3. Just a preference, but you can avoid saving a handle for your timer if you just use incremental integer validation to check if the question is still in play.
  4. Your repeat timer should have TIMER_FLAG_NO_MAPCHANGE, else you may end up with multiple timers running for Q's after a map change.
  5. Your global variable "result" conflicts with parameters of AddVectors and SubtractVectors (how SM adds/subtracts). You should rename this to fix the conflict.

Hope those help.
__________________

Last edited by ThatOneGuy; 06-22-2015 at 01:13.
ThatOneGuy is offline
deadmau54
AlliedModders Donor
Join Date: May 2013
Old 06-22-2015 , 05:12   Re: [IDEA]Store's Quiz Plugin
Reply With Quote #17

You should post this plugin in Store section, many other people could use it
__________________
deadmau54 is offline
Arkarr
Veteran Member
Join Date: Sep 2012
Location: Just behind my PC screen
Old 06-22-2015 , 08:18   Re: [IDEA]Store's Quiz Plugin
Reply With Quote #18

Quote:
Originally Posted by ThatOneGuy View Post
You are saving the correct answer as an integer. If the question is division (/), you will likely return a float. You should convert the whole thing to floats to handle this, else you could round you float to the nearest, but then they have to know that it is rounded. Additionally, 0.333333 != 0.33, so really you need it rounded else division wont work outside of putting a tolerance of 1.0 on it for division problems.
Fixed. Using a while loop, so the result is always a integer.
Quote:
Originally Posted by ThatOneGuy View Post
You create a datapack, send if off, then put something in it after sending. I'm not positive, but I dont believe you can save to a datapack after you send it, can you? To be honest, I'm not sure why you dont process the PrintToChat message in the same frame. Was it showing up before the clients answer?
Because SimpleChatProcessor don't allow you to print message in chat while in OnChatMessage. I didn't saw any other way to send a string into a time (since 'any' doesn't allow 'char').
Quote:
Originally Posted by ThatOneGuy View Post
Just a preference, but you can avoid saving a handle for your timer if you just use incremental integer validation to check if the question is still in play.
Nah.
Quote:
Originally Posted by ThatOneGuy View Post
Your repeat timer should have TIMER_FLAG_NO_MAPCHANGE, else you may end up with multiple timers running for Q's after a map change.
Thanks, I forgot this param. Fixed.
Quote:
Originally Posted by ThatOneGuy View Post
Your global variable "result" conflicts with parameters of AddVectors and SubtractVectors (how SM adds/subtracts). You should rename this to fix the conflict.
Yeah... I should read warnings more often.
Quote:
Originally Posted by ThatOneGuy View Post
Hope those help.
Thanks for taking a look at my code, many thigns was forgotten and wouldn't be fixed without you notice them, again, thanks.
__________________
Want to check my plugins ?
Arkarr is offline
spancer35
Senior Member
Join Date: Dec 2014
Location: City 17
Old 06-22-2015 , 08:28   Re: [IDEA]Store's Quiz Plugin
Reply With Quote #19

i can't compile it
spancer35 is offline
Arkarr
Veteran Member
Join Date: Sep 2012
Location: Just behind my PC screen
Old 06-22-2015 , 08:32   Re: [IDEA]Store's Quiz Plugin
Reply With Quote #20

Quote:
Originally Posted by spancer35 View Post
i can't compile it
I don't see what is funny + I don't understand what you are doing wrong, do you use 1.7 compiller ? 'cause I writed it using 1.7 SourcePawn syntax. Anyway, I'm going to post this plugin on "Store" section of the forum, gonna post a link here in a few sec.
__________________
Want to check my plugins ?

Last edited by Arkarr; 06-22-2015 at 08:34.
Arkarr 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 09:39.


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