Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not giving any pistols on Force Buy Round with SSG #13

Open
borzaka opened this issue Sep 15, 2019 · 8 comments
Open

Not giving any pistols on Force Buy Round with SSG #13

borzaka opened this issue Sep 15, 2019 · 8 comments
Assignees
Labels
bug Something isn't working

Comments

@borzaka
Copy link
Contributor

borzaka commented Sep 15, 2019

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

@shanapu
Copy link
Owner

shanapu commented Sep 15, 2019

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

@shanapu shanapu self-assigned this Sep 15, 2019
@shanapu shanapu added the bug Something isn't working label Sep 15, 2019
@borzaka
Copy link
Contributor Author

borzaka commented Sep 15, 2019

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.

@LemonPAKA
Copy link
Contributor

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

@borzaka
Copy link
Contributor Author

borzaka commented Sep 16, 2019

@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");
}

@flowerpetals
Copy link

flowerpetals commented Dec 14, 2019

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

@borzaka
Copy link
Contributor Author

borzaka commented Jun 21, 2020

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

@ninkaninus
Copy link

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

@enghausen
Copy link

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants