• Falcos Map prop file problem
    5 replies, posted
Hello guys, I am using falcos map-prop thingy since some month now. The once problem i have with it, that ragdolls and cars are nocollide to all the map-props. How to fix? Code: [lua] function RestoreMapItems(ply) if ply and not ply:IsSuperAdmin() then return end timer.Simple(1, function() local data = sql.Query("SELECT * FROM falco_worldprops;") if not data then return end for k,v in pairs(data) do if string.find(v.map, string.lower(game.GetMap())) == 1 then local ent = ents.Create("prop_physics") ent:SetPos(Vector(tonumber(v.x), tonumber(v.y), tonumber(v.z))) ent:SetAngles(Angle(v.pitch, v.yaw, v.roll)) ent:SetModel(v.model) ent:SetSolid(SOLID_VPHYSICS) ent:SetMoveType(MOVETYPE_NONE) end end end) end hook.Add( "InitPostEntity", "falco_RestoreMapItems", RestoreMapItems) concommand.Add("falco_restoremapprops", RestoreMapItems) [/lua]
I don't see why it would? This is Lua help, ask Falco it's his script.
I already did, he doesn't know.
You could try using [lua] ent:Spawn() ent:Activate() [/lua] Might work...
Tried this! Just crashed server.
[QUOTE=leeetdude;18918959]Hello guys, I am using falcos map-prop thingy since some month now. The once problem i have with it, that ragdolls and cars are nocollide to all the map-props. How to fix? Code: [lua] ent:SetMoveType(MOVETYPE_NONE) [/lua][/QUOTE] Ahem Try [lua] function RestoreMapItems(ply) if ply and not ply:IsSuperAdmin() then return end timer.Simple(1, function() local data = sql.Query("SELECT * FROM falco_worldprops;") if not data then return end for k,v in pairs(data) do if string.find(v.map, string.lower(game.GetMap())) == 1 then local ent = ents.Create("prop_physics") ent:SetPos(Vector(tonumber(v.x), tonumber(v.y), tonumber(v.z))) ent:SetAngles(Angle(v.pitch, v.yaw, v.roll)) ent:SetModel(v.model) ent:SetSolid(SOLID_VPHYSICS) ent:SetMoveType(MOVETYPE_VPHYSICS) ent:Spawn() end end end) end hook.Add( "InitPostEntity", "falco_RestoreMapItems", RestoreMapItems) concommand.Add("falco_restoremapprops", RestoreMapItems) [/lua]
Sorry, you need to Log In to post a reply to this thread.