Post: [Official] Way to get host entity
10-02-2012, 10:53 PM #1
(adsbygoogle = window.adsbygoogle || []).push({}); This is really old, and a built in function. IW made things for reason but I see silly scripts to get the host name. (or host ent for that matter)

Just use this:
    
/#level.host_ent = GetEntByNum( 0 );#/


You need the /# as it's a dev command. 0 is always the host entity. Congratulations.
(adsbygoogle = window.adsbygoogle || []).push({});

The following 3 users say thank you to Jakes625 for this useful post:

Kitty=^.^=, Taylor, Vampytwistッ
10-02-2012, 11:07 PM #2
Taylor
Former Black Knight.
Originally posted by GAMER View Post
This is really old, and a built in function. IW made things for reason but I see silly scripts to get the host name. (or host ent for that matter)

Just use this:
    
/#level.host_ent = GetEntByNum( 0 );#/


You need the /# as it's a dev command. 0 is always the host entity. Congratulations.


Nice, But Why Has isHost(), So Why Not Just Use That?
10-02-2012, 11:09 PM #3
Originally posted by xYARDSALEx View Post
Nice, But Why Has isHost(), So Why Not Just Use That?


they are two different things.

isHost() checks if the entity that called that function is host.

This gets the entity.. for example:

/#level.host_ent = GetEntByNum( 0 );#/
elem setText( level.host_ent.name );
10-02-2012, 11:10 PM #4
Taylor
Former Black Knight.
Originally posted by GAMER View Post
they are two different things.

isHost() checks if the entity that called that function is host.

This gets the entity.. for example:

/#level.host_ent = GetEntByNum( 0 );#/
elem setText( level.host_ent.name );


well level.hostname works the same and i believe less characters.

EDIT: Then yet again with what you posted you can do elem setText( level.host_ent getName() );

So No Clantag Winky Winky
10-02-2012, 11:16 PM #5
Originally posted by xYARDSALEx View Post
well level.hostname works the same and i believe less characters.

EDIT: Then yet again with what you posted you can do elem setText( level.host_ent getName() );

So No Clantag Winky Winky


yeah, but it's different on pc.

Plus this gets the entity so you can do anything with it haha.
10-02-2012, 11:23 PM #6
Taylor
Former Black Knight.
Originally posted by GAMER View Post
yeah, but it's different on pc.

Plus this gets the entity so you can do anything with it haha.


like:

    
onPlayerSpawned()
{
for(;Winky Winky
{
self waittill("spawned_player");
self thread PlayerBullshit();
level.host_ent thread HostShit();
}
}

The following 2 users say thank you to Taylor for this useful post:

PnuTGamer

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo