Hi.
Its possible to make a Script what remove your godmode and take your noclip when you type !War?
[lua]
concommand.Add("war", function(ply, cmd, argms)
ply:GodDisable()
ply:SetMoveType( MOVETYPE_WALK )
end)
hook.Add( "PlayerSay", "Chatcmd", function(ply, text, pblc)
if string.lower(text) == "!war" then
ply:ConCommand("war")
end)
[/lua]
Didn't test but that should work, now before you come saying you don't know what to do with it:
1st: Copy that code, open NotePad++ or the normal windows notepad.
2nd:
IF you are using Notepad++, select the language as lua and save it as a lua file of any name, e.g: war.lua
IF you are using windows notepad, when you are saving it, at the dropdown list, select ALL FILES rather than Text File and again, save it as a lua file of any name, e.g: war.lua
3rd: go to your garry's mod folder, go to "YOURSTEAMNAMEHERE\garrysmod\garrysmod\lua\autorun" and if there isn't a folder named [b]server[/b], make one, and throw your file at the server folder.
Start Single player or a listen server, enter noclip and type !War, you should probably leave noclip.
I made so it isn't case sensitive, so you may type it as !WAR or !WaR or !wAr or anything like that...
The Plugin dont works..
[lua]
concommand.Add("war", function(ply, cmd, argms)
ply:GodDisable()
ply:SetMoveType( MOVETYPE_WALK )
end)
hook.Add( "PlayerSay", "Chatcmd", function(ply, text, pblc)
if string.lower(text) == "!war" then
ply:ConCommand("war")
end
end)
[/lua]
There, fixed it.
You should take a look at this gamemode I'm making
[url]http://facepunch.com/showthread.php?t=1196359[/url]
Sorry, you need to Log In to post a reply to this thread.