Raised This Month: $ Target: $400
 0% 

Solved Items are glow


Post New Thread Reply   
 
Thread Tools Display Modes
Lux
Veteran Member
Join Date: Jan 2015
Location: Cat
Old 06-22-2017 , 21:48   Re: [L4D2]Items are glow
Reply With Quote #31

Quote:
Originally Posted by leaffan View Post
Hi!


I found a problem

The problem is removing the add-on bins the bins do not appear on the back but the add-on is appearing when I remove the bins

Scavenge Mode is not played.

Thanks.
Use my bool to fix that code below,
it will work with finales too so no need for map checking and addon maps

PHP Code:
stock bool:IsScavengeGascan(iEntity)
{
    static 
String:sTempString[33];
    
GetEntityClassname(iEntitysTempStringsizeof(sTempString));
    if(
sTempString[0] != 'w' && sTempString[0] != 'p')
        return 
false;
    
    if(!
StrEqual(sTempString"weapon_gascan") && !StrEqual(sTempString"prop_physics"))
        return 
false;

    
GetEntPropString(iEntityProp_Data"m_ModelName"sTempStringsizeof(sTempString));
    if(!
StrEqual(sTempString"models/props_junk/gascan001a.mdl"false))
        return 
false;

    switch(
GetEntProp(iEntityProp_Send"m_nSkin")) 
    {
        case 
0
        {
            return 
false;
        }
        case 
1
        {
            return 
true;
        }
    }

    return 
false;

__________________
Connect
My Plugins: KlickME
[My GitHub]

Commission me for L4D

Last edited by Lux; 06-22-2017 at 21:51.
Lux is offline
Visual77
Veteran Member
Join Date: Jan 2009
Old 06-23-2017 , 00:23   Re: [L4D2]Items are glow
Reply With Quote #32

Quote:
Originally Posted by Lux View Post
Use my bool to fix that code below,
it will work with finales too so no need for map checking and addon maps

PHP Code:
stock bool:IsScavengeGascan(iEntity)
{
    static 
String:sTempString[33];
    
GetEntityClassname(iEntitysTempStringsizeof(sTempString));
    if(
sTempString[0] != 'w' && sTempString[0] != 'p')
        return 
false;
    
    if(!
StrEqual(sTempString"weapon_gascan") && !StrEqual(sTempString"prop_physics"))
        return 
false;

    
GetEntPropString(iEntityProp_Data"m_ModelName"sTempStringsizeof(sTempString));
    if(!
StrEqual(sTempString"models/props_junk/gascan001a.mdl"false))
        return 
false;

    switch(
GetEntProp(iEntityProp_Send"m_nSkin")) 
    {
        case 
0
        {
            return 
false;
        }
        case 
1
        {
            return 
true;
        }
    }

    return 
false;

Will that work? You can do that or just check for mp_gamemode string of scavenge and add to bool.

hasEveryoneSpawned wont fire on round 1 in scagenge. Don't know why. Works on round 2. Idk how scavenge works tbh. Seems like the player_spawn event isn't fired on 1st round?

Last edited by Visual77; 06-23-2017 at 01:20.
Visual77 is offline
Lux
Veteran Member
Join Date: Jan 2015
Location: Cat
Old 06-23-2017 , 01:20   Re: [L4D2]Items are glow
Reply With Quote #33

Quote:
Originally Posted by Visual77 View Post
Will that work? You can do that or just check for mp_gamemode string of scavenge and add to bool.
I would not of posted it if it did not work, i use it.
__________________
Connect
My Plugins: KlickME
[My GitHub]

Commission me for L4D
Lux is offline
Visual77
Veteran Member
Join Date: Jan 2009
Old 06-23-2017 , 03:19   Re: [L4D2]Items are glow
Reply With Quote #34

Quote:
Originally Posted by Lux View Post
I would not of posted it if it did not work, i use it.
Can you show me where to add it in because I tried and I couldn't get it to work.
Until then, here's scavenge support my way, it hasn't been fully tested but it worked on load.

Last edited by Visual77; 06-23-2017 at 04:30.
Visual77 is offline
Lux
Veteran Member
Join Date: Jan 2015
Location: Cat
Old 06-23-2017 , 03:33   Re: [L4D2]Items are glow
Reply With Quote #35

New syntax not really for me but i think you could add it in places like this


PHP Code:
stock void SetGlowOnType(char [][] array, int sizeConVar cvar)
{
    if (
cvar == cvarGlowColor_health && cvarGlowOn_health.IntValue != 1) return;
    if (
cvar == cvarGlowColor_throwables && cvarGlowOn_throwables.IntValue != 1) return;
    if (
cvar == cvarGlowColor_weapons && cvarGlowOn_weapons.IntValue != 1) return;
    if (
cvar == cvarGlowColor_melee && cvarGlowOn_melee.IntValue != 1) return;
    if (
cvar == cvarGlowColor_M60_GL && cvarGlowOn_M60_GL.IntValue != 1) return;
    if (
cvar == cvarGlowColor_Crate_UP && cvarGlowOnCrate_UP.IntValue != 1) return;

    
int color GetColor(cvar);
    for (
int i 0sizei++)
    {
        
int entity = -1;
        while ((
entity FindEntityByClassname(entity, array[i])) != -1)
        {    
            if (!
IsScavengeGascan(entity)) //maybe it will work but your coding is much different than mine
            
{
                
SetEntProp(entityProp_Send"m_glowColorOverride"color);
                continue;
            }
            
            
SetGlowItem(entitycolor1);
        }
    }

__________________
Connect
My Plugins: KlickME
[My GitHub]

Commission me for L4D
Lux is offline
Visual77
Veteran Member
Join Date: Jan 2009
Old 06-23-2017 , 04:34   Re: [L4D2]Items are glow
Reply With Quote #36

It's not working, it removes glow on all items. I will not be around anymore today so I'll just add my version back for now. Yeah the coding is a mess on this plugin but I reckon it could be 3 times as large aswell depending on code style.

v 1.2.2
-Added scavenge support.
-Changed misprint of weapon_cola -> weapon_cola_bottles
-Support for Footlocker and health cabinets (Cabinet and footlocker will glow while locked, while opened items should glow.
-Removed support for the gnome. It's too bugy with this prop.

Delete l4d2_items_glow.cfg in cfg\sourcemod before you start your server.
Attached Files
File Type: sp Get Plugin or Get Source (l4d2_items_glow.sp - 335 views - 17.8 KB)

Last edited by Visual77; 06-23-2017 at 04:37.
Visual77 is offline
leaffan
Senior Member
Join Date: Jan 2013
Old 06-23-2017 , 06:33   Re: [L4D2]Items are glow
Reply With Quote #37

Quote:
Originally Posted by Visual77 View Post
It's not working, it removes glow on all items. I will not be around anymore today so I'll just add my version back for now. Yeah the coding is a mess on this plugin but I reckon it could be 3 times as large aswell depending on code style.

v 1.2.2
-Added scavenge support.
-Changed misprint of weapon_cola -> weapon_cola_bottles
-Support for Footlocker and health cabinets (Cabinet and footlocker will glow while locked, while opened items should glow.
-Removed support for the gnome. It's too bugy with this prop.

Delete l4d2_items_glow.cfg in cfg\sourcemod before you start your server.
I'm having trouble with trying new

No Mercy map on the map did not bother, I tried another map

Restart restarted

- No Mercy
- Restarted after improvised artrium map
Restart before the first entry in the artrium map

Thank you.

Last edited by leaffan; 06-23-2017 at 06:34.
leaffan is offline
Visual77
Veteran Member
Join Date: Jan 2009
Old 06-23-2017 , 18:06   Re: [L4D2]Items are glow
Reply With Quote #38

Fine. Can you try v.1.2.3
-New hacky timers to ensure scavenge really works.

I dislike scavenge btw. Makes my test server crash all the time.

Edit: reupload. forgot to reset delayScavenge on OnMapStart.
Attached Files
File Type: sp Get Plugin or Get Source (l4d2_items_glow.sp - 312 views - 17.4 KB)

Last edited by Visual77; 06-24-2017 at 05:42.
Visual77 is offline
leaffan
Senior Member
Join Date: Jan 2013
Old 06-27-2017 , 15:15   Re: [L4D2]Items are glow
Reply With Quote #39

Quote:
Originally Posted by Visual77 View Post
Fine. Can you try v.1.2.3
-New hacky timers to ensure scavenge really works.

I dislike scavenge btw. Makes my test server crash all the time.

Edit: reupload. forgot to reset delayScavenge on OnMapStart.
The gas canisters are coming late. Restart is coming to me. But the first time I open the game does not come. What is the problem?

Thanks.
leaffan is offline
Visual77
Veteran Member
Join Date: Jan 2009
Old 06-27-2017 , 15:55   Re: [L4D2]Items are glow
Reply With Quote #40

Quote:
Originally Posted by leaffan View Post
The gas canisters are coming late. Restart is coming to me. But the first time I open the game does not come. What is the problem?

Thanks.
Can you submit a video or something because it worked perfectly for me. On first map load, on vote to new map, on round restart.
Does the gascans glow if you vote for new map? Can you also download the plugin again and overwrite, then try?

Last edited by Visual77; 06-27-2017 at 16:13.
Visual77 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 08:28.


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