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

[ANY] Resetscore [2.6.0 21/October/2013]


Post New Thread Reply   
 
Thread Tools Display Modes
away000
Veteran Member
Join Date: Sep 2010
Old 08-11-2012 , 14:55   Re: [CSS] Resetscore [1.2 10/August/2012]
Reply With Quote #11

maybe u can make a logfile who show Nick SteamID Reset his score....
__________________
away000 is offline
shavit
AlliedModders Donor
Join Date: Dec 2011
Location: Israel
Old 08-11-2012 , 16:50   Re: [CSS] Resetscore [1.2 10/August/2012]
Reply With Quote #12

Quote:
Originally Posted by away000 View Post
maybe u can make a logfile who show Nick SteamID Reset his score....
Sure, it will be added to the next update too.
__________________
retired
shavit is offline
thetwistedpanda
Good Little Panda
Join Date: Sep 2008
Old 08-15-2012 , 13:01   Re: [CSS] Resetscore [1.2 10/August/2012]
Reply With Quote #13

Review for Approval
Status: Pending Feature Additions / Code Correction
  • Your plugin currently does not provide any features that are not already available by existing plugins: Exvel's Save Scores and tuty's Resetscore. The former provides saving scores, saving cash, multiple games, etc, while the latter is CS:S specific that provides the core functionality with no fluff.
  • You do not need to attach random images such as a cookie for a plugin thread...
  • Now as for your coding:
    • While not required, it's usually a good idea to prefix your variables with their type. For example, you already use "g_" to signify global, and "h" for handles, albeit your usage is hit/miss. You can prefix integers with i, floats with f, b for bools, and strings with s to make your code easier to read. iResets, fTimeleft, and sResets allow you to easily see what type a variable is.
    • You declare "resets" to 64 characters, when it's an integer that is with in the single digits. resets[2] or resets[3] would be more desirable (why declare 62 other characters if they're never used?)
    • Your usage of ConVarChanged is incorrect as well as inefficient - there's no reason to update all variables when ConVarChanged only changes one convar at a time.
    • PHP Code:
      public ConVarChanged(Handle:convar, const String:oldVal[], const String:newVal[])
      {
          if(
      convar == gH_Enabled)
              
      Enabled StringToInt(newVal) ? true false;
          else if(
      convar == gH_Resets)
              
      Resets StringToInt(newVal);
          else if(
      convar == gH_ResetTime)
              
      Timeleft StringToFloat(newVal);

    • There's no need to hook your version cvar.
    • You should never pass a client index within a trigger: instead use their userid or serial and get the new value within the Timer. This ensures a new client doesn't inherit a previous client's timer. Alternatively, you can create an array of Handles per client and kill the timer when the client disconnects.
__________________

Last edited by thetwistedpanda; 08-15-2012 at 13:32.
thetwistedpanda is offline
shavit
AlliedModders Donor
Join Date: Dec 2011
Location: Israel
Old 08-15-2012 , 14:21   Re: [CSS] Resetscore [1.2 10/August/2012]
Reply With Quote #14

Quote:
Originally Posted by thetwistedpanda View Post
Review for Approval
Status: Pending Feature Additions / Code Correction
  • Your plugin currently does not provide any features that are not already available by existing plugins: Exvel's Save Scores and tuty's Resetscore. The former provides saving scores, saving cash, multiple games, etc, while the latter is CS:S specific that provides the core functionality with no fluff.
  • You do not need to attach random images such as a cookie for a plugin thread...
  • Now as for your coding:
    • While not required, it's usually a good idea to prefix your variables with their type. For example, you already use "g_" to signify global, and "h" for handles, albeit your usage is hit/miss. You can prefix integers with i, floats with f, b for bools, and strings with s to make your code easier to read. iResets, fTimeleft, and sResets allow you to easily see what type a variable is.
    • You declare "resets" to 64 characters, when it's an integer that is with in the single digits. resets[2] or resets[3] would be more desirable (why declare 62 other characters if they're never used?)
    • Your usage of ConVarChanged is incorrect as well as inefficient - there's no reason to update all variables when ConVarChanged only changes one convar at a time.
    • PHP Code:
      public ConVarChanged(Handle:convar, const String:oldVal[], const String:newVal[])
      {
          if(
      convar == gH_Enabled)
              
      Enabled StringToInt(newVal) ? true false;
          else if(
      convar == gH_Resets)
              
      Resets StringToInt(newVal);
          else if(
      convar == gH_ResetTime)
              
      Timeleft StringToFloat(newVal);

    • There's no need to hook your version cvar.
    • You should never pass a client index within a trigger: instead use their userid or serial and get the new value within the Timer. This ensures a new client doesn't inherit a previous client's timer. Alternatively, you can create an array of Handles per client and kill the timer when the client disconnects.
Done
Quote:
2.0 -
Anything here.
Stopped using cookies.
New cvar.
I have no idea why I made the plugin to work with CS:S only, so lets go with all games!
Now everybody will be able to read this scarmbled code :S
__________________
retired
shavit is offline
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 08-15-2012 , 15:00   Re: [ANY] Resetscore [2.0 15/August/2012]
Reply With Quote #15

While it's awesome that you fixed the suggestions, this still wont be approved as it's a dupe of currently approved plugins - while choice is good, fracturing the user base isn't.
__________________
asherkin is offline
shavit
AlliedModders Donor
Join Date: Dec 2011
Location: Israel
Old 08-15-2012 , 15:06   Re: [ANY] Resetscore [2.0 15/August/2012]
Reply With Quote #16

Quote:
Originally Posted by asherkin View Post
While it's awesome that you fixed the suggestions, this still wont be approved as it's a dupe of currently approved plugins - while choice is good, fracturing the user base isn't.
It have many features that other plugins don't have.
It can give the user the resets that he used back after defined time, advantage for admins and much more that I can add soon.
__________________
retired
shavit is offline
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 08-15-2012 , 15:07   Re: [ANY] Resetscore [2.0 15/August/2012]
Reply With Quote #17

Quote:
Originally Posted by shavit View Post
It have many features that other plugins don't have.
It can give the user the resets that he used back after defined time, advantage for admins and much more that I can add soon.
That's a non-feature, people will just rejoin the server if they run out of resets and want to reset their score.
__________________
asherkin is offline
shavit
AlliedModders Donor
Join Date: Dec 2011
Location: Israel
Old 08-15-2012 , 15:18   Re: [ANY] Resetscore [2.0 15/August/2012]
Reply With Quote #18

Quote:
Originally Posted by asherkin View Post
That's a non-feature, people will just rejoin the server if they run out of resets and want to reset their score.


2.1 -
The plugin will don't allow players to get 0/0 score after retry if the time haven't passed.
__________________
retired
shavit is offline
butaford
Member
Join Date: Mar 2011
Old 08-17-2012 , 04:31   Re: [ANY] Resetscore [2.1 15/August/2012]
Reply With Quote #19

can add some functions from this code?
Spoiler

Last edited by butaford; 08-17-2012 at 04:33.
butaford is offline
shavit
AlliedModders Donor
Join Date: Dec 2011
Location: Israel
Old 08-17-2012 , 06:35   Re: [ANY] Resetscore [2.1 15/August/2012]
Reply With Quote #20

Quote:
Originally Posted by butaford View Post
can add some functions from this code?
Spoiler
Actually, this code is very hard to read, just tell me which features you want. [list them]
__________________
retired
shavit 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 23:11.


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