MyWeaponAllocator icon indicating copy to clipboard operation
MyWeaponAllocator copied to clipboard

Not giving any pistols on Force Buy Round with SSG

Open borzaka opened this issue 4 years ago • 8 comments

If you select Desert Eagle as T force buy round weapon, and enable SSG, you won't get any pistol in Force Buy Round if you are given SSG:

image

So: If you selected Desert as force buy weapon, and also enabled SSG/AWP and SSG is given to you in forcebuy, you should have a default pistol in booth teams.

Probably related? #8

borzaka avatar Sep 15 '19 13:09 borzaka

Thanks for great report! I going to setup a test server and try to repoduce and fix it asap.

shanapu avatar Sep 15 '19 23:09 shanapu

Thank you very much in advance!

Some quick tips for testing:

  • mywa_rounds_pistol "0"
  • sm_rcon mywa_scout_min_t "1"
  • sm_rcon mywa_rounds_force "30"

Or just mywa_rounds_chance "3" :)

Type kill to the console, if you are not given an SSG to start over a round.

borzaka avatar Sep 15 '19 23:09 borzaka

Change:

if (iRandom == 1 && g_bSniper[client] && gc_iScout_MinCT.IntValue <= GetPlayerCount(true, CS_TEAM_CT)) { if (g_iScout_CT < gc_iScout_CT.IntValue) { GivePlayerItem(client, "weapon_ssg08"); iMoney -= GetWeaponPrice("weapon_ssg08"); g_iScout_CT++; } else { GivePlayerItem(client, g_sSMG_CT[client]); iMoney -= GetWeaponPrice(g_sSMG_CT[client]); } }

To:

if (iRandom == 1 && g_bSniper[client] && gc_iScout_MinCT.IntValue <= GetPlayerCount(true, CS_TEAM_CT)) { if (g_iScout_CT < gc_iScout_CT.IntValue) { GivePlayerItem(client, "weapon_ssg08"); iMoney -= GetWeaponPrice("weapon_ssg08"); g_iScout_CT++; if (StrEqual(g_sSecondary_CT[client], "weapon_hkp2000")&&StrEqual(g_sSMG_CT[client], "weapon_deagle")) { GivePlayerItem(client, "weapon_hkp2000"); } else if (StrEqual(g_sSMG_CT[client], "weapon_deagle")) { GivePlayerItem(client, "weapon_usp_silencer"); } } else { GivePlayerItem(client, g_sSMG_CT[client]); iMoney -= GetWeaponPrice(g_sSMG_CT[client]); } } T side as well I think it will be fixed by this.or more bugs lol

LemonPAKA avatar Sep 16 '19 01:09 LemonPAKA

@LemonPAKA I think that could work on the first looks.

My solution is pretty dumb, but it works, tested. The main goal is to check that the player got SSG, or not. I'am pretty sure that there is a more sophisticated way, but I can work only from the source.

On the T side change the if around GivePlayerItem(client, "weapon_glock");

if (!StrEqual(g_sSMG_T[client], "weapon_deagle") || ((iRandom == 1 && g_bSniper[client] && gc_iScout_MinT.IntValue <= GetPlayerCount(true, CS_TEAM_T)) && (g_iScout_T-1) < gc_iScout_T.IntValue))
{
        GivePlayerItem(client, "weapon_glock");
}

borzaka avatar Sep 16 '19 08:09 borzaka

Is this an official fix for this? I my community really could use one 👍

flowerpetals avatar Dec 14 '19 19:12 flowerpetals

Any official update for this? I think this is still the best retake weapon allocator plugin, don't abandon it please!

borzaka avatar Jun 21 '20 12:06 borzaka

is there a fix comming for this, as i also would like it 👍

ninkaninus avatar Oct 23 '20 04:10 ninkaninus

@borzaka - I tested your suggestion and it seems to work for both CT and T. I will try to make a better solution when I got the time to look into it :-) I will compile a new version on my fork later today.

enghausen avatar Oct 28 '20 13:10 enghausen