Clarity
06.01.2010, 14:19
Hi,
ich bin ganz neu auf dem Gebiet LUA.
Ich hab ne Frage zu der Funktion ents.Create().
Wie kann ich damit ein bestimmtes Objekt (zB eine Melone) erstellen?
function SpawnEntity( ply, command, args )
local ent = ents.Create( args[1] )
if ( !ent:IsValid() ) then return end
local trace = ply:GetEyeTraceNoCursor()
ent:SetPos(trace.HitPos + trace.HitNormal * 32)
ent:Spawn()
ent:Activate()
end
concommand.Add( "sv_spawn_entity", SpawnEntity )
sv_spawn_entity npc_alyx
funktioniert
sv_spawn_entity prop_physics
prop at 64 -233 -116 missing modelname
funktioniert nicht...ist auch logisch, da es viele verschiedene prop_physics gibt,
aber wie definiere ich das genauer?
Danke schonmal.
ich bin ganz neu auf dem Gebiet LUA.
Ich hab ne Frage zu der Funktion ents.Create().
Wie kann ich damit ein bestimmtes Objekt (zB eine Melone) erstellen?
function SpawnEntity( ply, command, args )
local ent = ents.Create( args[1] )
if ( !ent:IsValid() ) then return end
local trace = ply:GetEyeTraceNoCursor()
ent:SetPos(trace.HitPos + trace.HitNormal * 32)
ent:Spawn()
ent:Activate()
end
concommand.Add( "sv_spawn_entity", SpawnEntity )
sv_spawn_entity npc_alyx
funktioniert
sv_spawn_entity prop_physics
prop at 64 -233 -116 missing modelname
funktioniert nicht...ist auch logisch, da es viele verschiedene prop_physics gibt,
aber wie definiere ich das genauer?
Danke schonmal.