Raised This Month: $344 Target: $400
 86%   Almost there!

[L4D,L4D2,TF2,CSGO] NativeVotes (v0.8.3, 2014-10-16)


Post New Thread Reply   
 
Thread Tools Display Modes
BRU7US
Member
Join Date: Jul 2020
Location: Tatarstan, Kazan
Old 04-24-2022 , 13:05   Re: [L4D,L4D2,TF2,CSGO] NativeVotes (v0.8.3, 2014-10-16)
Reply With Quote #271

Quote:
Originally Posted by Spirit_12 View Post
Probably a late answer, but you are missing the passed argument in the code.

PHP Code:
NativeVotes_DisplayPass(vote"Vote Passed"); 
Write here full code of your Vote Handler specified in: NativeVotes_Create(Vote_Handler, ...);

Last edited by BRU7US; 04-24-2022 at 13:05.
BRU7US is online now
fdxx
Member
Join Date: Oct 2020
Old 04-24-2022 , 21:40   Re: [L4D,L4D2,TF2,CSGO] NativeVotes (v0.8.3, 2014-10-16)
Reply With Quote #272

NativeVotes simplified version, but only supports L4D2:

GitHub
fdxx is offline
KadabraZz
Member
Join Date: May 2020
Old 04-28-2022 , 05:42   Re: [L4D,L4D2,TF2,CSGO] NativeVotes (v0.8.3, 2014-10-16)
Reply With Quote #273

Quote:
Originally Posted by Spirit_12 View Post
Probably a late answer, but you are missing the passed argument in the code.

PHP Code:
NativeVotes_DisplayPass(vote"Vote Passed"); 
I think I have, in L4D1 this works perfectly, but in L4D2 the vote menu never goes away, but the configuration runs.

Code:
public TankCountHandler(Handle:vote, MenuAction:action, param1, param2)
{
	switch (action)
	{
		case MenuAction_VoteEnd:
		{
			if (param1 == NATIVEVOTES_VOTE_YES)
			{
				decl String:sNativePass[255];
				Format(sNativePass, sizeof(sNativePass), "OK senhor, mudando a configuração para %s!", sCfgTitle);
				NativeVotes_DisplayPass(vote, sNativePass);
				EmitSoundToAll("ui/menu_enter05.wav");
				CreateTimer(3.5, DelayChangeTank);
			}
			else if (param1 == NATIVEVOTES_VOTE_NO)
			{
				NativeVotes_DisplayFail(vote, NativeVotesFail_Loses);
				EmitSoundToAll("ui/beep_error01.wav");
			}
		}
		
		case MenuAction_VoteCancel:
		{
			if (param1 == VoteCancel_NoVotes)
			{
				NativeVotes_DisplayFail(vote, NativeVotesFail_NotEnoughVotes);
			}
			else
			{
				NativeVotes_DisplayFail(vote, NativeVotesFail_Generic);
			}
		}
		
		case MenuAction_End:
		{
			NativeVotes_Close(vote);
		}
	}
}
KadabraZz is offline
BRU7US
Member
Join Date: Jul 2020
Location: Tatarstan, Kazan
Old 04-28-2022 , 18:35   Re: [L4D,L4D2,TF2,CSGO] NativeVotes (v0.8.3, 2014-10-16)
Reply With Quote #274

Quote:
Originally Posted by KadabraZz View Post
I think I have, in L4D1 this works perfectly, but in L4D2 the vote menu never goes away, but the configuration runs.

Code:
public TankCountHandler(Handle:vote, MenuAction:action, param1, param2)
{
	switch (action)
	{
		case MenuAction_VoteEnd:
		{
			if (param1 == NATIVEVOTES_VOTE_YES)
			{
				decl String:sNativePass[255];
				Format(sNativePass, sizeof(sNativePass), "OK senhor, mudando a configuração para %s!", sCfgTitle);
				NativeVotes_DisplayPass(vote, sNativePass);
				EmitSoundToAll("ui/menu_enter05.wav");
				CreateTimer(3.5, DelayChangeTank);
			}
			else if (param1 == NATIVEVOTES_VOTE_NO)
			{
				NativeVotes_DisplayFail(vote, NativeVotesFail_Loses);
				EmitSoundToAll("ui/beep_error01.wav");
			}
		}
		
		case MenuAction_VoteCancel:
		{
			if (param1 == VoteCancel_NoVotes)
			{
				NativeVotes_DisplayFail(vote, NativeVotesFail_NotEnoughVotes);
			}
			else
			{
				NativeVotes_DisplayFail(vote, NativeVotesFail_Generic);
			}
		}
		
		case MenuAction_End:
		{
			NativeVotes_Close(vote);
		}
	}
}
What is operating system installed on your server?
BRU7US is online now
Red Flame
Junior Member
Join Date: Jan 2012
Location: Russian Federation, Sver
Old 04-29-2022 , 06:41   Re: [L4D,L4D2,TF2,CSGO] NativeVotes (v0.8.3, 2014-10-16)
Reply With Quote #275

Quote:
Originally Posted by KadabraZz View Post
I think I have, in L4D1 this works perfectly, but in L4D2 the vote menu never goes away, but the configuration runs.

Code:
public TankCountHandler(Handle:vote, MenuAction:action, param1, param2)
{
	switch (action)
	{
		case MenuAction_VoteEnd:
		{
			if (param1 == NATIVEVOTES_VOTE_YES)
			{
				decl String:sNativePass[255];
				Format(sNativePass, sizeof(sNativePass), "OK senhor, mudando a configuração para %s!", sCfgTitle);
				NativeVotes_DisplayPass(vote, sNativePass);
				EmitSoundToAll("ui/menu_enter05.wav");
				CreateTimer(3.5, DelayChangeTank);
			}
			else if (param1 == NATIVEVOTES_VOTE_NO)
			{
				NativeVotes_DisplayFail(vote, NativeVotesFail_Loses);
				EmitSoundToAll("ui/beep_error01.wav");
			}
		}
		
		case MenuAction_VoteCancel:
		{
			if (param1 == VoteCancel_NoVotes)
			{
				NativeVotes_DisplayFail(vote, NativeVotesFail_NotEnoughVotes);
			}
			else
			{
				NativeVotes_DisplayFail(vote, NativeVotesFail_Generic);
			}
		}
		
		case MenuAction_End:
		{
			NativeVotes_Close(vote);
		}
	}
}
Hello, from this handler I can't understand how do you count yes and no votes. Is there any error log? As far as I can tell, this shouldn't work at all. You need a result handler, which you either didn't provide or didn't write.

Last edited by Red Flame; 04-29-2022 at 06:48. Reason: Rephrasing
Red Flame is offline
BRU7US
Member
Join Date: Jul 2020
Location: Tatarstan, Kazan
Old 04-29-2022 , 13:22   Re: [L4D,L4D2,TF2,CSGO] NativeVotes (v0.8.3, 2014-10-16)
Reply With Quote #276

Quote:
Originally Posted by Red Flame View Post
Hello, from this handler I can't understand how do you count yes and no votes. Is there any error log? As far as I can tell, this shouldn't work at all. You need a result handler, which you either didn't provide or didn't write.
He doesn't need to count a "Yes" and "No" votes. This handler just return result like NATIVEVOTES_VOTE_YES - if vote is successful and NATIVEVOTES_VOTE_NO - if vote have failed.

Last edited by BRU7US; 04-29-2022 at 13:23.
BRU7US is online now
KadabraZz
Member
Join Date: May 2020
Old 05-03-2022 , 04:46   Re: [L4D,L4D2,TF2,CSGO] NativeVotes (v0.8.3, 2014-10-16)
Reply With Quote #277

My OS is Ubuntu 18.04
L4D1 and L4D2 in the same OS.
The same code I use in L4D1 I'm trying to use in L4D2
KadabraZz is offline
BRU7US
Member
Join Date: Jul 2020
Location: Tatarstan, Kazan
Old 05-03-2022 , 09:02   Re: [L4D,L4D2,TF2,CSGO] NativeVotes (v0.8.3, 2014-10-16)
Reply With Quote #278

Quote:
Originally Posted by KadabraZz View Post
My OS is Ubuntu 18.04
L4D1 and L4D2 in the same OS.
The same code I use in L4D1 I'm trying to use in L4D2
Try to update your NativeVotes. Seems you has a SM 1.10 or higher version and old NativeVotes doesn't work on it.
BRU7US is online now
Alice.bnd
Member
Join Date: Sep 2011
Location: Russia, SPb
Old 06-23-2022 , 18:30   Re: [L4D,L4D2,TF2,CSGO] NativeVotes (v0.8.3, 2014-10-16)
Reply With Quote #279

NativeVotes doesn't work after latest tf2 update. Has anyone already fixed the problem?
__________________
Alice.bnd is offline
Send a message via ICQ to Alice.bnd
nosoop
Veteran Member
Join Date: Aug 2014
Old 06-23-2022 , 21:46   Re: [L4D,L4D2,TF2,CSGO] NativeVotes (v0.8.3, 2014-10-16)
Reply With Quote #280

Quote:
Originally Posted by Alice.bnd View Post
NativeVotes doesn't work after latest tf2 update. Has anyone already fixed the problem?
Yes. Download this release.
__________________
I do TF2, TF2 servers, and TF2 plugins.
I don't do DMs over Discord -- PM me on the forums regarding inquiries.
AlliedModders Releases / Github / TF2 Server / Donate (BTC / BCH / coffee)
nosoop 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 05:05.


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