Learning lua, could someone give me an example for something I'm trying?

So I’ve been looking through the Garrys Mod wiki lua section and didn’t see any hooks(?) that would let me do this. What I want to create, is a lua file that, when a specific (SteamID based maybe?) player has fully spawned in the server, it does something to them. Anything from setting their hp, to running a concmd, etc. The doing something to them part should be easy, but I have no idea how to go about the first part. The reason I want to do this is I want to mess with a friend on my private server as a joke. Could someone give me an example of what to do? Thank you so much.

You can use PlayerInitialSpawn; if you want to do it when they can physically start moving around, use SetupMove on its first call.

This page here Would help greatly!
You could make a table that stores specific ID’s and are the only ones affected to this.
This page here Is a good way to check
their steamID against the tables.

There are two ways you can start this out. Make sure your script is inside a serverside file.

[lua]–One
hook.Add(“PlayerInitialSpawn”, “Mess with friend function.”, function(pl)
–Anything put within this area will be run on the pl(player) argument once they first join a server.
end)

–Two
function MyFirstFunction(pl)
–Anything put within this area will be run on the pl(player) argument once they first join a server.
end
hook.Add(“PlayerInitialSpawn”, “Mess with friend function.”, MyFirstFunction)[/lua]

Also when finding hooks or whatever for gmod. I normally open google, and type something like:
“gmod wiki player spawn”
“gmod wiki tables”
“gmod wiki tutorial”
The first few links typically take your right to the page your expecting to find. It can help if you’re not familiar with all the hook names and navigating the wiki.