public override void PlayerDroppedWeapon(string wepName, int count) { if (wepName == "WEAPON_PISTOL") { WeaponPickup item = new WeaponPickup(GameMap, "WEAPON_PISTOL", (uint)GetHashKey("WEAPON_PISTOL"), GetHashKey("W_PI_PISTOL"), Game.Player.Character.Position, true, 5000, 1, -1); item.Throw(); } base.PlayerDroppedWeapon(wepName, count); }
public void DropWeapon() { if (Game.PlayerPed.Weapons.Current.Hash.ToString() == "Unarmed") { return; } foreach (WeaponPickup wep in GameMap.CreatedWeapons.Values.ToList()) { if ((wep.WorldModel == Game.PlayerPed.Weapons.Current.Model.GetHashCode())) { WeaponPickup item = new WeaponPickup(GameMap, wep.WeaponModel, wep.WeaponHash, wep.WorldModel, Game.Player.Character.Position, true, 1500, Game.PlayerPed.Weapons.Current.Ammo, Game.PlayerPed.Weapons.Current.AmmoInClip); item.Throw(); RemoveWeapon(wep.WeaponModel, true); break; } } }