Raised This Month: $32 Target: $400
 8% 

[TF2] game_text_tf advertisements


Post New Thread Reply   
 
Thread Tools Display Modes
Pfsm999
Senior Member
Join Date: Sep 2009
Old 10-23-2014 , 18:24   Re: [TF2] game_text_tf advertisements
Reply With Quote #21

Whaou sweet thing !

I will try tomorow night to put some code on MySQL Advertisements with more color.
(I have my own version of the plugin !)

I think i can replace the old "T" message (those ads are useless now !)
But do you have any idea how many time the HUD panel stay on the screen ? 10s ? More ? Less ?
And do we have any param to modify that ? Or do we must create a method to callback every Xs the function to keep the HUD text on the screen ?

Thx a lot and i will post my try tomorow night !
(Sorry for my bad english ... french dude !)
__________________
Pfsm999 is offline
ddhoward
Veteran Member
Join Date: May 2012
Location: California
Old 10-23-2014 , 19:21   Re: [TF2] game_text_tf advertisements
Reply With Quote #22

Quote:
Originally Posted by Pfsm999 View Post
But do you have any idea how many time the HUD panel stay on the screen ? 10s ? More ? Less ?
And do we have any param to modify that ?

http://ddhoward.bitbucket.org/script...me_text_tf.inc
__________________
ddhoward is offline
friagram
Veteran Member
Join Date: Sep 2012
Location: Silicon Valley
Old 10-24-2014 , 04:17   Re: [TF2] game_text_tf advertisements
Reply With Quote #23

Just use the usermessage code that i posted.. Each one will display for 3s or so, but you can re broadcast it faster than that.
__________________
Profile - Plugins
Add me on steam if you are seeking sp/map/model commissions.
friagram is offline
Pfsm999
Senior Member
Join Date: Sep 2009
Old 10-24-2014 , 14:02   Re: [TF2] game_text_tf advertisements
Reply With Quote #24

Quote:
Originally Posted by ddhoward View Post
Oh sorry, i didn't see the param time
Thx a lot.

I make some test with this configuration :

Code:
//On OnClientPostAdminCheck method

GetClientName(client,nameAdmin,sizeof(nameAdmin));
Format(strMessageHUD, sizeof(strMessageHUD), "%s - Admin des Sorciers vient de se connecter !!", nameAdmin);
PrintTFText(strMessageHUD,0,2,35.0,"hud_spy_disguise_menu_icon");
I had a beautiful HUD (game_text_tf) with my text and spy icon : Yeahh
Problem : I choose 35s for the time param (too long i know but i test some case ;)) and when a second admin come on the server (before the time delay of 35s so before the first HUD go away), a new HUD pop up...
but my server crash too ... and i don't know why.

Can we have two game_text_tf on the same time ?

If we can, i think we must add a lock system on your inc file to have only one HUD per time !

I try this configuration too :
Code:
//On OnClientPostAdminCheck method

GetClientName(client,nameAdmin,sizeof(nameAdmin));
Format(strMessageHUD, sizeof(strMessageHUD), "%s - Admin des Sorciers vient de se connecter !!", nameAdmin);
PrintTFText(strMessageHUD,2,2,35.0,"hud_spy_disguise_menu_icon");
PrintTFText(strMessageHUD,3,3,35.0,"hud_spy_disguise_menu_icon");
Crash too
Can't have a HUD for the blu team and in the same time a HUD for the red team !
Have you got an idea for fixed that case ? Or do you know how put a lock on your inc file ?
Thx a lot again for this idea !
__________________

Last edited by Pfsm999; 10-24-2014 at 14:04.
Pfsm999 is offline
ddhoward
Veteran Member
Join Date: May 2012
Location: California
Old 10-24-2014 , 16:49   Re: [TF2] game_text_tf advertisements
Reply With Quote #25

Look at the return value of the function. The documentation clearly specifies that you can kill that entity in order to remove the message prematurely.

Having two would not be causing crashes, however. I just tried it without crashing. Something else is causing your crashes.
__________________

Last edited by ddhoward; 10-24-2014 at 16:52.
ddhoward is offline
Pfsm999
Senior Member
Join Date: Sep 2009
Old 10-25-2014 , 17:24   Re: [TF2] game_text_tf advertisements
Reply With Quote #26

It's working !

I don't understand why my server crased ... But now it's working.
I modify ads_mysql plugin to add Game_text message and it's working pretty well !

Thx a lot
__________________
Pfsm999 is offline
404UserNotFound
BANNED
Join Date: Dec 2011
Old 10-25-2014 , 19:23   Re: [TF2] game_text_tf advertisements
Reply With Quote #27

Quote:
Originally Posted by Pfsm999 View Post
It's working !

I don't understand why my server crased ... But now it's working.
I modify ads_mysql plugin to add Game_text message and it's working pretty well !

Thx a lot
Care to share your revision to ads_mysql?
404UserNotFound is offline
Pfsm999
Senior Member
Join Date: Sep 2009
Old 11-09-2014 , 16:15   Re: [TF2] game_text_tf advertisements
Reply With Quote #28

Yep sure !

I add some feature on sm_adsmysql :
  • Add MoreColor.inc (much fun !)
  • Add ddhoward game_text_tf.inc
  • If you put "," on "Flags" data for "S" advertissement message, it will add some line with this advertissement. (line 402 of the plugin !)
So i change the "T" advertissement message type :
When you put a "T" advertissement, i use the data "Flags" on your SQL Database with 4 informations : (use the ';' for separate information)

Team;Color of your HUD;Time in seconds;Icon on your HUD

So example : (SQL line )
(ID OF YOUR ADVERTISSEMENT, 'T', 'The Text of your advertissement', '0;0;15;ico_notify_highfive', 'All', 'server1', 1, 'NAME OF THE CREATOR', 'DATE'),

So for this example :
"The Text of your advertissement" will be show to all team with the HUD color gray for 15 seconds with ico_notify_highfive icon !
I don't put the smx file because i did some update but i think i don't "test" this update for a "massive diffuse" of the plugin !
Attached Files
File Type: sp Get Plugin or Get Source (sm_adsmysql.sp - 157 views - 15.6 KB)
__________________

Last edited by Pfsm999; 11-09-2014 at 16:18.
Pfsm999 is offline
Michalplyoutube
Veteran Member
Join Date: Jan 2013
Location: Tank Carrier in Mannhatt
Old 12-15-2014 , 08:56   Re: [TF2] game_text_tf advertisements
Reply With Quote #29

Is it posible to use custom icons like bomb icon?
and where i can find valid icons
__________________
The plugin developer of TF2BWR Reborn
And a TF2 Player

Last edited by Michalplyoutube; 12-15-2014 at 09:03.
Michalplyoutube is offline
Wliu
Veteran Member
Join Date: Apr 2013
Old 12-15-2014 , 10:41   Re: [TF2] game_text_tf advertisements
Reply With Quote #30

Quote:
ICONS
For the "DispatchKeyValue(entity, "icon", "ico_build");" bit, you can use anything found within "tf/scripts/mod_textures.res" in place of "ico_build". This includes HUD elements (such as the Engineer's building status icons), killfeed icons and much more.
__________________
~Wliu
Wliu 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 00:27.


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