if(ent_create("any.mdl", vector(0, 0, 0), foobar))
{
// Your code here. You can use the you pointer to access the created entity
}
if you need a pointer other than you but keep it a one line, here you go:
Code:
if((bar = ent_create("any.mdl", vector(0, 0, 0), foobar)))
{
// Your code here.
// Note: You don't need the extra pair of parenthesizes around the if(),
// but any sophisticated compiler will warn about the assignment otherwise
}
Shitlord by trade and passion. Graphics programmer at Laminar Research. I write blog posts at feresignum.com