AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   Advertisements 2.1 (Updated 2021/02/06) (https://forums.alliedmods.net/showthread.php?t=155705)

Extreme_One 03-04-2008 12:14

Re: Advertisements
 
I'm pretty sure COLOR_TEAM won't work for PrintToChatAll

This thread could prove useful: http://forums.alliedmods.net/showthread.php?t=66654

DJ Tsunami 03-04-2008 13:35

Re: Advertisements
 
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.

FrostbyteX 03-04-2008 13:39

Re: Advertisements
 
Quote:

Originally Posted by DJ Tsunami (Post 593041)
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.

DJ Tsunami 03-04-2008 14:19

Re: Advertisements
 
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.

DJ Tsunami 03-05-2008 09:23

Re: Advertisements
 
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.

Extreme_One 03-05-2008 10:23

Re: Advertisements
 
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?

DJ Tsunami 03-05-2008 11:27

Re: Advertisements
 
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.

Extreme_One 03-05-2008 16:43

Re: Advertisements
 
It works really well DJ Tsunami.

Thank you.

+1 karma :D

cozmicshredder 03-10-2008 12:53

Re: Advertisements
 
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()

tcviper 03-10-2008 17:56

Re: Advertisements
 
That's an Insurgency issue who uses a different way of displaying msgs, thats why its not working ;)


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

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