Description
This plugins customize the default dropping mechanics. Instead of dropping the gun from your hand and on the ground; it instantly deletes it.
It also makes all guns cost 0$, so the client can buy as many guns as they want during warmup.
Put it in your plugins folder (/addons/sourcemod/plugins/)
Either change map or run "sm_rcon sm plugins refresh" in your console (to load the plugin)
The plugin is now loaded and working
Modifications (optional)
Spoiler
As written in the description, this only applies on the warmup.
- If you want to this drop mechanic to apply to all rounds, then remove the if-statement that checks if the round is a warmup inside the CS_OnCSWeaponDrop function:
PHP Code:
if(GameRules_GetProp("m_bWarmupPeriod"))
{
}
- It's the same if you want guns to cost 0$, just remove the if-statement that checks if the round is a warmup, but this time, in the CS_OnGetWeaponPrice.
public Plugin myinfo =
{
name = "CustomWeaponDrop",
author = "Trum (Impact's drop mechanic idea)",
description = "Preventing people from spam-dropping guns on the ground.",
version = "1.0",
url = "",
}
public void OnPluginStart()
{
AddCommandListener(OnDrop, "drop");
HookEvent("player_spawn", OnSpawn);
}
public Action OnSpawn(Event event, const char[] name, bool dontBroadcast)
{
int client = GetClientOfUserId(event.GetInt("userid"));
if(client)
g_iLastDroppedItem[client] = 0;
}
public Action OnDrop(int client, const char[] command, int argc)
{
g_iLastDroppedItem[client] = GetEntPropEnt(client, Prop_Send, "m_hActiveWeapon");
}
public Action CS_OnCSWeaponDrop(int client, int weapon)
{
if(GameRules_GetProp("m_bWarmupPeriod"))
{
if(IsValidEdict(weapon))
AcceptEntityInput(weapon, "Kill");
Hi, i've been using this plugin and the "infinite money" during warmup worked so well until the Major Stockholm 2021 update, that function doesn't work anymore... Could you fix it?
I've updated to the lastest version of SourceMod but still doesn't working the way it was... So I don't know if it is something about the script of this plugin or I don't know...
I didn't added more plugins so I discard the chances of other plugins generete interference with this plugin.