-
Notifications
You must be signed in to change notification settings - Fork 20
M1DE Adding Weapons
Kamzik123 edited this page Oct 3, 2020
·
4 revisions
addWeapon = [[
weapon_name = "sg_barker_a_v1" -- Change this to your desired weapon
ammo_ammount = 2
active_weapon = game.game:GetActivePlayer():InventoryGetSelected()
if active_weapon == "empty" then
game.game:GetActivePlayer():InventoryAddWeapon(weapon_name, ammo_ammount)
else
game.game:GetActivePlayer():InventoryRemoveWeapon(active_weapon);
game.game:GetActivePlayer():InventoryAddWeapon(weapon_name, ammo_ammount);
end
]]
This script will check if you have any weapons in your hand and either give you one or replace the one you have. To add a weapon simply run the script while empty handed and to replace a weapon, first select the one you want to replace ingame and then run the script. Do not add more than the maximum ammount of ammo for each weapon, as it will make the game crash. You also shouldn't try replacing a holstered weapon.
Weapon | Name | ID |
---|---|---|
Semi-Auto Pistol | p_mast_a_v1 | 2 |
Gold Pistol | p_mast_a_v2 | 3 |
Magnum Pistol | rev_alf_b_v1 | 4 |
Sniper | sn_mayw_a_v1 | 6 |
Service Revolver | rev_alf_a_v1 | 9 |
Shotgun | sg_barker_a_v1 | 13 |
Golden Shotgun | sg_barker_a_v2 | 14 |
Lupara | sg_lupara_a_v1 | 15 |
Bolt-Action Rifle | rif_mayw_a_v1 | 32 |
Pocket Revolver | rev_mast_special_a_v1 | 33 |
Test Railgun | test_railgun | 34 |
Golden Pocket Revolver | rev_mast_special_a_v2 | 36 |
Tommy Gun | smg_trench_a_v1 | 84 |
Golden Tommy Gun | smg_trench_a_v2 | 85 |
Baseball Bat | wep_baseball_bat_a_v1 | 100 |
Knife | wep_knife_a_v1 | 101 |
Brass Knuckles | wep_knuckle_a_v1 | 102 |
Wooden Plank | wep_wooden_plank_a_v1 | 103 |
Crowbar | wep_crowbar_a_v1 | 104 |
Pipe | wep_metal_bar_a_v1 | 105 |
addGrenade = [[ game.game:GetActivePlayer():InventoryAddGrenades(2) ]]