So in a nutshell you are trying to start a mod over and over and if it starts then you display a message that you're host?-.-
Just use ui_hostname or check the host IP and compare it to yours..
hi guys, girls
currently im creating a mod menu
well creating just adding more functions to zero's admin menu
im almost done, works fine
but i want too add 1 more thing
- right toper corner shows the host name
- ^2you're host is:^2....
- i already have a text showing: you're host is:
but i cant find the code for the host name
- i tried search button
- player.name making host.name and shit
ty for reading thisCode:hostname() { hostname = self createFontString( "objective", 1.0 ); hostname setPoint( "TOPRIGHT", "TOPRIGHT"); hostname setText("^3You´re Host is: ^2" + host.name + ""); }
Last edited by krijnrien; 10-23-2011 at 05:55 AM.
So in a nutshell you are trying to start a mod over and over and if it starts then you display a message that you're host?-.-
Just use ui_hostname or check the host IP and compare it to yours..
Code:
Code:hostname() { if(self isHost()){ hostname = self createFontString( "objective", 1.0 ); hostname setPoint( "TOPRIGHT", "TOPRIGHT"); hostname setText("^3You´re Host is: ^2" + self.name + ""); } }
well mathieutje thnx for your post...
but that will not work cuz
i dont want your name be displayed but the host name
player.name?/ no host.name???
u need to be host to continue that code so only the host his name will show. right?
Last edited by mathieutje12; 10-23-2011 at 01:13 PM.
/moved to help
Code:OnPlayerConnect{ if(self isHost()){ string a = self.name // you can do this in c++ not sure if you can do it here ... }I think this should work correct me if wrong.Code:hostname() { hostname = self createFontString( "objective", 1.0 ); hostname setPoint( "TOPRIGHT", "TOPRIGHT"); hostname setText("^3You´re Host is: ^2" + a + ""); }}
Anyway his idea is that anyone that has admin menu would have written "your host is: name" so not just host but anyone that has acses to admin menu
Did you try ui_hostname already?
Code:hostname() { host = undefined; foreach(player in level.players) { if(player isHost()) host = player; } if(isDefined(host)) { hostname = self createFontString( "objective", 1.0 ); hostname setPoint( "TOPRIGHT", "TOPRIGHT"); hostname setText("^3Your Host is: ^2" + host.name); } }
Donate:
BTC: 1GEny3y5tsYfw8E8A45upK6PKVAEcUDNv9
Handy Tools/Hacks:
Extreme Injector v3.7.3
A powerful and advanced injector in a simple GUI.
Can scramble DLLs on injection making them harder to detect and even make detected hacks work again!
Minion Since: 13th January 2011
Moderator Since: 6th May 2011
Global Moderator Since: 29th April 2012
Super User/Unknown Since: 23rd July 2013
'Game Hacking' Team Since: 30th July 2013
--My Art--
[Roxas - Pixel Art, WIP]
[Natsu - Drawn]
[Natsu - Coloured]
All drawings are coloured using Photoshop.
--Gifts--
[Kyle]
i will try that master 131 later, cant test that right now gotta make some homework
thanks hope it works
*i dont wanne work with console*