• Adding weapons to Jailbreak 7 by Excl?
    17 replies, posted
Hello, I was wondering if it was at all possible to add custom weapons to Excl's Jailbreak 7 Gamemode? For example: I have M9K Specialties and I wan't to add the Harpoon to them pointshop. But when I add it to the shop and buy it the weapon doesn't appear in my hand. I would assume it would go in to the melee slot but this isn't the case. I believe it has to be something with Excl's lua coding. Is there anyone out there that knows how to do this? Thanks!
Can you post the console error you get when you try to buy the weapon? Also, no need for two threads.
[QUOTE=code_gs;48518172]Can you post the console error you get when you try to buy the weapon? Also, no need for two threads.[/QUOTE] ((Ah sorry. I just wanted to move the thread to the right place. I marked old one as solved.)) I get no console error when trying to buy it, it says I purchased it but nothing appears in my hand. I fixed the other things (Knife and AWP) by switching to the world model. But in this case there is no M9K stuff inside the Jailbreak game itself which I think has a set kind of primary, secondary, and other.
Are you sure the weapon class in the pointshop file matches the weapon name? Does give weapon_class_here in console in singleplayer work with the weapons installed?
I host a server with Xenon Servers and have my files on FileZilla. I have the M9K Specialties in the Addon folder and this is the code for the Pointshop Harpoon: [QUOTE] ITEM.Name = 'Harpoon' ITEM.Price = 3000 ITEM.Model = 'models/weapons/w_harpooner.mdl' ITEM.WeaponClass = 'm9k_harpoon' ITEM.SingleUse = true function ITEM:OnBuy(ply) ply:Give(self.WeaponClass) ply:SelectWeapon(self.WeaponClass) end function ITEM:OnSell(ply) ply:StripWeapon(self.WeaponClass) end function ITEM:OnHolster(ply) ply:StripWeapon(self.WeaponClass) end function ITEM:OnEquip(ply) ply:Give(self.WeaponClass) ply:SelectWeapon(self.WeaponClass) end [/QUOTE]
[QUOTE=Pew!;48518605]I host a server with Xenon Servers and have my files on FileZilla. I have the M9K Specialties in the Addon folder and this is the code for the Pointshop Harpoon:[/QUOTE] Can you go into singleplayer and type give m9k_harpoon in console with the addon installed?
Wouldn't the singleplayer gamemode be on my local hard drive? Edit: I went into my single player sandbox mode and yes I can spawn one with "give m9k_harpoon" but not in Jailbreak (mainly because I need someone to start the round with...)
[QUOTE=Pew!;48518917]Wouldn't the singleplayer gamemode be on my local hard drive? Edit: I went into my single player sandbox mode and yes I can spawn one with "give m9k_harpoon" but not in Jailbreak (mainly because I need someone to start the round with...)[/QUOTE] add a bot to the game?
[QUOTE=Knoxed;48522229]add a bot to the game?[/QUOTE] Oh ya... Um how would I go about doing that? I've never tinkered with Single player mode.
if you're using ulx there's a custom ulx command that adds a bot, [URL="http://forums.ulyssesmod.net/index.php?topic=7268.0"]http://forums.ulyssesmod.net/index.php?topic=7268.0[/URL]
Check sh_weapons.lua Hopefully that's what you need
[QUOTE=Splerge;48522701]if you're using ulx there's a custom ulx command that adds a bot, [URL="http://forums.ulyssesmod.net/index.php?topic=7268.0"]http://forums.ulyssesmod.net/index.php?topic=7268.0[/URL][/QUOTE] I followed the directions and put one file into my addons folder but its not showing up in my ulx in game. I've restarted multiple times. [QUOTE=ungh01;48523100]Check sh_weapons.lua Hopefully that's what you need[/QUOTE] In what folder...? The gamemode or...? Because the gamemode doesn't have a sh_weapons, only sh_weapon_replace. At least as far as I can find.
Bump n grind?
[QUOTE=Pew!;48523608]I followed the directions and put one file into my addons folder but its not showing up in my ulx in game. I've restarted multiple times.[/QUOTE] put it in this folder garrysmod/addons/ulx/lua/ulx/modules/sh if there is only sh_weapons_replace then it's probably the file you want
[QUOTE=Splerge;48526874]put it in this folder garrysmod/addons/ulx/lua/ulx/modules/sh [/QUOTE] Or you could just type rcon bot into your console...
[QUOTE=Splerge;48526874]put it in this folder garrysmod/addons/ulx/lua/ulx/modules/sh if there is only sh_weapons_replace then it's probably the file you want[/QUOTE] Ok I've added the commands to my ULX on MY SERVER and they all work. But I tried to do the give command with the m9k_harpoon and it didn't give me it. As for single player I cannot give it to me because I don't have ulx installed in my local server (which is what I though would happen when told to try it in single player). So now that I have the custom commands loaded on my server what do it do with the sh_weapons_replace?? I would post the code for it but I don't know if I would get in trouble for posting Excl's code here. It has a disclaimer and everything... [QUOTE=SexyBeast70;48526950]Or you could just type rcon bot into your console...[/QUOTE] Tried that and it didn't work... Only getting a massive wall of yellow text in console. ~~~~~~~~~ Edit: When I go into the Murder gamemode I CAN give m9k_harpoon, so it had to be something with the Jailbreak code.
you may have to look through Excl's gamemode yourself, the thing you need to look for are hooks like OnWeaponPickup because I'm pretty sure Jailbreak 7 overrides all of that - instead of using the give command, try typing "ulx ent m9k_harpoon" and it should spawn a harpoon a few feet away from you if it's correctly installed.
[QUOTE=Splerge;48532660]you may have to look through Excl's gamemode yourself, the thing you need to look for are hooks like OnWeaponPickup because I'm pretty sure Jailbreak 7 overrides all of that - instead of using the give command, try typing "ulx ent m9k_harpoon" and it should spawn a harpoon a few feet away from you if it's correctly installed.[/QUOTE] Dang. I really didn't wanna have to do that. Lua code is so confusing. Thanks though. I'll try it out.
Sorry, you need to Log In to post a reply to this thread.