Page 2 of 2 FirstFirst 12
Results 11 to 20 of 20

Thread: Using iprintln(); to display an image?

  1. #11
    Private First Class
    Join Date
    Oct 2013
    Posts
    219
    Thanks
    56
    Thanked 105 Times in 66 Posts
    Starting to look finished;

    Attached Thumbnails Attached Thumbnails cod2proggy.png  

  2. #12
    Private First Class
    Join Date
    Oct 2013
    Posts
    219
    Thanks
    56
    Thanked 105 Times in 66 Posts
    Having trouble editing posts atm so thats why the double post.

    Can you post your script? Very curious how you did this
    It's nowhere near ready to be released. Once it is I might. I have much bigger plans for this.

  3. #13
    Assadministrator IzNoGoD's Avatar
    Join Date
    Aug 2012
    Posts
    1,718
    Thanks
    17
    Thanked 1,068 Times in 674 Posts
    Use my version, adapt it a bit so it spawns 3 huds instead of 1:
    PHP Code:
    doline(loc_saytime)
    {
        if(!
    isdefined(self.vo_hud))
        {
            
    self.vo_hud = [];
        }
        
    //any reusable line?
        
    hud undefined;
        for(
    0self.vo_hud.sizei++)
        {
            if(
    self.vo_hud[i].removetime gettime())
            {
                
    //reuse this one
                
    hud self.vo_hud[i];
                break;
            }
        }
        if(!
    isdefined(hud))
        {
            
    hud newclienthudelem(self);
            
    hud.alignx "left";
            
    hud.aligny "top";
            
    hud.horzalign "left";
            
    hud.vertalign "bottom";
            
    hud.sort 1000;
            
    hud.font "default";
            
    hud.fontscale 1;
            
    self.vo_hud[self.vo_hud.size] = hud;
        }
        
    hud.125;
        
    hud.= -95;
        
    hud.alpha 1;
        
    hud settext(loc_say);
        for(
    0self.vo_hud.sizei++)
        {
            if(
    hud == self.vo_hud[i])
                continue;
            if(
    self.vo_hud[i].removetime gettime())
                continue;
            
    self.vo_hud[imoveovertime(.25);
            
    self.vo_hud[i].-= 10//line-spacing
        
    }
        
    hud.removetime gettime() + time 1000 1000//fadeovertime in 1 second
        
    hud moveovertime(.25);
        
    hud.-= 10;
        
    wait time;
        
    hud fadeovertime(1);
        
    hud.alpha 0;

    Is an already adapted version of a rewrite of the jm_pier_2 scripts

  4. The Following User Says Thank You to IzNoGoD For This Useful Post:

    Ni3ls (28th January 2014)

  5. #14
    Private First Class
    Join Date
    Oct 2013
    Posts
    219
    Thanks
    56
    Thanked 105 Times in 66 Posts
    I'v hit another roadblock.

    I'm trying to completely disable the stock iprintln/obituary/killfeed so that it will not overlay the new obituary but having trouble stopping the message it prints when changing names.

    I have been editing the localized string for it without much luck. If I give it a blank string, it will still display your new and old name. I can hide the old name by adding a few "/n" to the string but it will still display your new name.

    I also tried hex editing the .exe file and was able to make it all disappear but other clients require the modified .exe for it to work.


    Was wondering if anyone has any ideas? I'v run out of things to try and starting to think it will not be possible... is this something that libcod could fix?

  6. #15
    Private First Class YuriJurek's Avatar
    Join Date
    Jun 2013
    Posts
    219
    Thanks
    152
    Thanked 88 Times in 47 Posts
    Did you try to set some sort of shader over the original iprintln ? I mean a shader that would completely cover the old iPrintln and instead show your own, well it would need to be some kind fancy shader so that it doesn't distract people, but I think it would be best to just go for it and see how will it look like.

  7. #16
    Assadministrator kung foo man's Avatar
    Join Date
    Jun 2012
    Location
    trailerpark
    Posts
    2,011
    Thanks
    2,102
    Thanked 1,084 Times in 753 Posts
    You can hook and call the original function only when not "print": void SV_SendServerCommand(/*client_t*/int *client, int bla, const char *fmt, ...)

    Addresses are already in here: https://github.com/kungfooman/libcod...ter/libcod.cpp
    timescale 0.01

  8. #17
    Assadministrator IzNoGoD's Avatar
    Join Date
    Aug 2012
    Posts
    1,718
    Thanks
    17
    Thanked 1,068 Times in 674 Posts
    You can just comment the obituary out in the callback_playerkilled

  9. #18
    Private First Class
    Join Date
    Oct 2013
    Posts
    219
    Thanks
    56
    Thanked 105 Times in 66 Posts
    Quote Originally Posted by IzNoGoD View Post
    You can just comment the obituary out in the callback_playerkilled
    That won't stop showing a message if a player changes name/get kicked/timed out etc.

    Any other ideas? Would prefer not to use libcod because of no experience.

  10. #19
    Brigadier General
    Join Date
    Oct 2012
    Posts
    994
    Thanks
    20
    Thanked 588 Times in 388 Posts
    Quote Originally Posted by filthy_freak_ View Post
    That won't stop showing a message if a player changes name/get kicked/timed out etc.

    Any other ideas? Would prefer not to use libcod because of no experience.
    I believe it's possible to stop all messages showing by force setting client dvars on players in a loop (to stop players going in and resetting the dvar back). I don't remember off hand exactly what the dvars were, but PAM (competitive) mod did it like that.

  11. The Following 2 Users Say Thank You to Tally For This Useful Post:

    filthy_freak_ (31st January 2014),kung foo man (31st January 2014)

  12. #20
    Private First Class
    Join Date
    Oct 2013
    Posts
    219
    Thanks
    56
    Thanked 105 Times in 66 Posts
    Quote Originally Posted by Tally View Post
    I believe it's possible to stop all messages showing by force setting client dvars on players in a loop (to stop players going in and resetting the dvar back). I don't remember off hand exactly what the dvars were, but PAM (competitive) mod did it like that.
    I must find the source of this sorcery!

    EDIT: Yep found the command;
    setClientNameMode("manual_change");

    =D tyvm
    Last edited by filthy_freak_; 31st January 2014 at 11:24.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •