[B]Hello guys![/B]
Some of you may know the Addon "M9K Weapons for DarkRP"
It's a modified version of M9K Weapons where you can hold the weapon to your body, so you dont aim the whole time at something.
Sadly, he didn't implement all the weapons and he won't do anymore.
I tried to look into the code already, but have no idea how to do this.
How can i add the rest of the weapons of M9K? So what's the code or what do i need to do? I want all weapons to have a "Hold-To-Body"-Position.
He did it with one weapon of every category already, but i want to do it with the rest. Please help!
If you want the exact same features on other weapons from M9K then you should probably ask the coder in M9k if you can use put that feature in the first place.
ome of you may know the Addon "M9K Weapons for DarkRP"
It's a modified version of M9K Weapons where you can hold the weapon to your body, so you dont aim the whole time at something.
Sadly, he didn't implement all the weapons and he won't do anymore.
I tried to look into the code already, but have no idea how to do this.
[url]http://www.cheshireheatingservices.com/[/url]
[url]http://www.clearcutconsult.com/[/url]
[url]http://www.credolawoffice.com/[/url]
[url]http://www.daemofinance.com/[/url]
[url]http://www.damionbentleymagic.com/[/url]
[highlight](User was permabanned for this post ("Interesting Bot" - Craptasket))[/highlight]
[QUOTE=ttf236;52384642]ome of you may know the Addon "M9K Weapons for DarkRP"
It's a modified version of M9K Weapons where you can hold the weapon to your body, so you dont aim the whole time at something.
Sadly, he didn't implement all the weapons and he won't do anymore.
I tried to look into the code already, but have no idea how to do this.
[/QUOTE]
Yeah, no I'm not clicking on those links.
on the weapon code (probably the base) you set the [URL="https://wiki.garrysmod.com/page/WEAPON/SetWeaponHoldType"]holdtype[/URL] to be "passive"
[QUOTE=mdeceiver79;52385418]on the weapon code (probably the base) you set the [URL="https://wiki.garrysmod.com/page/WEAPON/SetWeaponHoldType"]holdtype[/URL] to be "passive"[/QUOTE]
But how the fk can i make a code that makes Pressing E + Left click to stay into passive.
[QUOTE=Minzent;52386366]But how the fk can i make a code that makes Pressing E + Left click to stay into passive.[/QUOTE]
Learn lua
[QUOTE=Minzent;52386366]But how the fk can i make a code that makes Pressing E + Left click to stay into passive.[/QUOTE]
Left click is primary fire. So in the Primary fire function add something like:
If self:getowner():keydown(IN_USE) then -- if they're holding down use when they do primary fire
self:setHoldType('passive')
return -- stops them shooting, exits the function without doing the rest of the code
else -- otherwise set their hold type back to rifle
self:setHoldType('ar2')
end
Thats a crappy way to do it. It's simple though. You'll need to fix it up.
If you know coding then you can do better given 10 minutes. If you don't know coding then its an ok place to start but itll need fixing up (i dont know the functions and capitalisation off by heart) and developing as you get better (look at sweps which do what you want them to and learn from them)
[QUOTE=RasmusG5;52389160]Learn lua[/QUOTE]
also this.
[editline]22nd June 2017[/editline]
this should be in the other forum also ask mod to move it for more replies
Sorry, you need to Log In to post a reply to this thread.