Post by Omen on Dec 23, 2008 9:29:11 GMT -5
Many know there is a problem with the RTS selector weapon.
Its give order and select when it should not.
All these bugs came after the Garry's mod update so it nothing wrong with the scripting only some thing fuck't it up.
Well i bean working on this project that make you be able to use only you mouse to give order and select melons.(implanted into the RTS selector later)
Well it not a perfect script this but it work hell much better then normal RTS selector.
What it can do.
Select melon's in sphere.
Select melon's by class.
Select melon's one and one.
Multi select.
Give orders.
Give Guard order.(stay on object.)
Give Patrol orders.(multi point's too)
What it can't do. (will try to fix)
Give Stance.
Stop/Start Fire.
Problems with having the Context menu open and pressing LMB
How to install.
Make a text file in garrysmod\lua\autorun\client
Name it "MWorder.lua" make sure it's a lua file.
Open it with a text editor.(NotePad)
Copy the text below and past it into the file and save.
Now start up the game and in the console type "unbind mouse1" (you have to do this, i am sorry but could not find any other way to fix it.)
And that should be it. Happy Melon War
O yes almost forgot to tell you how to use it.
It just like the RTS selector weapon but you have to hold down you middle mouse button. (you'r scroll)
The Code!
Its give order and select when it should not.
All these bugs came after the Garry's mod update so it nothing wrong with the scripting only some thing fuck't it up.
Well i bean working on this project that make you be able to use only you mouse to give order and select melons.(implanted into the RTS selector later)
Well it not a perfect script this but it work hell much better then normal RTS selector.
What it can do.
Select melon's in sphere.
Select melon's by class.
Select melon's one and one.
Multi select.
Give orders.
Give Guard order.(stay on object.)
Give Patrol orders.(multi point's too)
What it can't do. (will try to fix)
Give Stance.
Stop/Start Fire.
Problems with having the Context menu open and pressing LMB
How to install.
Make a text file in garrysmod\lua\autorun\client
Name it "MWorder.lua" make sure it's a lua file.
Open it with a text editor.(NotePad)
Copy the text below and past it into the file and save.
Now start up the game and in the console type "unbind mouse1" (you have to do this, i am sorry but could not find any other way to fix it.)
And that should be it. Happy Melon War
O yes almost forgot to tell you how to use it.
It just like the RTS selector weapon but you have to hold down you middle mouse button. (you'r scroll)
The Code!
local KeyEvents = false
local function KeyThink() // mouse1
if ( input.IsMouseDown(107) && !KeyEvents && input.IsMouseDown(109)) then
RunConsoleCommand("+wmselect")
KeyEvents = true
elseif ( !input.IsMouseDown(107) && KeyEvents && input.IsMouseDown(109)) then // The key has been released
RunConsoleCommand("-wmselect")
KeyEvents = false
elseif ( input.IsMouseDown(107) && !input.IsMouseDown(109) && !input.IsKeyDown(27)) then
RunConsoleCommand("+attack")
elseif ( !input.IsMouseDown(107) && !input.IsMouseDown(109) && !input.IsKeyDown(27)) then
RunConsoleCommand("-attack")
end
end
hook.Add("Think", "KeyThink", KeyThink)
local function KeyThink2() //mouse2
if ( input.IsMouseDown(108) && input.IsMouseDown(109)) then
RunConsoleCommand("wmorder")
elseif ( input.IsMouseDown(108) && !input.IsMouseDown(109)) then
RunConsoleCommand("+attack2")
elseif ( !input.IsMouseDown(108) && !input.IsMouseDown(109)) then
RunConsoleCommand("-attack2")
end
end
hook.Add("Think", "KeyThink2", KeyThink2)