coding log addon

I’m kinda new to coding in lua but i would like to know what lua code i should use to grab information about when someone spawned a prop and also the name of the player who did it and putting the logs into a vgui…

-snip-

Look at the hooks for all of the PlayerSpawned* (e.g. PlayerSpawnedSENT, PlayerSpawnedProp, etc). Use something like…



hook.Add("PlayerSpawnedProp", "Log_Spawns", function(ply, model, ent)
    --do something here
end)