Raised This Month: $ Target: $400
 0% 

[TF2] game_text_tf advertisements


Post New Thread Reply   
 
Thread Tools Display Modes
ddhoward
Veteran Member
Join Date: May 2012
Location: California
Old 10-17-2014 , 14:30   Re: [TF2] game_text_tf advertisements
Reply With Quote #11

Ahhh, I'm assuming from your code that AcceptEntityInput(entity, "Display") would cause the same entity to display the message a second time. That's good to know.


Quote:
Gross..
This does not qualify as constructive feedback, and is rather rude.


PHP Code:
 switch(color
        { 
            case 
2DispatchKeyValue(entity"background""3"); //also i think you did this one wrong lol
            
case 3DispatchKeyValue(entity"background""3"); 
            default: 
DispatchKeyValue(entity"background""3"); 
        } 
__________________

Last edited by ddhoward; 10-17-2014 at 14:32.
ddhoward is offline
404UserNotFound
BANNED
Join Date: Dec 2011
Old 10-17-2014 , 15:27   Re: [TF2] game_text_tf advertisements
Reply With Quote #12

Quote:
Originally Posted by ddhoward View Post
someone test pls

http://ddhoward.bitbucket.org/script...me_text_tf.inc

Examples:
PHP Code:
PrintTFText("this is a HUD message"TFTeam_Red_10.0); 
PHP Code:
PrintTFText("u r a butt"TFTeam_Unassigned30.0"hud_spy_disguise_menu_icon"); 
Also, the indentations of the different @param lines show up correctly in notepad and Notepad++, just not in a browser.
Testing right now!
404UserNotFound is offline
Wliu
Veteran Member
Join Date: Apr 2013
Old 10-17-2014 , 17:36   Re: [TF2] game_text_tf advertisements
Reply With Quote #13

Yeah, it'd be interesting to see if I could figure out how to get this into FF2...
__________________
~Wliu
Wliu is offline
ddhoward
Veteran Member
Join Date: May 2012
Location: California
Old 10-17-2014 , 20:23   Re: [TF2] game_text_tf advertisements
Reply With Quote #14

Updated.

http://ddhoward.bitbucket.org/script...me_text_tf.inc
__________________

Last edited by ddhoward; 10-17-2014 at 20:23.
ddhoward is offline
404UserNotFound
BANNED
Join Date: Dec 2011
Old 10-17-2014 , 21:13   Re: [TF2] game_text_tf advertisements
Reply With Quote #15

Quote:
Originally Posted by ddhoward View Post
Does it work with "%s" "clientname" stuff? Wanting to use these messages in my rare item drop plugin for when a player nabs one of the rare drop gifts.
404UserNotFound is offline
ddhoward
Veteran Member
Join Date: May 2012
Location: California
Old 10-17-2014 , 21:17   Re: [TF2] game_text_tf advertisements
Reply With Quote #16

Quote:
Originally Posted by abrandnewday View Post
Does it work with "%s" "clientname" stuff? Wanting to use these messages in my rare item drop plugin for when a player nabs one of the rare drop gifts.
You will have to use Format() to process that stuff before passing the formatted string to this function.
__________________
ddhoward is offline
friagram
Veteran Member
Join Date: Sep 2012
Location: Silicon Valley
Old 10-17-2014 , 21:31   Re: [TF2] game_text_tf advertisements
Reply With Quote #17

Quote:
Originally Posted by Wliu View Post
Yeah, it'd be interesting to see if I could figure out how to get this into FF2...
I put it in for XXX became boss. But it only supports 1 newline character because the box doesn't resize, and there are not many icons that fit into the space since most are offset. Also, it will flash / they will overlap each other if you have multiple.
__________________
Profile - Plugins
Add me on steam if you are seeking sp/map/model commissions.
friagram is offline
404UserNotFound
BANNED
Join Date: Dec 2011
Old 10-17-2014 , 21:52   Re: [TF2] game_text_tf advertisements
Reply With Quote #18

Quote:
Originally Posted by ddhoward View Post
You will have to use Format() to process that stuff before passing the formatted string to this function.
Example? because I've tried my best and this Format thing is kicking my ass.
404UserNotFound is offline
ddhoward
Veteran Member
Join Date: May 2012
Location: California
Old 10-17-2014 , 22:20   Re: [TF2] game_text_tf advertisements
Reply With Quote #19

Quote:
Originally Posted by abrandnewday View Post
Example? because I've tried my best and this Format thing is kicking my ass.
PHP Code:
decl String:someString[64];
Format(someStringsizeof(someString), "This client's name is %N, and he has %i cats."clientnumberOfCats); 
__________________

Last edited by ddhoward; 10-17-2014 at 22:21.
ddhoward is offline
friagram
Veteran Member
Join Date: Sep 2012
Location: Silicon Valley
Old 10-20-2014 , 07:53   Re: [TF2] game_text_tf advertisements
Reply With Quote #20

Quote:
Originally Posted by ddhoward View Post
Ahhh, I'm assuming from your code that AcceptEntityInput(entity, "Display") would cause the same entity to display the message a second time. That's good to know.



This does not qualify as constructive feedback, and is rather rude.


PHP Code:
 switch(color
        { 
            case 
2DispatchKeyValue(entity"background""3"); //also i think you did this one wrong lol
            
case 3DispatchKeyValue(entity"background""3"); 
            default: 
DispatchKeyValue(entity"background""3"); 
        } 
I wrote this on a phone, you should be sending the usermessage anyway, not spawning the entity.

This should do:
PHP Code:
CreateTFHNmessage(const String:message[], const String:icon[]="leaderboard_streak"team 0color 0)
{
    static 
UserMsg:HudNotifyCustom INVALID_MESSAGE_ID;
    if(
HudNotifyCustom == INVALID_MESSAGE_ID)
    {
        
HudNotifyCustom GetUserMessageId("HudNotifyCustom");
    }

    
decl targets[MaxClients];
    new 
count;
    for(new 
i=1i<=MaxClientsi++)
    {
        if(
IsClientInGame(i))
        {
            if(
team)
            {
                if(
GetClientTeam(i) != team)
                {
                    continue;
                }
            }
            
targets[count] = i;
            
count++;
        }
    }
    
    if(
count)
    {
        new 
Handle:bf StartMessageEx(HudNotifyCustomtargetscount);
        
BfWriteString(bfmessage);
        
BfWriteString(bficon);
        
BfWriteByte(bfcolor);

        
EndMessage();
    }

__________________
Profile - Plugins
Add me on steam if you are seeking sp/map/model commissions.

Last edited by friagram; 10-20-2014 at 15:48.
friagram is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 11:35.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode