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);
}
...
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);
}
...