Replace spawned entity with vehicle after pressing the use button?

So, the title is really self-explanatory. I want to make a vehicle spawn after pressing the use button on an entity I created.

I have gotten this far…

function ENT:Use(a , c)

end

I just need to know what to put in-between the parts really, or if there’s anything I need to change about that?

Can this be explained in more detail?

Read the example

Yeah, I’m a bit of a noob

[editline]5th September 2017[/editline]

Ok, nevermind… I figured out how to use it, but obviously it holds it until you let go, which means it spawns multiple…I found the wiki page that explains how to make it only do it once per use, but I can’t quite figure out how to put it all together…

***function ENT:Use(a , c)

local vehicle = ents.Create( “comsu_assassin” )
if ( !IsValid( vehicle ) ) then return end // Check whether we successfully made an entity, if not - bail
vehicle:SetModel( “models/suits/neo_heavy.mdl” )
vehicle:SetPos( Vector( 0, 0, 100 ) )
vehicle:Spawn()

end***

Wanna make that only happen once basically each time I press E.

Here’s the wiki link: https://wiki.garrysmod.com/page/Entity/SetUseType

But I just can’t merge the two!

What do you mean with put “All together”, explain what do you really want

It’s fine, i’ve figured that part out… got another problem, but I don’t want to waste any more of your time so I will look elsewhere for help

You can make a new thread, or just post it here