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

[TF2] Light Colours 0.6 (03/10)


Post New Thread Reply   
 
Thread Tools Display Modes
Grot
Member
Join Date: May 2012
Old 02-24-2013 , 12:01   Re: [TF2] Light Colours 0.6 (03/10)
Reply With Quote #101

I'm getting this error:


L 02/24/2013 - 17:05:26: [SM] Native "GetUserFlagBits" reported: Client index 0 is invalid
L 02/24/2013 - 17:05:26: [SM] Displaying call stack trace for plugin "lightcolors.smx":
L 02/24/2013 - 17:05:26: [SM] [0] Line 552, C:\Users\Oli\Documents\TF2\KJTF2\sourcemod-1.3.4-hg3013\addons\sourcemod\scripting\lightcolors .sp::IsValidAdmin()
L 02/24/2013 - 17:05:26: [SM] [1] Line 106, C:\Users\Oli\Documents\TF2\KJTF2\sourcemod-1.3.4-hg3013\addons\sourcemod\scripting\lightcolors .sp::Command_AllLightsDisco()
Grot is offline
404UserNotFound
BANNED
Join Date: Dec 2011
Old 03-16-2013 , 22:49   Re: [TF2] Light Colours 0.6 (03/10)
Reply With Quote #102

Quote:
Originally Posted by Grot View Post
I'm getting this error:


L 02/24/2013 - 17:05:26: [SM] Native "GetUserFlagBits" reported: Client index 0 is invalid
L 02/24/2013 - 17:05:26: [SM] Displaying call stack trace for plugin "lightcolors.smx":
L 02/24/2013 - 17:05:26: [SM] [0] Line 552, C:\Users\Oli\Documents\TF2\KJTF2\sourcemod-1.3.4-hg3013\addons\sourcemod\scripting\lightcolors .sp::IsValidAdmin()
L 02/24/2013 - 17:05:26: [SM] [1] Line 106, C:\Users\Oli\Documents\TF2\KJTF2\sourcemod-1.3.4-hg3013\addons\sourcemod\scripting\lightcolors .sp::Command_AllLightsDisco()
IsValidAdmin needs an IsValidClient check.

I may look into fixing this, as I find this to be a neat plugin.
404UserNotFound is offline
404UserNotFound
BANNED
Join Date: Dec 2011
Old 03-18-2013 , 14:20   Re: [TF2] Light Colours 0.6 (03/10)
Reply With Quote #103

Here, give this version a try.

I edited the IsValidAdmin check to start out with an "IsClientInGame" check. If it returns true, then it moves on to check admin status:

PHP Code:
stock bool:IsValidAdmin(client)
{
    if (
IsClientInGame(client))
    {
        
decl String:flags[26];
        
GetConVarString(g_cvars[CVAR_FLAG], flagssizeof(flags));
        if (
GetUserFlagBits(client) & ADMFLAG_ROOT)
        {
            return 
true;
        }
        new 
iFlags ReadFlagString(flags);
        if (
GetUserFlagBits(client) & iFlags)
        {
            return 
true;
        }
    }
    return 
false;

No errors so far.
Attached Files
File Type: sp Get Plugin or Get Source (lightcolors.sp - 323 views - 15.8 KB)
File Type: txt lightcolors.phrases.txt (6.8 KB, 137 views)
404UserNotFound is offline
wawazy
Member
Join Date: Aug 2009
Old 03-18-2013 , 23:22   Re: [TF2] Light Colours 0.6 (03/10)
Reply With Quote #104

no error at this moment but in 2 fort some strange thing lol

if you open door they start disco light on them and some medic pack too just funny

wa
wawazy is offline
sigvatr
Junior Member
Join Date: May 2013
Old 05-20-2013 , 23:06   Re: [TF2] Light Colours 0.6 (03/10)
Reply With Quote #105

My server is fairly dependent on this plugin, but I haven't been able to figure out a way to make the light colors automatically set themselves to my particular color when the server starts/is restarted and so on. I have to enter the server every day to set the light color. Is there a way to do this in the server config or something? Could there be a quick hack of this plugin done so that would work? Cheers.
sigvatr is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 06-16-2013 , 06:27   Re: [TF2] Light Colours 0.6 (03/10)
Reply With Quote #106

Something to add to the ToDo list: Update the code to use CheckCommandAccess instead of a hand-created IsValidAdmin function. And yes, this does mean losing the lights_flag cvar as well.

In fact, I started after originally posting this and 5 minutes later, tada, new version! It uses "lightcolors" as an override name.
Attached Files
File Type: sp Get Plugin or Get Source (lightcolors.sp - 394 views - 15.5 KB)
__________________
Not currently working on SourceMod plugin development.

Last edited by Powerlord; 06-16-2013 at 06:37.
Powerlord is offline
Krisprols58
Junior Member
Join Date: Oct 2010
Old 06-16-2013 , 18:28   Re: [TF2] Light Colours 0.6 (03/10)
Reply With Quote #107

Thanks Powerlord, that's exactly what I needed.

This is a great plugin, which looks very nice, but the disco mod is causing too much lags.
Krisprols58 is offline
captaindeterprimary
AlliedModders Donor
Join Date: Sep 2012
Old 06-16-2013 , 21:21   Re: [TF2] Light Colours 0.6 (03/10)
Reply With Quote #108

Quote:
Originally Posted by Krisprols58 View Post
Thanks Powerlord, that's exactly what I needed.

This is a great plugin, which looks very nice, but the disco mod is causing too much lags.
Disco mode does cause some large custom maps to crash. I will have to look back at them and post my findings on it.
__________________
Last edited by ; Today at 08:20 AM. Reason: Get rid of s
captaindeterprimary is offline
sivartz
Junior Member
Join Date: Aug 2012
Old 07-03-2013 , 17:53   Re: [TF2] Light Colours 0.6 (03/10)
Reply With Quote #109

what flag do I use to block usage from donators, they don't have z flag but they can access the plugin.I tried overrides lightcolors deny. but no luck with it so far.

Last edited by sivartz; 07-05-2013 at 00:47.
sivartz is offline
A_Squirrel
Junior Member
Join Date: Feb 2014
Location: Hessen, Germany
Old 03-03-2014 , 03:55   Re: [TF2] Light Colours 0.6 (03/10)
Reply With Quote #110

I just wanted to note that this plugin works fabulously with Round Triggers by MikeJS.
A_Squirrel 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 05:07.


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