• code not working
    2 replies, posted
As soon i try to use this code, the server wont start: :v: [code]function BlockCave() if game.GetMap() == "rp_evocity_v2d" or game.GetMap() == "RP_EvoCity_v2d" then local prop = ents.Create( "prop_physics" ) prop:SetPos( Vector(334.911041, 14592.786133, 256.710052) ) prop:SetModel( "models/props_combine/combineinnerwall001c.mdl" ) prop:SetNWString("Owner", "World") prop:Spawn() prop:SetAngles(Angle(90, 0, 0)) prop:PhysicsInit(SOLID_VPHYSICS) prop:SetMoveType(MOVETYPE_NONE) prop:SetSolid(SOLID_VPHYSICS) Msg("EvoCity CaveBlock Spawned\n") local phys = prop:GetPhysicsObject() if phys:IsValid() then phys:Wake() end local prop2 = ents.Create( "prop_physics" ) prop2:SetPos( Vector(334.911041, 13074.386, 256.710052) ) prop2:SetModel( "models/props_combine/combineinnerwall001c.mdl" ) prop2:SetNWString("Owner", "World") prop2:Spawn() prop2:SetAngles(Angle(90, 0, 0)) prop2:PhysicsInit(SOLID_VPHYSICS) prop2:SetMoveType(MOVETYPE_NONE) prop2:SetSolid(SOLID_VPHYSICS) local phys2 = prop2:GetPhysicsObject() if phys2:IsValid() then phys2:Wake() end local prop3 = ents.Create( "prop_physics" ) prop3:SetPos( Vector(334.911041, 11631.906, 256.710052) ) prop3:SetModel( "models/props_combine/combineinnerwall001c.mdl" ) prop3:SetNWString("Owner", "World") prop3:Spawn() prop3:SetAngles(Angle(90, 0, 0)) prop3:PhysicsInit(SOLID_VPHYSICS) prop3:SetMoveType(MOVETYPE_NONE) prop3:SetSolid(SOLID_VPHYSICS) local phys3 = prop3:GetPhysicsObject() if phys3:IsValid() then phys3:Wake() end prop:SetNWBool("noclip", true) prop:SetColor(0,0,0,0) prop2:SetNWBool("noclip", true) prop2:SetColor(0,0,0,0) prop3:SetNWBool("noclip", true) prop3:SetColor(0,0,0,0) end end hook.Add("InitPostEntity", "BlockCave", BlockCave) hook.Call("InitPostEntity", "BlockCave", BlockCave)[/code] Any help? And where do you need to put it exactly when using cider? the init or the cleanmap plugin?
Doesnt this stuff: [code] prop:PhysicsInit(SOLID_VPHYSICS) prop:SetMoveType(MOVETYPE_NONE) prop:SetSolid(SOLID_VPHYSICS) [/code] Go before the prop:Spawn() of the entity? And whats the point in the hook.Call?
Ok, so i did this, Now its an instant crash when people join. sum more help :v:
Sorry, you need to Log In to post a reply to this thread.