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

Release [Timer] Store Credits Giver


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
shavit
AlliedModders Donor
Join Date: Dec 2011
Location: Israel
Old 01-30-2013 , 14:41   [Timer] Store Credits Giver
Reply With Quote #1

Requirements:
Timer
Store

Description:
Gives Store money when you finish a round (map), followed by an algorithm.

Algorithm:
sm_smadder_ptg / 4.1 / jumps * 5.4 * fps_max value * difficulty index if Physics is loaded / 75.4 circled to the highest number.
* fps_max - If value is 0/higher than 300 it will be counted as 300.
* Difficulty index - Timer difficulty level, by default, Auto-bhop is 1, Easy is 2, Normal is 3, SW-Only is 4 and W-Only is 5.
* If server's world record is beaten, the credits will multiply by 1.27.
* If server's difficulty world record (e.g. you've beaten a personal record in a difficulty and not in the whole server) is beaten, the credits will multiply by 1.1.
* If you've beaten your own personal record, the credits will multiply by 1.02.

ConVars:
sm_smadder_version - Version.
sm_smadder_enabled - Store money adder is enabled? [1]
sm_smadder_ptg - Base money to pay and start the billing algorithm calculation with. [25]

Config will be auto made/executed in cfg/sourcemod/storemoneyadder.cfg.

Installation:
Copy the plugin (timer-mapcredits.smx) to cstrike/addons/sourcemod/plugins.

Custom Amount For Each Maps:
If you'd like to have a custom credits amount for each map, go to cfg/sourcemod/storemoneyadder.cfg.
Remove the line that contains sm_smadder_ptg or comment it. (Add // to the beginning)
Add a default value to server.cfg for maps that aren't configured yet.
Use How to make map specific config files and use sm_smadder_ptg <amount>.

Changelog:
1.3 - Fixed bug that will get you infinite credits for completing a map without jumping.
1.2 - Removed Physics module requirement.
1.1 - Fixed everything listed here.
1.0 - Initial release.
Attached Files
File Type: smx timer-mapcredits.smx (6.4 KB, 1194 views)
File Type: sp Get Plugin or Get Source (timer-mapcredits.sp - 892 views - 3.2 KB)
__________________
retired

Last edited by alongub; 02-17-2013 at 12:02.
shavit is offline
Glite
Senior Member
Join Date: Sep 2011
Location: Ukraine
Old 01-30-2013 , 14:49   Re: [Timer] Store Credits Giver
Reply With Quote #2

One problem with physics difficulty is that if you don't run this module physicsDifficulty will be "0".

Also, if you are the first in position, it doesn't matters with which you completed the map, anyway you will be the first, so you must remove this:
Code:
if(overwrite)
{
    PTG *= 1.02;
}
And make those like that:
Code:
if(worldrecord1 && overwrite)
{
    PTG *= 1.27;
}
    
if(worldrecord2  && overwrite)
{
    PTG *= 1.1;
}
And change the multiplier like that:
Code:
if(worldrecord1 && overwrite)
{
    PTG *= 1.1;
}
    
if(worldrecord2  && overwrite)
{
    PTG *= 1.27;
}
And another issue with big map is that you divide sm_smadder_ptg by jumps so it will be not efficient to complete maps like bhop_exodus and others.

Last edited by Glite; 01-30-2013 at 14:59.
Glite is offline
deathkilla
Senior Member
Join Date: Mar 2011
Old 01-30-2013 , 14:51   Re: [Timer] Store Credits Giver
Reply With Quote #3

Define Store?

I don't quite understand
__________________
Elite Gamers
Visit us:www.Elite-Gamers.org
deathkilla is offline
shavit
AlliedModders Donor
Join Date: Dec 2011
Location: Israel
Old 01-30-2013 , 14:59   Re: [Timer] Store Credits Giver
Reply With Quote #4

Quote:
Originally Posted by deathkilla View Post
Define Store?

I don't quite understand
Store is a new open source store plugin by alongub.
Quote:
Originally Posted by Glite View Post
One problem with physics difficulty is that if you don't run this module physicsDifficulty will be "0".
Added "+ Physics" module to the requirements.
Look at the changelog.
__________________
retired

Last edited by shavit; 01-30-2013 at 15:01.
shavit is offline
Glite
Senior Member
Join Date: Sep 2011
Location: Ukraine
Old 01-30-2013 , 15:02   Re: [Timer] Store Credits Giver
Reply With Quote #5

Quote:
Originally Posted by shavit View Post
Added "+ Physics" module to the requirements.
You can make this plugin not depended on timer-physics by using 2 formulas for each.
You can do that with:
Code:
g_bTimerPhysics = LibraryExists("timer-physics");
Glite is offline
shavit
AlliedModders Donor
Join Date: Dec 2011
Location: Israel
Old 01-30-2013 , 15:05   Re: [Timer] Store Credits Giver
Reply With Quote #6

Quote:
Originally Posted by Glite View Post
You can make this plugin not depended on timer-physics by using 2 formulas for each.
You can do that with:
Code:
g_bTimerPhysics = LibraryExists("timer-physics");
Quote:
1.2 - Removed Physics module requirement.
1.1 - Fixed everything listed here.
1.0 - Initial release.
__________________
retired
shavit is offline
Glite
Senior Member
Join Date: Sep 2011
Location: Ukraine
Old 01-30-2013 , 15:07   Re: [Timer] Store Credits Giver
Reply With Quote #7

Lol, you're fast.
Glite is offline
shavit
AlliedModders Donor
Join Date: Dec 2011
Location: Israel
Old 01-30-2013 , 15:08   Re: [Timer] Store Credits Giver
Reply With Quote #8

Quote:
Originally Posted by Glite View Post
Lol, you're fast.
"Yes, I am." - Phineas
__________________
retired
shavit is offline
mickael002
Senior Member
Join Date: Jul 2010
Old 01-30-2013 , 16:03   Re: [Timer] Store Credits Giver
Reply With Quote #9

++ Congratulations your plugins are now on my server.
mickael002 is offline
scorpadorp
SourceMod Donor
Join Date: May 2012
Location: NC
Old 01-30-2013 , 16:47   Re: [Timer] Store Credits Giver
Reply With Quote #10

Would it be possible to make this for TF2? I have a deathhrun server and I want to give x credits for surviving the round.
scorpadorp 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 02:47.


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