Raised This Month: $32 Target: $400
 8% 

[L4D & L4D2] Hats (1.50) [12-Mar-2024]


Post New Thread Reply   
 
Thread Tools Display Modes
Electr000999
Senior Member
Join Date: Aug 2011
Old 02-06-2022 , 02:05   Re: [L4D & L4D2] Hats (1.42) [16-Dec-2021]
Reply With Quote #251

Hi, Silvers,

in ShowPlayerList(int client) you use small buffer size for store userid of players, for example userids with number more 999 cannot be stored correctly, this cause close menu after select player.

Code:
void ShowPlayerList(int client)
{
	if( client && IsClientInGame(client) )
	{
		char sTempA[4], sTempB[MAX_NAME_LENGTH];
		Menu menu = new Menu(PlayerListMenu);

		for( int i = 1; i <= MaxClients; i++ )
		{
			if( IsValidClient(i) )
			{
				IntToString(GetClientUserId(i), sTempA, sizeof(sTempA));
				GetClientName(i, sTempB, sizeof(sTempB));
				menu.AddItem(sTempA, sTempB);
			}
		}

		if( g_bMenuType[client] )
			menu.SetTitle("Select player to disable hats:");
		else
			menu.SetTitle("Select player to change hats:");
		menu.ExitButton = true;
		menu.Display(client, MENU_TIME_FOREVER);
	}
}

Last edited by Electr000999; 02-06-2022 at 02:06.
Electr000999 is offline
Send a message via Skype™ to Electr000999
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Old 02-06-2022 , 04:09   Re: [L4D & L4D2] Hats (1.43) [06-Feb-2022]
Reply With Quote #252

Quote:
Originally Posted by NoroHime View Post
when survivor ledge grab then come back,they thirdperson hat appear on first person, does way to fix?
Seems to randomly happen, timers desyncing between events and thirdperson detection. Nothing I can really do. Couldn't replicate when testing either.

Quote:
Originally Posted by Electr000999 View Post
in ShowPlayerList(int client) you use small buffer size for store userid of players, for example userids with number more 999 cannot be stored correctly, this cause close menu after select player.
Thanks, fixed.

Code:
1.43 (06-Feb-2022)
    - Added a hackish fix for L4D2 not precaching models properly which has been causing stutter when using a model for the first time.
    - Fixed menus closing when selecting a player with a userid greater than 999. Thanks to "Electr000999" for reporting.
__________________
Silvers is offline
VladimirTk
Senior Member
Join Date: Apr 2021
Location: Perú - Latino América
Old 03-07-2022 , 19:02   Re: [L4D & L4D2] Hats (1.43) [06-Feb-2022]
Reply With Quote #253

When these cvars are set, autosave stops working for everyone, what's the problem?

If it's my problem, please help

Code:
l4d_hats_save "1" (stop working)

------------------------------------------------------

l4d_hats_make "a"

l4d_hats_menu "a"

Last edited by VladimirTk; 03-07-2022 at 19:02.
VladimirTk is offline
pan0s
Senior Member
Join Date: Nov 2017
Old 03-17-2022 , 01:15   Re: [L4D & L4D2] Hats (1.43) [06-Feb-2022]
Reply With Quote #254

zho translation updated.

And this version I have added an main menu to control commands easily and a third person hat view (setting will be saved in the cookie). Hope it could be merged to your source by comparing with diff.
Because I need to use my CPrintToChat, I need to include <pan0s>.
Attached Files
File Type: zip l4d_hats_pan0s.zip (79.7 KB, 88 views)
File Type: txt hatnames.phrases.txt (6.5 KB, 71 views)

Last edited by pan0s; 03-17-2022 at 01:34.
pan0s is offline
kot4404
Senior Member
Join Date: Mar 2013
Old 04-11-2022 , 12:06   Re: [L4D & L4D2] Hats (1.43) [06-Feb-2022]
Reply With Quote #255

It is very rarely used, but I noticed that if you use sm_hatc menu once (on bots at least) then your sm_hat will keep changing another player's hat, even after reconnecting
kot4404 is offline
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Old 04-15-2022 , 14:21   Re: [L4D & L4D2] Hats (1.44) [15-Apr-2022]
Reply With Quote #256

Quote:
Originally Posted by pan0s View Post
zho translation updated.

And this version I have added an main menu to control commands easily and a third person hat view (setting will be saved in the cookie). Hope it could be merged to your source by comparing with diff.
Because I need to use my CPrintToChat, I need to include <pan0s>.
You have so many changes, including various translation changes. I'll take a proper look some other time. I also don't want to have to require any extra include just to compile the plugin.

Quote:
Originally Posted by kot4404 View Post
It is very rarely used, but I noticed that if you use sm_hatc menu once (on bots at least) then your sm_hat will keep changing another player's hat, even after reconnecting
Thanks, fixed.
Code:
1.44 (15-Apr-2022)
    - Changed command "sm_hat" to accept 3 letter or smaller words for partial matching, e.g. "sm_hat saw".
    - Fixed command "sm_hatdel" not deleting the whole entry.
    - Fixed command "sm_hat" changing other players hats after using "sm_hatc" command. Thanks to "kot4404" for reporting.
    - Removed the "Big Helicopter" model from the data config. Too many reports of client-side glowing sprites remaining behind.
__________________
Silvers is offline
LordVGames
Junior Member
Join Date: Mar 2021
Old 04-21-2022 , 17:42   Re: [L4D & L4D2] Hats (1.44) [15-Apr-2022]
Reply With Quote #257

Could a command be added to turn off seeing everyone's hats, only for the person who used that command? That way people who might not want to see any hats can have them off, but anyone else can still see them/wear them.
LordVGames is offline
Krevik
Junior Member
Join Date: Mar 2021
Old 05-26-2022 , 07:34   Re: [L4D & L4D2] Hats (1.44) [15-Apr-2022]
Reply With Quote #258

Am I the only one having problems with making hats being saved for players? I just cannot get this to work in new versions. Lastly I used 1.24 and everything was fine, now the hats simply won't save when player leaves the server. I see there is config for admin flags, etc, was trying to configure it, but still wasn't able to make hat saving feature properly working :O

Also a suggestion:
I have implemented it on my version of hats, but I think more people need that:
detect readyup and automatically hide the readyup menu while using !hat menu and restore it after closing the hats menu

Another suggestion:
As LordVGames above me mentioned, it would be nice to have command that allows turning off seeing hats only for particular clients.

Greetings Silvers, nice job!

Last edited by Krevik; 05-26-2022 at 07:46.
Krevik is offline
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Old 05-26-2022 , 13:51   Re: [L4D & L4D2] Hats (1.44) [15-Apr-2022]
Reply With Quote #259

Will be updating with the above requested commands and merged changes pan0s made. Just doing some more testing before I release.
__________________
Silvers is offline
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Old 05-29-2022 , 10:13   Re: [L4D & L4D2] Hats (1.45) [29-May-2022]
Reply With Quote #260

Code:
1.45 (29-May-2022)
    - Added public command "sm_hats" to display a menu of hat options. Thanks to "pan0s" for writing.
    - Added public command "sm_hatall" to toggle the visibility of everyone's hats. Requested by "LordVGames".
    - Added admin command "sm_hatallc" to toggle a clients visibility hats. Requested by "Krevik".

    - Added saving a players visibility of all hats from the new commands above.
    - Added changes by "pan0s" to save the first and third person view of hats status.
    - Added a new colors stock for printing text, supports {RED} and {BLUE} colors. Thanks to "pan0s" for providing.
    - Added support for the "Ready-Up" plugin to hide or show the panel when using the Hats menu. Requested by "Krevik".

    - Changed commands "sm_hatshow", "sm_hatshowon" and "sm_hatshowoff" to only affect 1st person view, and 3rd person view with an optional argument "tp".
    - Fixed crashing if a model was missing. Plugin now fails to load forcing a config fix. Thanks to "Dragokas" for reporting.
    - Fixed hats not saving depending on the "l4d_hats_make" cvar value.

    - Thanks to "Krevik" and "pan0s" for help lots of help and testing.
    - Thanks to "pan0s" for updating the Chinese translations.
    - Thanks to "Impact" for updating the German translations.
    - Thanks to "Dragokas" for updating the Russian and Ukrainian translations.

    - Translation files have updated. Please update or errors will occur and the plugin won't work.
__________________
Silvers is offline
Reply


Thread Tools
Display Modes

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 15:58.


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