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

[INC] More Colors (1.9.1)


Post New Thread Reply   
 
Thread Tools Display Modes
Dr. McKay
Sir Dr. SourceMod Plugin Approver Esq. Ltd. M.D. PhD
Join Date: Aug 2011
Location: Atlantis
Old 05-13-2013 , 23:23   Re: [INC] More Colors (1.8.0)
Reply With Quote #231

CShowActivity and similar have been added to 1.8.0.
__________________
Dr. McKay is offline
ddhoward
Veteran Member
Join Date: May 2012
Location: California
Old 05-16-2013 , 09:00   Re: [INC] More Colors (1.8.0)
Reply With Quote #232

I seem to be having trouble with formatting CShowActivity2.

PHP Code:
#define CHAT_PREFIX_SPACE "{olive}[Friendly]{default} "
#define CHAT_PREFIX_SPACE_NOCOLOR "[Friendly] "
...
CShowActivity2(clientCHAT_PREFIX_SPACE"Toggled Friendly on %s."target_name);
ShowActivity2(clientCHAT_PREFIX_SPACE_NOCOLOR"Toggled Friendly on %s."target_name); 
That outputs this to the chat (correctly colored):

Code:
[Friendly] Toggled Friendly on Toggled Friendly on 
[Friendly] Toggled Friendly on all players.
Other admins see:
Code:
[Friendly] MyName: Toggled Friendly on Toggled Friendly on 
[Friendly] MyName: Toggled Friendly on all players.
Any ideas?

Code:
] sm version
SourceMod 1.5.0-dev+3834, by AlliedModders LLC
...

] meta version
Metamod:Source version 1.10.0-dev
Compiled on: Apr 25 2013
Plugin interface version: 15:14
SourceHook version: 5:5

Last edited by ddhoward; 05-16-2013 at 09:20.
ddhoward is offline
DJ Tsunami
DJ Post Spammer
Join Date: Feb 2008
Location: The Netherlands
Old 05-16-2013 , 10:16   Re: [INC] More Colors (1.8.0)
Reply With Quote #233

CReplyToCommandEx and CShowActivity and similar use 3 for VFormat's varpos, which should be 4.
__________________
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; 05-16-2013 at 10:18.
DJ Tsunami is offline
Dr. McKay
Sir Dr. SourceMod Plugin Approver Esq. Ltd. M.D. PhD
Join Date: Aug 2011
Location: Atlantis
Old 05-16-2013 , 11:01   [INC] More Colors (1.8.0)
Reply With Quote #234

Quote:
Originally Posted by DJ Tsunami View Post
CReplyToCommandEx and CShowActivity and similar use 3 for VFormat's varpos, which should be 4.
Figured I'd make a mistake in there somewhere copying and pasting. I'm not at home right now so I can't fix it. Would someone mind opening an issue on my Bitbucket repo?
__________________
Dr. McKay is offline
ddhoward
Veteran Member
Join Date: May 2012
Location: California
Old 05-16-2013 , 20:14   Re: [INC] More Colors (1.8.0)
Reply With Quote #235

Don't know if this is related to the aforementioned bug, but color information seems to be leaking into the console's copy of the messages. The problem is not there in the chat.

Chat:
Code:
[Friendly] Toggled Friendly on Toggled Friendly on
Console:
Code:
9EC34F[Friendly] Toggled Friendly on Toggled Friendly on
EDIT: Replacing 3 with 4 in my copy of the .inc doesn't seem to have fixed the second issue. First one was solved though.
Console:
Code:
9EC34F[Friendly] Toggled Friendly on all players.
EDIT2: Also, this happens when client 0 uses a command that shows activity:
Code:
L 05/16/2013 - 21:20:54: [SM] Plugin encountered error 25: Call was aborted
L 05/16/2013 - 21:20:54: [SM] Native "ThrowError" reported: Invalid client index 0
L 05/16/2013 - 21:20:54: [SM] Displaying call stack trace for plugin "friendly.smx":
L 05/16/2013 - 21:20:54: [SM]   [0]  Line 439, C:\sourcemod-1.5.0-hg3834-windows\addons\sourcemod\scripting\include\morecolors.inc::CShowActivity2()
L 05/16/2013 - 21:20:54: [SM]   [1]  Line 574, friendly.sp::UseFriendlyCmd()

Last edited by ddhoward; 05-17-2013 at 00:22.
ddhoward is offline
Dr. McKay
Sir Dr. SourceMod Plugin Approver Esq. Ltd. M.D. PhD
Join Date: Aug 2011
Location: Atlantis
Old 05-17-2013 , 00:57   Re: [INC] More Colors (1.8.1)
Reply With Quote #236

All of the problems above have been fixed in 1.8.1, except the color codes showing up in the console. I can't fix that short of writing my own code to perform the same task as ShowActivity*, which I'm not going to waste time on.
__________________
Dr. McKay is offline
AjudanteBR
Junior Member
Join Date: Jan 2013
Old 06-09-2013 , 15:48   Re: [INC] More Colors (1.8.1)
Reply With Quote #237

Works in "left 4 dead 2"??
AjudanteBR is offline
Dr. McKay
Sir Dr. SourceMod Plugin Approver Esq. Ltd. M.D. PhD
Join Date: Aug 2011
Location: Atlantis
Old 06-09-2013 , 15:50   Re: [INC] More Colors (1.8.1)
Reply With Quote #238

Quote:
Originally Posted by AjudanteBR View Post
Works in "left 4 dead 2"??
No.
__________________
Dr. McKay is offline
The 5th Survivor
Senior Member
Join Date: Mar 2012
Old 06-11-2013 , 18:57   Re: [INC] More Colors (1.4.1)
Reply With Quote #239

Quote:
Originally Posted by Powerlord View Post
The color of {default} depends entirely on which game it is:
HL2M/DoD:S/CS:S uses an orange color.
TF2/L4D/L4D2 uses a white color.

The default color can also be overridden by client mods.
Can you please elaborate on how the client modify the default color?
The 5th Survivor is offline
Dr. McKay
Sir Dr. SourceMod Plugin Approver Esq. Ltd. M.D. PhD
Join Date: Aug 2011
Location: Atlantis
Old 06-11-2013 , 19:33   Re: [INC] More Colors (1.4.1)
Reply With Quote #240

Quote:
Originally Posted by The 5th Survivor View Post
Can you please elaborate on how the client modify the default color?
There's some .res file.
__________________
Dr. McKay 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 17:20.


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