PDA

View Full Version : [Feature Request] [Distributor] Give a special number of credits for spectator


mickael002
02-17-2013, 13:14
[Distributor] Special number of credit if a player is in spectator
Because if a players camp in spectator he can get a lot of credits easily

Description :

So why not creat a cvar command (sm_store_credits_spectator), for set the numer of credit who gained the players in spectator.

Configuration File:

You can configure this in the dirrectly "addons/sourcemod/configs/store", in the file "distributor.cfg"
The line : "number_credits_spectator" "X"


Scripting Code:

OnPluginStart

g_hCreditsSpectate = CreateConVar("sm_store_credits_spectator", "1", "The number of credits you get as a spectator.");



The Core

...

if(!(2<=GetClientTeam(client)<=3))
credits[count] = GetConVarInt(g_hCreditsSpectate);
else
credits[count] = Calculate(client, map, clientCount);

if (g_enableMessagePerTick)
{
PrintToChat(client, "%s%t", STORE_PREFIX, "Received Credits", credits[count], g_currencyName);
}
...

alongub
02-17-2013, 13:42
The correct way to implement this would to add a team filter. For example:

"Distributor"
{
"time_per_distribute" "180"
"enable_message_per_distribute" "1"

"distribution"
{
"base_minimum" "1"
"base_maximum" "3"

"filters"
{
"1"
{
"team" "0"
"multiplier" "0"
}
}
}
}

mickael002
02-17-2013, 13:54
oK,

Why multiplier ? its "enable_message_per_distribute" * "multiplier" ?

Why not, remplace "multiplier" by "per_distribute" ?

I do not like multiplication.

vodka00
02-17-2013, 17:31
oK,

Why multiplier ? its "enable_message_per_distribute" * "multiplier" ?

Why not, remplace "multiplier" by "per_distribute" ?

I do not like multiplication.

I think you can get the desired outcome with multiplier. For ex. Do 0.5 for half the credits, 0.25 for 1/4 the creds.

K0Killer2
02-24-2013, 18:10
The correct way to implement this would to add a team filter. For example:


I don't see a team filter in the distributor script nor does it work.

vodka00
04-09-2013, 22:38
The correct way to implement this would to add a team filter. For example:

"Distributor"
{
"time_per_distribute" "180"
"enable_message_per_distribute" "1"

"distribution"
{
"base_minimum" "1"
"base_maximum" "3"

"filters"
{
"1"
{
"team" "0"
"multiplier" "0"
}
}
}
}

Would you be able to do min_removeend and max_removeend just like you can do min_addend?

alongub
04-10-2013, 00:48
Would you be able to do min_removeend and max_removeend just like you can do min_addend?

Just use negative value.