AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   New Plugin Submissions (https://forums.alliedmods.net/forumdisplay.php?f=26)
-   -   [ReHLDS] Money Rewards Modifier (https://forums.alliedmods.net/showthread.php?t=296847)

OciXCrom 04-30-2017 10:04

[ReHLDS] 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

https://raw.githubusercontent.com/Oc...using_this.png
https://raw.githubusercontent.com/Oc...plugin_lab.png
https://raw.githubusercontent.com/Oc...load_reapi.png

HamletEagle 04-30-2017 10:28

Re: [ReHLDS] Money Rewards Modifier
 
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"


OciXCrom 04-30-2017 10:32

Re: [ReHLDS] Money Rewards Modifier
 
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.

HamletEagle 04-30-2017 10:45

Re: [ReHLDS] Money Rewards Modifier
 
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.

OciXCrom 04-30-2017 13:18

Re: [ReHLDS] Money Rewards Modifier
 
@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.

JusTGo 04-30-2017 13:24

Re: [ReHLDS] Money Rewards Modifier
 
Quote:

Originally Posted by OciXCrom (Post 2517121)
@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..

OciXCrom 04-30-2017 13:28

Re: [ReHLDS] Money Rewards Modifier
 
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 05-03-2017 08:29

Re: [ReHLDS] Money Rewards Modifier
 
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.

JusTGo 05-12-2017 17:22

Re: [ReHLDS] Money Rewards Modifier
 
Quote:

Originally Posted by HamletEagle (Post 2517098)
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?

Ark_Procession 02-13-2022 17:09

Re: [ReHLDS] Money Rewards Modifier
 
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


All times are GMT -4. The time now is 13:35.

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