Making a npc spawn on a certain entity?

I’ve been stuck on this for about a hour I have no clue how to start coding it! I do not want you to code it for me how am I suppose to learn if someone codes it for me. All I need is the methods and functions I would need to do that.

So if you could post what method or fuctions I need and why I would need it.

Get the OBBMax of the entity you want to spawn the npc on top of for the z coordinate. Get the OBBCenter for the x and y coords, then ents.Create to spawn the npc, NPC:SetPos( Vector ) to position it using the previous positions. Be sure to Spawn( )/Activate( ) the NPC after SetModel( String )'ing the NPC.

I’ve used this method before it works %100

I got it too work thanks