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

[ReHLDS] Money Rewards Modifier


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   General Purpose       
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 04-30-2017 , 10:04   [ReHLDS] Money Rewards Modifier
Reply With Quote #1



Money Rewards Modifier

Description
  • This plugin allows you to change the default money rewards that players get on specific events. For example, you change the money when killing a player, teammate, hostage, joining the game or a team, team win/lose, defusing/planting the bomb, etc.

Requirements
  • ReHLDS
  • ReAPI
  • ReGameDLL

Settings
  • The settings can be found in the file configs/MoneyModifier.ini.
  • Inside it you can find every available event that you can modify. They are separated in two types - events for specific players and global events.
  • If the event is for specific players, you can assign an admin flag to that event, so only players who have the flag will receive the modified amount.
  • The amount of money can be directly specified, added, substracted, multiplied or divided from the original amount.
  • You can assign different amounts on each round or round range.

Examples
  • RT_ -- event for specific players
  • RR_ -- global event
  • RT_ENEMY_KILLED = 400 -- all players will get 400$ for killing a player
  • RT_ENEMY_KILLED = +50 0 b -- players with flag b will get +50$ for killing a player
  • RT_HOSTAGE_RESCUED = +25% >3 b -- players with flag b will get +25% from the original amount when rescuing a hostage after the third round
  • RT_TEAMMATES_KILLED = 0 10-20 abcdei -- players with flags abcdei won't lose any money when killing a teammate between the 10th and 20th round
  • RR_CTS_WIN = 1000 -- counter-terrorists will get 1000$ for winning a round
  • RR_BOMB_PLANTED = -7% -- terrorists will get 7% less money for planting the bomb

Additional information and download links



__________________

Last edited by OciXCrom; 07-30-2018 at 12:37.
OciXCrom is offline
Send a message via Skype™ to OciXCrom
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 04-30-2017 , 10:28   Re: [ReHLDS] Money Rewards Modifier
Reply With Quote #2

I would prefer you to upload the source to this post.
Also, having a plugin that works only in custom game dlls, not in default hlds is weird. In my opinion, since alliedmodders mainly support the official version the plugin has to work in that one firstly. After that, you can add support for other gamedlls.

This can be done by using orpheu. If you don't know how to make signatures, use the one provided here: https://forums.alliedmods.net/showpo...postcount=1416
What's left is a matter of doing an
PHP Code:
OrpheuRegisterHook(OrpheuGetFunction("AddAccount""CBasePlayer"), "CBasePlayer_AddAccount"
__________________

Last edited by HamletEagle; 04-30-2017 at 10:29.
HamletEagle is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 04-30-2017 , 10:32   Re: [ReHLDS] Money Rewards Modifier
Reply With Quote #3

Oh, please no. I don't like updating the source every time I make changes to it. I'm sharing my plugins on multiple websites, so I prefer using a permanent link.

Since ReHLDS is officially supported now, I don't think sharing ReHLDS plugins should be a problem.
I haven't worked with Orpheu. From the link you gave, I see it doesn't have a "RewardType" argument, so I can't really determine what kind of a reward it is.
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 04-30-2017 , 10:45   Re: [ReHLDS] Money Rewards Modifier
Reply With Quote #4

Well, regamedll devs were nice and added another param to the default function. You can still do it with orpheu with two ways:
1.If two events don't share the same ammount of money, you can check the ammount param and know from what event it was called. But I don't know if that's true, you may get the same ammount for different things.
2.Hook the functions from which AddAccount is called so you can mimic the regamedll implementation. This is harder than the first solution, but will work for sure. Some more work to do, though.

I can't think of another solution for now.
__________________

Last edited by HamletEagle; 04-30-2017 at 10:46.
HamletEagle is offline
Old 04-30-2017, 13:13
JusTGo
This message has been deleted by JusTGo.
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 04-30-2017 , 13:18   Re: [ReHLDS] Money Rewards Modifier
Reply With Quote #5

@HamletEagle - I really don't want to get into orpheu and all of its complicated stuff, especially when I decided to try out rehlds.

@JusTGo - no, I made it like that on purpose. You can add multiple lines in the file for the same type of reward on different admin flags, so that way the reward will be combined if you have all required flags.
__________________

Last edited by OciXCrom; 04-30-2017 at 13:18.
OciXCrom is offline
Send a message via Skype™ to OciXCrom
JusTGo
Veteran Member
Join Date: Mar 2013
Old 04-30-2017 , 13:24   Re: [ReHLDS] Money Rewards Modifier
Reply With Quote #6

Quote:
Originally Posted by OciXCrom View Post
@JusTGo - no, I made it like that on purpose. You can add multiple lines in the file for the same type of reward on different admin flags, so that way the reward will be combined if you have all required flags.
imo it will be better for one reward for example if i have this flags a= super admin = 1000$; b=admin = 500$ and i want player abc.... to only get the reward set on his first flag match if some one wants it the way you said he can just change the amount like this a = 1500$ and b = 500$ ect..
__________________

Last edited by JusTGo; 04-30-2017 at 13:24.
JusTGo is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 04-30-2017 , 13:28   Re: [ReHLDS] Money Rewards Modifier
Reply With Quote #7

If you want only one reward, you can use multiple flags and separate the users or not use multiple rewards at all. In most cases there will be multiple rewards on multiple flags, so people would want to combine them. For example, you buy the "b" flag which gives you 1000$, then you buy the "c" flag which gives you 500$, so you will probably want to get 1500$ instead of 1000$.
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 05-03-2017 , 08:29   Re: [ReHLDS] Money Rewards Modifier
Reply With Quote #8

Update v1.1 @ 03.05.2017
  • Added the possibility to have different rewards on different rounds.
  • You can specify an exact round, all rounds before/after or rounds between two numbers.
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
JusTGo
Veteran Member
Join Date: Mar 2013
Old 05-12-2017 , 17:22   Re: [ReHLDS] Money Rewards Modifier
Reply With Quote #9

Quote:
Originally Posted by HamletEagle View Post
Well, regamedll devs were nice and added another param to the default function. You can still do it with orpheu with two ways:
1.If two events don't share the same ammount of money, you can check the ammount param and know from what event it was called. But I don't know if that's true, you may get the same ammount for different things.
2.Hook the functions from which AddAccount is called so you can mimic the regamedll implementation. This is harder than the first solution, but will work for sure. Some more work to do, though.

I can't think of another solution for now.
so is rehlds plugins only are allowed in the forum ? like if we got a plugin that only works on rehlds and can't be made to work with hlds or is too compilcated to make it work?
__________________

Last edited by JusTGo; 05-12-2017 at 17:23.
JusTGo is offline
Ark_Procession
Senior Member
Join Date: Jun 2020
Location: Argentina
Old 02-13-2022 , 17:09   Re: [ReHLDS] Money Rewards Modifier
Reply With Quote #10

Some parameters are not working:

RR_BOMB_PLANTED
RR_TERRORISTS_WIN
RR_CTS_WIN

Actually I only got this 2 working, i did not try every one of them since i already found those i said that currently are simply not applying the values
RT_ENEMY_KILLED
RT_TEAMMATES_KILLED
Ark_Procession is offline
Reply


Thread Tools
Display Modes

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 20:14.


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