From 4adec24c3a2a53f518d817ae8a6ddd0c4c47422c Mon Sep 17 00:00:00 2001 From: Alexander Pickering Date: Wed, 25 May 2016 22:06:26 -0400 Subject: more work on the structure system --- gamemode/server/admin_commands.lua | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'gamemode/server/admin_commands.lua') diff --git a/gamemode/server/admin_commands.lua b/gamemode/server/admin_commands.lua index 284792c..d21c884 100644 --- a/gamemode/server/admin_commands.lua +++ b/gamemode/server/admin_commands.lua @@ -1,7 +1,11 @@ concommand.Add( "gms_admin_maketree", function( ply ) if ( IsValid( ply ) && !ply:IsAdmin() ) then ply:SendMessage( "You need admin rights for this!", 3, Color( 200, 0, 0, 255 ) ) return end local tr = ply:TraceFromEyes( 10000 ) - GAMEMODE.MakeTree( tr.HitPos ) + local ent = ents.Create( "gms_tree" ) + ent:SetPos( tr.HitPos ) + ent:Spawn() + ent.GMSAutoSpawned = true + ent:SetNWString( "Owner", "World" ) end ) concommand.Add( "gms_admin_makerock", function( ply ) @@ -28,7 +32,7 @@ concommand.Add( "gms_admin_makeantlionbarrow", function( ply, cmd, args ) local ent = ents.Create( "gms_antlionbarrow" ) ent:SetPos( tr.HitPos ) ent:Spawn() - ent:SetNetworkedString( "Owner", "World" ) + ent:SetNWString( "Owner", "World" ) ent:SetKeyValue( "MaxAntlions", args[1] ) end ) @@ -132,7 +136,7 @@ concommand.Add( "gms_admin_populatearea", function( ply, cmd, args ) ent:SetModel( GMS.RockModels[math.random( 1, #GMS.RockModels )] ) ent:SetPos( groundtrace.HitPos ) ent:Spawn() - ent:SetNetworkedString( "Owner", "World" ) + ent:SetNWString( "Owner", "World" ) ent:Fadein() ent.PhysgunDisabled = true ent:GetPhysicsObject():EnableMotion( false ) -- cgit v1.2.3-70-g09d2