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

[ANY] Hats! (Version 1.0.4c - 2/19/2012)


Post New Thread Reply   
 
Thread Tools Display Modes
minimoney1
SourceMod Donor
Join Date: Dec 2010
Old 07-23-2012 , 13:49   Re: [ANY] Hats! (Version 1.0.4c - 2/19/2012)
Reply With Quote #171

Quote:
Originally Posted by bman87 View Post
I added this to the ShouldHide() (Kinda, I used this code as an example for my own trails plugin, but this should work for this one)

This should hide the hat for only the player wearing it, if they are in first person view, which fixes the hats showing up in the camera; but everyone else in the server should be able to see the hat.

Code:
if(GetEntProp(client, Prop_Send, "m_iObserverMode") == 0)
		{
            for(new i=0;i<MAX_CATEGORIES;++i)
            {
                if (ent == g_iHats[client][i])
                    return Plugin_Handled;
            }
		}
Here is the whole function
Code:
public Action:ShouldHide(ent, client)
{
	if(g_bToggleEffects)
		if(!ShowClientEffects(client))
			return Plugin_Handled;
			
	for(new i=0;i<MAX_CATEGORIES;++i)
		if(ent == g_iHats[client][i])
			return Plugin_Handled;
			
	if(IsClientInGame(client))
    {
		if(GetEntProp(client, Prop_Send, "m_iObserverMode") == 4 && GetEntPropEnt(client, Prop_Send, "m_hObserverTarget")>=0)
        {
			for(new i=0;i<MAX_CATEGORIES;++i)
				if(ent == g_iHats[GetEntPropEnt(client, Prop_Send, "m_hObserverTarget")][i])
					return Plugin_Handled;
        }
        if(GetEntProp(client, Prop_Send, "m_iObserverMode") == 0)
		{
            for(new i=0;i<MAX_CATEGORIES;++i)
            {
                if (ent == g_iHats[client][i])
                    return Plugin_Handled;
            }
		}
    }
	
	return Plugin_Continue;
}
Isn't that redundant? Take a look at the bold areas.
minimoney1 is offline
bman87
Senior Member
Join Date: Dec 2008
Location: Michigan
Old 07-23-2012 , 18:34   Re: [ANY] Hats! (Version 1.0.4c - 2/19/2012)
Reply With Quote #172

I guess so. Like I said I did not actually modify this plugin. I used its code for example code..

I guess what my addition works for is if you use a 3rd person view plugin. It will still show up on the players own model

Last edited by bman87; 07-23-2012 at 18:37.
bman87 is offline
odin
Junior Member
Join Date: Oct 2008
Old 07-25-2012 , 00:19   Re: [ANY] Hats! (Version 1.0.4c - 2/19/2012)
Reply With Quote #173

Can anyone tellme how to point to a fast download server with this plugin? I have the files on my server, and my fast download server.... but they arent downloading for players.... any ideas why?
odin is offline
bman87
Senior Member
Join Date: Dec 2008
Location: Michigan
Old 07-31-2012 , 16:01   Re: [ANY] Hats! (Version 1.0.4c - 2/19/2012)
Reply With Quote #174

Quote:
Originally Posted by odin View Post
Can anyone tellme how to point to a fast download server with this plugin? I have the files on my server, and my fast download server.... but they arent downloading for players.... any ideas why?
What about downloads table?
Use SM File/Folder Downloader and Precacher because it's awesome and it's way more nicer to have all your downloads handled by only one plugin.
http://forums.alliedmods.net/showthread.php?t=69005

This plugin doesnt cache the files, you need to use the downloader plugin. downloads_simple.ini is for the plugin that the author has linked.
bman87 is offline
iHacked
SourceMod Donor
Join Date: Jul 2012
Location: Denmark
Old 08-03-2012 , 12:46   Re: [ANY] Hats! (Version 1.0.4c - 2/19/2012)
Reply With Quote #175

Is there someone there haves the sm_hats.sp to put in scripting because i cant download it :I
iHacked is offline
amohanlall32
SourceMod Donor
Join Date: Sep 2009
Location: Female
Old 08-03-2012 , 13:40   Re: [ANY] Hats! (Version 1.0.4c - 2/19/2012)
Reply With Quote #176

Quote:
Originally Posted by iHacked View Post
Is there someone there haves the sm_hats.sp to put in scripting because i cant download it :I
If you click the "Get Source" link it will give you the source file (.sp)
__________________
amohanlall32 is offline
theballin7
Member
Join Date: May 2011
Old 08-05-2012 , 03:47   Re: [ANY] Hats! (Version 1.0.4c - 2/19/2012)
Reply With Quote #177

i got it working in my server the menu comes up and everything but when i select a hat or glasses i dont see it on me at all and it is downloading the files
theballin7 is offline
Zephyrus
Cool Pig B)
Join Date: Jun 2010
Location: Hungary
Old 08-05-2012 , 03:57   Re: [ANY] Hats! (Version 1.0.4c - 2/19/2012)
Reply With Quote #178

Quote:
Originally Posted by theballin7 View Post
i got it working in my server the menu comes up and everything but when i select a hat or glasses i dont see it on me at all and it is downloading the files
only others can see it
__________________
Taking private C++/PHP/SourcePawn requests, PM me.
Zephyrus is offline
farmerbill256
Junior Member
Join Date: Oct 2009
Old 08-06-2012 , 10:39   Re: [ANY] Hats! (Version 1.0.4c - 2/19/2012)
Reply With Quote #179

After using an updated version of SDKHooks I was able to load my Synergy server without it crashing, so I'm now looking into SDK Hook based addons.

After downloading this, I used !hats in-game and it came up with the error that the model I was using was not valid for hats. I guess I would need to alter something with this plugin to adjust it for the models used in Synergy?

That game only uses the default Rebel and City 17 blue-jumpsuit models for the player models, so any idea how to set this up to work for it?

Thanks in advance
__________________

farmerbill256 is offline
theballin7
Member
Join Date: May 2011
Old 08-06-2012 , 17:15   Re: [ANY] Hats! (Version 1.0.4c - 2/19/2012)
Reply With Quote #180

i downloaded the .sp file to add some things but when i try to compile it tells me fatal error 120: cannot read from file: "ToggleEffects"

how do i fix this?
theballin7 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 16:18.


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