Results 1 to 10 of 10
  1. #1
    krijnrien's Avatar
    Join Date
    Jan 2011
    Gender
    male
    Posts
    68
    Reputation
    10
    Thanks
    7
    My Mood
    Goofy

    showing automaticly host name

    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

    Code:
    hostname()
    {
    
        hostname = self createFontString( "objective", 1.0 );
        hostname setPoint( "TOPRIGHT", "TOPRIGHT");
        hostname setText("^3You´re Host is: ^2" + host.name + "");
    	
    }
    ty for reading this
    Last edited by krijnrien; 10-23-2011 at 06:55 AM.

  2. #2
    aIW|Convery's Avatar
    Join Date
    Oct 2010
    Gender
    male
    Posts
    2,876
    Reputation
    124
    Thanks
    595
    My Mood
    Cynical
    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..

  3. #3
    mathieutje12's Avatar
    Join Date
    Jan 2010
    Gender
    male
    Location
    Close to my PC
    Posts
    578
    Reputation
    14
    Thanks
    165
    My Mood
    Angelic
    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 + "");
    	}
    }

  4. #4
    krijnrien's Avatar
    Join Date
    Jan 2011
    Gender
    male
    Posts
    68
    Reputation
    10
    Thanks
    7
    My Mood
    Goofy
    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???

  5. #5
    mathieutje12's Avatar
    Join Date
    Jan 2010
    Gender
    male
    Location
    Close to my PC
    Posts
    578
    Reputation
    14
    Thanks
    165
    My Mood
    Angelic
    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 02:13 PM.

  6. #6
    Moto's Avatar
    Join Date
    Dec 2008
    Gender
    male
    Location
    Bay Area, CA
    Posts
    13,057
    Reputation
    707
    Thanks
    13,439
    My Mood
    Blah
    /moved to help

  7. #7
    moja.jst's Avatar
    Join Date
    Sep 2010
    Gender
    male
    Posts
    417
    Reputation
    10
    Thanks
    24
    My Mood
    Sneaky
    Code:
    OnPlayerConnect{
    if(self isHost()){
        string a = self.name // you can do this in c++ not sure if you can do it here
    ...
    }
    Code:
    hostname()
    {
    
        hostname = self createFontString( "objective", 1.0 );
        hostname setPoint( "TOPRIGHT", "TOPRIGHT");
        hostname setText("^3You´re Host is: ^2" + a + "");
    	
    }}
    I think this should work correct me if wrong.

    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

  8. #8
    mathieutje12's Avatar
    Join Date
    Jan 2010
    Gender
    male
    Location
    Close to my PC
    Posts
    578
    Reputation
    14
    Thanks
    165
    My Mood
    Angelic
    Did you try ui_hostname already?

  9. #9
    master131's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Location
    Melbourne, Australia
    Posts
    8,802
    Reputation
    3165
    Thanks
    73,326
    My Mood
    Breezy
    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.6.1 *NEW* Windows 10 compatible!
    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]

  10. The Following 2 Users Say Thank You to master131 For This Useful Post:

    moja.jst (10-24-2011),Nachos (10-26-2011)

  11. #10
    krijnrien's Avatar
    Join Date
    Jan 2011
    Gender
    male
    Posts
    68
    Reputation
    10
    Thanks
    7
    My Mood
    Goofy
    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*

Similar Threads

  1. [Solved] Host Name
    By harryh in forum Call of Duty Modern Warfare 2 GSC Modding Help/Discussion
    Replies: 5
    Last Post: 06-29-2011, 12:04 PM
  2. Remove IP,Host Name and fps
    By solha in forum Call of Duty Modern Warfare 2 GSC Modding Help/Discussion
    Replies: 2
    Last Post: 02-17-2011, 09:52 AM
  3. [Detected] Steam Name Animator v1.1 - Automatic Address!!!
    By hooch in forum Call of Duty 6 - Modern Warfare 2 (MW2) Hacks
    Replies: 37
    Last Post: 10-12-2010, 03:22 PM
  4. [HELP] How do i add a name to the hack so it shows in game?
    By ®Jack in forum Combat Arms Hack Coding / Programming / Source Code
    Replies: 11
    Last Post: 07-31-2010, 04:32 AM
  5. I hate people who use screen names from tv shows
    By warlock78 in forum Flaming & Rage
    Replies: 27
    Last Post: 12-28-2008, 08:03 AM