• Walk on Water
    9 replies, posted
Basicly as the title says. can someone make a lua script to walk on water? here how i would want it if possible. make it a command so you can bind it to a key so you can go in the water too
[QUOTE=zeraknight;17059069]Basicly as the title says. can someone make a lua script to walk on water? here how i would want it if possible. make it a command so you can bind it to a key so you can go in the water too[/QUOTE] Like the Jesus of Gmod?
[QUOTE=TacoNinja;17059098]Like the Jesus of Gmod?[/QUOTE] yeah i guess xD
Jesus Christ!!
seriously? could someone make this and stop with the random funny comments? xD
[QUOTE=zeraknight;17065813]seriously? could someone make this and stop with the random funny comments? xD[/QUOTE] it WOULD be pretty awesome.
Ask this guy [url]http://www.facepunch.com/showpost.php?p=16878857&postcount=73[/url]
[QUOTE=Nerdeboy;17072947]Ask this guy [url]http://www.facepunch.com/showpost.php?p=16878857&postcount=73[/url][/QUOTE] Omg that's awesome
[lua]function walkOnWater() if AllowWalk:GetInt() == 1 then for k, v in pairs( player.GetAll() ) do if v:WaterLevel() > 0 then if v.walkWater == 0 then v.waterEnt = ents.Create( "prop_physics" ) v.waterEnt:SetModel( "models/props_c17/streetsign001c.mdl" ) v.waterEnt:SetPos( v:GetPos() - Vector( 0, 0, 1 ) ) v.waterEnt:SetAngles( Vector(0,0,90) ) v.waterEnt:SetColor(0,0,0,0) v.waterEnt:Spawn() v.waterEnt:Activate() v.waterEnt:PhysWake() v.waterEntPhys = v.waterEnt:GetPhysicsObject() v.waterEntPhys:EnableMotion(false) v.walkWater = 1 end if v.waterEnt and v.waterEnt:IsValid() then v.waterEnt:SetPos( v:GetPos() - Vector( 0, 0, 0.17 ) ) end else v.walkWater = 0 if v.waterEnt then if v.waterEnt:IsValid() then v.waterEnt:Remove() v.waterEnt = nil end end end end end end hook.Add( "Think", "walkOnWater", walkOnWater ) AllowWalk = CreateConVar( "walkOnWater", 0 ) [/lua] Not actually tested multiplayer. Commands [i]walkOnWater [b]0[/b]/[b]1[/b][/i] [i]0[/i] being off, [i]1[/i] being on. Save in lua/autorun/server as whateveryouwant.lua Or just go here for a release thread; [url]http://www.facepunch.com/showthread.php?p=17074671[/url]
[QUOTE=JSharpe;17073783][lua]function walkOnWater() if AllowWalk:GetInt() == 1 then for k, v in pairs( player.GetAll() ) do if v:WaterLevel() > 0 then if v.walkWater == 0 then v.waterEnt = ents.Create( "prop_physics" ) v.waterEnt:SetModel( "models/props_c17/streetsign001c.mdl" ) v.waterEnt:SetPos( v:GetPos() - Vector( 0, 0, 1 ) ) v.waterEnt:SetAngles( Vector(0,0,90) ) v.waterEnt:SetColor(0,0,0,0) v.waterEnt:Spawn() v.waterEnt:Activate() v.waterEnt:PhysWake() v.waterEntPhys = v.waterEnt:GetPhysicsObject() v.waterEntPhys:EnableMotion(false) v.walkWater = 1 end if v.waterEnt and v.waterEnt:IsValid() then v.waterEnt:SetPos( v:GetPos() - Vector( 0, 0, 0.17 ) ) end else v.walkWater = 0 if v.waterEnt then if v.waterEnt:IsValid() then v.waterEnt:Remove() v.waterEnt = nil end end end end end end hook.Add( "Think", "walkOnWater", walkOnWater ) AllowWalk = CreateConVar( "walkOnWater", 0 ) [/lua] Not actually tested multiplayer. Commands [i]walkOnWater [b]0[/b]/[b]1[/b][/i] [i]0[/i] being off, [i]1[/i] being on. Save in lua/autorun/server as whateveryouwant.lua Or just go here for a release thread; [url]http://www.facepunch.com/showthread.php?p=17074671[/url][/QUOTE] ty very much :D
Sorry, you need to Log In to post a reply to this thread.