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

[TF2] Yet Another Dodgeball Plugin v1.4.1 (1/19/2019)


Post New Thread Reply   
 
Thread Tools Display Modes
cigzag
AlliedModders Donor
Join Date: Nov 2014
Location: NZ
Old 08-17-2017 , 02:10   Re: [TF2] Yet Another Dodgeball Plugin v1.3.2 (7/21/2017)
Reply With Quote #51

Quote:
Originally Posted by Honey Senpai View Post
You can
Find this part of code in the tools part in the tf2_dodgeball.sp file in scripts

Code:
stock int SelectTarget(int iTeam, int iRocket = -1)
{
	int iTarget			 = -1;
	float fTargetWeight = 0.0;
	float fRocketPosition[3];
	float fRocketDirection[3];
	float fWeight;
	bool bUseRocket;

	if (iRocket != -1)
	{
		int iClass = g_iRocketClass[iRocket];
		int iEntity = EntRefToEntIndex(g_iRocketEntity[iRocket]);

		GetEntPropVector(iEntity, Prop_Send, "m_vecOrigin", fRocketPosition);
		CopyVectors(g_fRocketDirection[iRocket], fRocketDirection);
		fWeight = g_fRocketClassTargetWeight[iClass];

		bUseRocket = true;
	}

	for (int iClient = 1; iClient <= MaxClients; iClient++)
	{
		// If the client isn't connected, skip.
		if (!IsValidClient(iClient, true)) continue;
		if (iTeam && GetClientTeam(iClient) != iTeam) continue;

		// Determine if this client should be the target.
		float fNewWeight = GetURandomFloatRange(0.0, 100.0);

		if (bUseRocket == true)
		{
			float fClientPosition[3]; GetClientEyePosition(iClient, fClientPosition);
			float fDirectionToClient[3]; MakeVectorFromPoints(fRocketPosition, fClientPosition, fDirectionToClient);
			fNewWeight += GetVectorDotProduct(fRocketDirection, fDirectionToClient) * fWeight;
		}

		if ((iTarget == -1) || fNewWeight >= fTargetWeight)
		{
			iTarget = iClient;
			fTargetWeight = fNewWeight;
		}
	}

	return iTarget;
}
and replace it with this

Code:
stock int SelectTarget(int iTeam, int iRocket = -1)
{
	int iTarget = -1;
	float fRocketPosition[3];
	float fRocketDirection[3];
	bool bUseRocket;
	float flBestLength = 99999.9;
	
	if (iRocket != -1)
	{
		int iEntity = EntRefToEntIndex(g_iRocketEntity[iRocket]);
		GetEntPropVector(iEntity, Prop_Send, "m_vecOrigin", fRocketPosition);
		
	}
	
	for (int i = 1; i <= MaxClients; i++)
	{
		// If the client isn't connected, skip.
		if (!IsValidClient(i, true))continue;
		if (iTeam && GetClientTeam(i) != iTeam)continue;
		float flPos2[3];
		GetClientEyePosition(i, flPos2);
		
		float flDistance = GetVectorDistance(fRocketPosition, flPos2);
		
		//if(flDistance < 70.0) continue;
		
		if (flDistance < flBestLength)
		{
			iTarget = i;
			flBestLength = flDistance;
		}
		
	}
	return iTarget;
}
then save it as something different like tf2_dodgeball2.sp
compile it.
move original to disabled or delete which ever.
put the smx file you got from compiling it into the plugin folder.
then boom targets the closest.

NOTE: spawn rockets will target the closest as well.

Its what I use on my version of the original plugin. I ripped it from the rtd effect homing rockets and mashed it in there. It should work cause it seem that the tools part was the only thing you didn't touch much.
Oh and by the way I love that some one actually made the plugin better and more easily available.
here is my version if you want to take a gander it uses the original plugin though. it replaces the rocket with flares. the reason is that rockets have a lot of particles that will hurt people who have low frame rates (most of my friends). so i chose to replace the entity with a flare because it has much less particles compared to rockets though I had to add a light entity to it to let people see it.
so let me know if it works for you.

EDIT: I just adjusted it to work for the plugin and all ready did the changes in the sp file so you just have to use the bottom one.
Interesting, will have to have to take a look.
cigzag is offline
Emu Legs
New Member
Join Date: May 2012
Location: Earth
Old 08-20-2017 , 18:27   Re: [TF2] Yet Another Dodgeball Plugin v1.3.2 (7/21/2017)
Reply With Quote #52

Dear Mr SnowTiger

Long to short, i have some ideas i would like to work with you and try on one of my servers if you're interested you should contact me ^_^


http://steamcommunity.com/id/LordFroggy/
or
https://discord.gg/Pdq9PXR "EmuLegs" is my name on discord


Edit: Server is in Australia, so you could try as well

Last edited by Emu Legs; 08-21-2017 at 07:04. Reason: Adding Info
Emu Legs is offline
cigzag
AlliedModders Donor
Join Date: Nov 2014
Location: NZ
Old 08-20-2017 , 21:03   Re: [TF2] Yet Another Dodgeball Plugin v1.3.2 (7/21/2017)
Reply With Quote #53

Quote:
Originally Posted by Emu Legs View Post
Dear Mr SnowTiger

Long to short, i have some ideas i would like to work with you and try on one of my servers if you're interested you should contact me ^_^


http://steamcommunity.com/id/LordFroggy/
or
https://discord.gg/Pdq9PXR "EmuLegs" is my name on discord


Edit: Server is in Australia, so you could try as well ;)
No worries, my name on steam is blood. I live in NZ so i'm 2 hours behind, i'll add you later today and most probably join your discord.
cigzag is offline
cigzag
AlliedModders Donor
Join Date: Nov 2014
Location: NZ
Old 08-26-2017 , 18:10   Re: [TF2] Yet Another Dodgeball Plugin v1.3.2 (7/21/2017)
Reply With Quote #54

Updated with updater support and fixes
cigzag is offline
babyghost10
New Member
Join Date: Aug 2014
Old 08-29-2017 , 09:27   Re: [TF2] Yet Another Dodgeball Plugin v1.3.2 (7/21/2017)
Reply With Quote #55

http://prntscr.com/geh2gt


im not able to get plugin to load. any ideas?
babyghost10 is offline
cigzag
AlliedModders Donor
Join Date: Nov 2014
Location: NZ
Old 09-02-2017 , 02:35   Re: [TF2] Yet Another Dodgeball Plugin v1.3.2 (7/21/2017)
Reply With Quote #56

Quote:
Originally Posted by babyghost10 View Post
http://prntscr.com/geh2gt


im not able to get plugin to load. any ideas?
Download and install the plugin "Updater"
cigzag is offline
Dr.Doctor
AlliedModders Donor
Join Date: Feb 2017
Location: Hong Kong
Old 09-30-2017 , 13:46   Re: [TF2] Yet Another Dodgeball Plugin v1.3.2 (7/21/2017)
Reply With Quote #57

Dear SnowTigerVidz,

I have made a pull request on GitHub, please check, thanks
__________________
Dr.Doctor is offline
cigzag
AlliedModders Donor
Join Date: Nov 2014
Location: NZ
Old 10-01-2017 , 04:06   Re: [TF2] Yet Another Dodgeball Plugin v1.3.2 (7/21/2017)
Reply With Quote #58

Merged with Dr. Doctor, new version available on github
cigzag is offline
cigzag
AlliedModders Donor
Join Date: Nov 2014
Location: NZ
Old 11-29-2017 , 02:34   Re: [TF2] Yet Another Dodgeball Plugin v1.3.2 (7/21/2017)
Reply With Quote #59

Updated this plugin for once, sorry for the inactivity, fixed some flame sounds
cigzag is offline
IIPoliII
New Member
Join Date: Mar 2018
Old 04-28-2018 , 05:35  
Reply With Quote #60

Hello,
I am trying to install it on my server with nanobot, it's just don't work.
I putted genral.cfg correctly no rocket spawns. I have all my guns and i use nanobot.
Munitions aren't inifinte it's like it's not activated i made the command to activate the plugin nothing ....
Can you help me,
Thx
Poli

Hello everyone,
I am currently trying to make a dodgeball server with this plugin : here
But it don't work no rocket spawn, i have all my guns. I also putted nanobot he is present and i can kill him. I tried to make the command in the console to start the plugin (tf_dodgeball_enabled) didn't worked. I tried also other plugins didn't worked.

On this one i followed all the steps like changing general (new).cfg to general.cfg.

Does anyone have an idea what happens why the plugin don't work at all?

Thank u
Poli

Last edited by DarkDeviL; 05-03-2018 at 08:47. Reason: Merged bump / cross post
IIPoliII 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 03:46.


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