dataviruset / sm-hosties

The ultimate jailbreak plugin for SourceMod
https://forums.alliedmods.net/forumdisplay.php?f=155
GNU General Public License v3.0
29 stars 27 forks source link

Fix taser csgo #71

Closed shanapu closed 7 years ago

shanapu commented 7 years ago

This PR fix the weapon striping in csgo when a player got an taser. In csgo taser & knife share the knife slot. hosties strips this slot only once. This PR fix this. stupid me used for this fix the same branch as for PR #60. So ignore the commits from Oct. and when like the change implement commit https://github.com/shanapu/sm-hosties/commit/952845abb763bf02463d76a31d04c5342b5395bc for yourself.

data-bomb commented 7 years ago

Good initiative, but let's fix this for the next time instead of adding the bandaid for the taser situation. What about something like this? So if they double another slot it should help. It would need testing with a full complement of grenades to see what happens.

int wepIdx;
for (int i = CS_SLOT_PRIMARY; i < CS_SLOT_GRENADE+1; i++)
{
    while ((wepIdx = GetPlayerWeaponSlot(client, i)) != -1)
    {
        RemovePlayerItem(client, wepIdx);
        AcceptEntityInput(wepIdx, "Kill");
    }
}
data-bomb commented 7 years ago

Duplicate of #74