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

[L4D & L4D2] Multiple Equipments


Post New Thread Reply   
 
Thread Tools Display Modes
P00kster
Member
Join Date: Aug 2015
Old 09-04-2016 , 17:40   Re: [L4D & L4D2] Multiple Equipments
Reply With Quote #331

Quote:
Originally Posted by MasterMind420 View Post
thanks, seemed kinda odd. On regards to how regular guns reload when reaching 1 clip and empty reserve. Are they going to 0 clip when reloaded at ammo piles and auto reloading themselves, like the pistol does? Btw i modified guncontrol removing the depreciated code...i'll probably push another update of all 3 plugins tonight again
Yes the auto reload function was working. I also tested the custom connect message and I ran into a problem. I set it to chat message, and the connect message started to spam the chat box. I took a look into the code and I noticed you placed the connect message timer within an OnGameFrame function. I think this is causing the timer to fire multiple times as it's trying to reactive the timer every game frame. This might fix it:

Code:
//CUSTOM CONNECT MESSAGE(>>>UNTESTED<<<)
		if(!(GetEntityFlags(client) & FL_FROZEN) && IsValidEntity(client))
		{
			if(MsgOn[client] && (GetConVarInt(l4d_me_custom_notify) == 1 || GetConVarInt(l4d_me_custom_notify) == 2))
			{
				MsgOn[client]=false;
				CreateTimer(1.0, ME_Notify_Client, client, TIMER_FLAG_NO_MAPCHANGE);
			}
		}
By moving the MsgOn[client]=false to this position, the timer should only fire once.
P00kster is offline
MasterMind420
BANNED
Join Date: Nov 2010
Old 09-04-2016 , 17:47   Re: [L4D & L4D2] Multiple Equipments
Reply With Quote #332

yah nah i originally coded it and it was working, i'm aware of the ongameframe continuous fire, but i placed the MsgOn[client]=false; into the timer itself which works fine, something else is wrong maybe the bool is backwards, which i'll work on fixing soon, i made an attempt at moving it somewhere else and screwed it up...but placing it within the timer works fine too ;) its the only issue i knew about i hadn't gotten around to fixing yet, but thanks for the heads up anyway...

Last edited by MasterMind420; 09-04-2016 at 17:48.
MasterMind420 is offline
MasterMind420
BANNED
Join Date: Nov 2010
Old 09-04-2016 , 18:17   Re: [L4D & L4D2] Multiple Equipments
Reply With Quote #333

i've also been noticing on rare accurances the ammo lock for primary weapons doesnt always work so i'm gonna add a reassurance to it. For instance with weapons that have higher fire rates or for weapons modded with higher fire rates, should work nicely...

Last edited by MasterMind420; 09-04-2016 at 18:20.
MasterMind420 is offline
P00kster
Member
Join Date: Aug 2015
Old 09-04-2016 , 19:14   Re: [L4D & L4D2] Multiple Equipments
Reply With Quote #334

Quote:
Originally Posted by MasterMind420 View Post
i've also been noticing on rare accurances the ammo lock for primary weapons doesnt always work so i'm gonna add a reassurance to it. For instance with weapons that have higher fire rates or for weapons modded with higher fire rates, should work nicely...
Yes it just happened to me too and I could no longer use primary weapons until I got ammo. Also found something else. This error is showing up quite a lot in the error log:

L 09/04/2016 - 19:03:00: [SM] Call stack trace:
L 09/04/2016 - 19:03:00: [SM] [0] GetEventInt
L 09/04/2016 - 19:03:00: [SM] [1] Line 271, /home/groups/sourcemod/upload_tmp/phpfyIpNL.sp::player_use()
L 09/04/2016 - 19:03:00: [SM] Exception reported: Invalid game event handle 0 (error 4)
L 09/04/2016 - 19:03:00: [SM] Blaming: l4d_multiple_equipment.smx()
P00kster is offline
P00kster
Member
Join Date: Aug 2015
Old 09-04-2016 , 19:33   Re: [L4D & L4D2] Multiple Equipments
Reply With Quote #335

Changing from this:

HookEvent("player_use", player_use, EventHookMode_PostNoCopy);

To this:

HookEvent("player_use", player_use, EventHookMode_Post);

Has fixed the errors showing up in the log. Since you're pulling the UserId from the event, PostNoCopy would cause an error.

Last edited by P00kster; 09-04-2016 at 19:36.
P00kster is offline
Lux
Veteran Member
Join Date: Jan 2015
Location: Cat
Old 09-04-2016 , 19:38   Re: [L4D & L4D2] Multiple Equipments
Reply With Quote #336

Quote:
Originally Posted by P00kster View Post
Changing from this:

HookEvent("player_use", player_use, EventHookMode_PostNoCopy);

To this:

HookEvent("player_use", player_use, EventHookMode_Post);

Has fixed the errors showing up in the log. Since you're pulling the UserId from the event, PostNoCopy would cause an error.
Yea you tell him P00kster
you should change all events from postnocopt to post unless they are pre if the error is something like this
[SM] Exception reported: Invalid game event handle 0 (error 4)
Only do this for game events if it comes up with this error
__________________
Connect
My Plugins: KlickME
[My GitHub]

Commission me for L4D
Lux is offline
MasterMind420
BANNED
Join Date: Nov 2010
Old 09-04-2016 , 19:47   Re: [L4D & L4D2] Multiple Equipments
Reply With Quote #337

ahhh the hell with both of ya...lol ive got something better in the works ;-) but your right except ive never once seen that error...im switching everything over to a ammo_pickup hook...which is working much better :-) which i should have done to begin with...and it will also fix an issue with player use causing problems doors not always opening.

Last edited by MasterMind420; 09-04-2016 at 19:55.
MasterMind420 is offline
P00kster
Member
Join Date: Aug 2015
Old 09-15-2016 , 10:15   Re: [L4D & L4D2] Multiple Equipments
Reply With Quote #338

Based on the last version I tested, I decided to give it a try on L4D1. The plugin started spamming my error log constantly. After looking at the error, it looks like this plugin is calling for hooks that are not available in L4D1. So I think it's safe to say this plugin will no longer work with L4D1 since these hooks do not exist. Not sure if your rewrite will fix this. But if the hooks remain the same, then this plugin will be a L4D2 plugin only. By the way, the hooks in question were related to the third person shoulder.
P00kster is offline
MasterMind420
BANNED
Join Date: Nov 2010
Old 09-19-2016 , 12:22   Re: [L4D & L4D2] Multiple Equipments
Reply With Quote #339

Quote:
Originally Posted by P00kster View Post
Based on the last version I tested, I decided to give it a try on L4D1. The plugin started spamming my error log constantly. After looking at the error, it looks like this plugin is calling for hooks that are not available in L4D1. So I think it's safe to say this plugin will no longer work with L4D1 since these hooks do not exist. Not sure if your rewrite will fix this. But if the hooks remain the same, then this plugin will be a L4D2 plugin only. By the way, the hooks in question were related to the third person shoulder.
hmm i'll need the logged errors in order to investigate any further...and as far as the hooking is concerned the only things related to hooking are some of the thirdperson fixes, but i'm using all original hooks, i'll check this out for myself, i suspect that it may just be the event hook mode thats causing the problem, i made some changes to them...but i'll look into it myself, I don't wanna dump L4D1 support just yet because i wanted to keep the original plugin functioning as best as possible, but its possible I may not continue to support L4D1 in the future...

Last edited by MasterMind420; 09-19-2016 at 12:24.
MasterMind420 is offline
AlirezaTiG3R
Junior Member
Join Date: Sep 2016
Old 10-05-2016 , 02:56   Re: [L4D & L4D2] Multiple Equipments
Reply With Quote #340

I set this values but didn't work for me!!

Code:
	l4d_me_mode=CreateConVar("l4d_me_mode", "1", "0:show mode select menu, 1:mode 1 for every one, 2, mode 2 for every one");
	l4d_me_msg=CreateConVar("l4d_me_msg", "0", "0:diable message, 1, show in chat, 2, show in hintbox");
Message and menu yet be displayed
AlirezaTiG3R 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 07:20.


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