I use this function to wipe the knives extra. (without this function some players have 5 knives each), but I have this bug, I don't know why.
https://imgur.com/a/V8PLrYe
code:
PHP Code:
public void RemoveExtraKnives(int client)
{
int weapon = GetPlayerWeaponSlot(client, 2);
while (weapon!= -1)
{
RemovePlayerItem(client, weapon);
weapon = GetPlayerWeaponSlot(client, 2);
}
GivePlayerItem(client, "weapon_knife");
}