Raised This Month: $12 Target: $400
 3% 

Advertisements 2.1 (Updated 2021/02/06)


Post New Thread Reply   
 
Thread Tools Display Modes
Extreme_One
Veteran Member
Join Date: Nov 2006
Old 03-04-2008 , 12:14   Re: Advertisements
Reply With Quote #21

I'm pretty sure COLOR_TEAM won't work for PrintToChatAll

This thread could prove useful: http://forums.alliedmods.net/showthread.php?t=66654
__________________
Extreme_One is offline
DJ Tsunami
DJ Post Spammer
Join Date: Feb 2008
Location: The Netherlands
Old 03-04-2008 , 13:35   Re: Advertisements
Reply With Quote #22

It works, but it's always light green because the message is sent by the server. To be able to have red and blue text (using TF2 as an example, not sure what those colors are in other games) I'd have to send it from a currently playing client with SayText2, which means that if no one is playing those colors won't work. So I'm not sure if that's what you guys want... Implementing the 3 shades of green is easy, so.
__________________
Advertisements | REST in Pawn - HTTP client for JSON REST APIs
Please do not PM me with questions. Post in the plugin thread.
DJ Tsunami is offline
FrostbyteX
Senior Member
Join Date: Dec 2007
Old 03-04-2008 , 13:39   Re: Advertisements
Reply With Quote #23

Quote:
Originally Posted by DJ Tsunami View Post
It works, but it's always light green because the message is sent by the server. To be able to have red and blue text (using TF2 as an example, not sure what those colors are in other games) I'd have to send it from a currently playing client with SayText2, which means that if no one is playing those colors won't work. So I'm not sure if that's what you guys want... Implementing the 3 shades of green is easy, so.
I thought the color had to do with the target client... Never tested that.
FrostbyteX is offline
DJ Tsunami
DJ Post Spammer
Join Date: Feb 2008
Location: The Netherlands
Old 03-04-2008 , 14:19   Re: Advertisements
Reply With Quote #24

Nope, when I target it at me when sending it from the server it's still light green. I could of course loop through the users and use them as both the target and sender, but that would be a lot of commands if it can also be done with one (but without the team colors)... I don't know, on the other hand it doesn't get executed that often so I'm sure SM could handle it.

Edit: alright, what I did now was loop through every player, and use light green if they're a spectator, and their team color if they're playing. I guess that's the best way to do it.
__________________
Advertisements | REST in Pawn - HTTP client for JSON REST APIs
Please do not PM me with questions. Post in the plugin thread.

Last edited by DJ Tsunami; 03-04-2008 at 14:41.
DJ Tsunami is offline
DJ Tsunami
DJ Post Spammer
Join Date: Feb 2008
Location: The Netherlands
Old 03-05-2008 , 09:23   Re: Advertisements
Reply With Quote #25

Alright, version 0.2 is up now. I've done everything requested except:
  • the rounds left when mp_timelimit is 0. I have to count the rounds myself and I think this works differently for every mod, so it's going to take more time than I thought
  • The cvars in the ads, this just takes a bit of time so I figured I'd release this version and get the colored chat messages out of the way.
Ofcourse what was added is described in the changelog.
__________________
Advertisements | REST in Pawn - HTTP client for JSON REST APIs
Please do not PM me with questions. Post in the plugin thread.
DJ Tsunami is offline
Extreme_One
Veteran Member
Join Date: Nov 2006
Old 03-05-2008 , 10:23   Re: Advertisements
Reply With Quote #26

Cool! Glad to see colours. Thank you.

Who is the plugin looking at for the {TEAM} colour?

Are you saying it will display the colour differently for everyone on the server depending on what team they're on or whether they're in spec?
__________________
Extreme_One is offline
DJ Tsunami
DJ Post Spammer
Join Date: Feb 2008
Location: The Netherlands
Old 03-05-2008 , 11:27   Re: Advertisements
Reply With Quote #27

Yes, to take the example of TF2: if the player that the advertisement is sent to is on Blue it will use the blue color, if he's on Red the red color, and if he's in spectate it's light green.
__________________
Advertisements | REST in Pawn - HTTP client for JSON REST APIs
Please do not PM me with questions. Post in the plugin thread.
DJ Tsunami is offline
Extreme_One
Veteran Member
Join Date: Nov 2006
Old 03-05-2008 , 16:43   Re: Advertisements
Reply With Quote #28

It works really well DJ Tsunami.

Thank you.

+1 karma
__________________
Extreme_One is offline
cozmicshredder
AlliedModders Donor
Join Date: Apr 2004
Location: MI, USA.
Old 03-10-2008 , 12:53   Re: Advertisements
Reply With Quote #29

Using Advertisement version 0.2 compiled with Sourcemod version 1924

Errors:

L 03/10/2008 - 00:00:00: [SM] Native "StartMessage" reported: Invalid message name: "SayText2"
L 03/10/2008 - 00:00:00: [SM] Displaying call stack trace for plugin "advertisements.smx":
L 03/10/2008 - 00:00:00: [SM] [0] Line 210, C:\Users\cozmicshredder\Documents\GAMESERVERS \SOURCEMOD\sourcemod-r1924\addons\sourcemod\scripting\include\user messages.inc::StartMessageOne()
L 03/10/2008 - 00:00:00: [SM] [1] Line 199, advertisements.sp::SayText2()
L 03/10/2008 - 00:00:00: [SM] [2] Line 134, advertisements.sp::Timer_DisplayAds()
__________________
cozmicshredder is offline
Send a message via ICQ to cozmicshredder Send a message via AIM to cozmicshredder Send a message via MSN to cozmicshredder Send a message via Yahoo to cozmicshredder Send a message via Skype™ to cozmicshredder
tcviper
Veteran Member
Join Date: Oct 2005
Location: Netherlands
Old 03-10-2008 , 17:56   Re: Advertisements
Reply With Quote #30

That's an Insurgency issue who uses a different way of displaying msgs, thats why its not working ;)
__________________
tcviper is offline
Send a message via MSN to tcviper
Reply


Thread Tools
Display Modes

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 04:11.


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