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

[TF2] Yet Another Dodgeball Plugin (1.0) - 08/05/2010


Post New Thread Reply   
 
Thread Tools Display Modes
RumbleFrog
Great Tester of Whatever
Join Date: Dec 2016
Location: Fish Tank
Old 01-07-2017 , 17:25   Re: [TF2] Yet Another Dodgeball Plugin (1.0) - 08/05/2010
Reply With Quote #431

Does anyone have the SP to the latest SMX file, I decompiled SMX and tons of stuff are non-existing in the provided SP.
RumbleFrog is offline
adma
Senior Member
Join Date: Oct 2015
Old 03-26-2017 , 05:36   Re: [TF2] Yet Another Dodgeball Plugin (1.0) - 08/05/2010
Reply With Quote #432

Reinstalled this plugin and now it SOMETIMES produces the error
Code:
L 03/26/2017 - 09:34:13: [SM] Exception reported: No spawner class definition for the Red spawners exists in the config file.
L 03/26/2017 - 09:34:13: [SM] Blaming: TF2_Dodgeball.smx
L 03/26/2017 - 09:34:13: [SM] Call stack trace:
L 03/26/2017 - 09:34:13: [SM]   [0] SetFailState
L 03/26/2017 - 09:34:13: [SM]   [1] Line 312, C:\Projects\Sourcemod\Plugins\Code\TF2_Dodgeball.sp::EnableDodgeBall
L 03/26/2017 - 09:34:13: [SM]   [2] Line 255, C:\Projects\Sourcemod\Plugins\Code\TF2_Dodgeball.sp::OnConfigsExecuted
Any knowledge on how to stop it from doing this? It works fine on the same maps, it is like flipping a coin.
adma is offline
RumbleFrog
Great Tester of Whatever
Join Date: Dec 2016
Location: Fish Tank
Old 03-29-2017 , 07:11   Re: [TF2] Yet Another Dodgeball Plugin (1.0) - 08/05/2010
Reply With Quote #433

Quote:
Originally Posted by adma View Post
Reinstalled this plugin and now it SOMETIMES produces the error
Code:
L 03/26/2017 - 09:34:13: [SM] Exception reported: No spawner class definition for the Red spawners exists in the config file.
L 03/26/2017 - 09:34:13: [SM] Blaming: TF2_Dodgeball.smx
L 03/26/2017 - 09:34:13: [SM] Call stack trace:
L 03/26/2017 - 09:34:13: [SM]   [0] SetFailState
L 03/26/2017 - 09:34:13: [SM]   [1] Line 312, C:\Projects\Sourcemod\Plugins\Code\TF2_Dodgeball.sp::EnableDodgeBall
L 03/26/2017 - 09:34:13: [SM]   [2] Line 255, C:\Projects\Sourcemod\Plugins\Code\TF2_Dodgeball.sp::OnConfigsExecuted
Any knowledge on how to stop it from doing this? It works fine on the same maps, it is like flipping a coin.
Try another map? Seems like a loading issue.
RumbleFrog is offline
adma
Senior Member
Join Date: Oct 2015
Old 04-01-2017 , 22:19   Re: [TF2] Yet Another Dodgeball Plugin (1.0) - 08/05/2010
Reply With Quote #434

Quote:
Originally Posted by RumbleFrog View Post
Try another map? Seems like a loading issue.
That is the problem, a map will be fine and then I change the map to the same map (reload the map) and the plugin will produce that error.
adma is offline
TitanTF
Senior Member
Join Date: Mar 2016
Location: Singapore
Old 04-02-2017 , 07:14   Re: [TF2] Yet Another Dodgeball Plugin (1.0) - 08/05/2010
Reply With Quote #435

does anyone know how to detect intercepts? i know its just a thing of hooking deflect and checking if the target is the same as the person who deflected.

the problem is i dont know how to get the target of the rocket?
TitanTF is offline
TitanTF
Senior Member
Join Date: Mar 2016
Location: Singapore
Old 04-02-2017 , 07:44   Re: [TF2] Yet Another Dodgeball Plugin (1.0) - 08/05/2010
Reply With Quote #436

PHP Code:
public Action:OnPlayerDeflect(Handle:hEventString:strEventName[], bool:bDontBroadcast)
{
    new 
client GetClientOfUserId(GetEventInt(hEvent"userid"));
    new 
owner GetClientOfUserId(GetEventInt(hEvent"ownerid"));
    new 
rocketid GetEventInt(hEvent"object_entindex");

    if (
client != EntRefToEntIndex(g_iRocketTarget[rocketid]))
    {
        
CPrintToChat(client"You have intercepted someone else's rocket.");
    }

Here is what I have atm and it seems to also print this message when the player is deflecting his own rockets.
TitanTF is offline
adma
Senior Member
Join Date: Oct 2015
Old 04-03-2017 , 01:46   Re: [TF2] Yet Another Dodgeball Plugin (1.0) - 08/05/2010
Reply With Quote #437

Quote:
Originally Posted by TitanTF View Post
PHP Code:
public Action:OnPlayerDeflect(Handle:hEventString:strEventName[], bool:bDontBroadcast)
{
    new 
client GetClientOfUserId(GetEventInt(hEvent"userid"));
    new 
owner GetClientOfUserId(GetEventInt(hEvent"ownerid"));
    new 
rocketid GetEventInt(hEvent"object_entindex");

    if (
client != EntRefToEntIndex(g_iRocketTarget[rocketid]))
    {
        
CPrintToChat(client"You have intercepted someone else's rocket.");
    }

Here is what I have atm and it seems to also print this message when the player is deflecting his own rockets.
Do your check for the stolen rocket in the HomingRocketThink block, e.g
Code:
else if ((iDeflectionCount > g_iRocketDeflections[iIndex]))
	{
		// Calculate new direction from the player's forward
		new iClient = GetEntPropEnt(iEntity, Prop_Send, "m_hOwnerEntity");
		if (IsValidClient(iClient))
		{
			new Float:fViewAngles[3], Float:fDirection[3];
			GetClientEyeAngles(iClient, fViewAngles);
			GetAngleVectors(fViewAngles, fDirection, NULL_VECTOR, NULL_VECTOR);
			CopyVectors(fDirection, g_fRocketDirection[iIndex]);
			UpdateRocketSkin(iEntity, iTeam, TestFlags(iFlags, RocketFlag_IsNeutral));
			
			//Check if the rocket is stolen
			checkStolenRocket(iClient, iIndex);
		}
	}
then in your stolen rocket check you can do
Code:
if (EntRefToEntIndex(g_iRocketTarget[iIndex]) != iClient { ... }
adma is offline
TitanTF
Senior Member
Join Date: Mar 2016
Location: Singapore
Old 04-03-2017 , 07:21   Re: [TF2] Yet Another Dodgeball Plugin (1.0) - 08/05/2010
Reply With Quote #438

Quote:
Originally Posted by adma View Post
Do your check for the stolen rocket in the HomingRocketThink block, e.g
Code:
else if ((iDeflectionCount > g_iRocketDeflections[iIndex]))
	{
		// Calculate new direction from the player's forward
		new iClient = GetEntPropEnt(iEntity, Prop_Send, "m_hOwnerEntity");
		if (IsValidClient(iClient))
		{
			new Float:fViewAngles[3], Float:fDirection[3];
			GetClientEyeAngles(iClient, fViewAngles);
			GetAngleVectors(fViewAngles, fDirection, NULL_VECTOR, NULL_VECTOR);
			CopyVectors(fDirection, g_fRocketDirection[iIndex]);
			UpdateRocketSkin(iEntity, iTeam, TestFlags(iFlags, RocketFlag_IsNeutral));
			
			//Check if the rocket is stolen
			checkStolenRocket(iClient, iIndex);
		}
	}
then in your stolen rocket check you can do
Code:
if (EntRefToEntIndex(g_iRocketTarget[iIndex]) != iClient { ... }
This seems to print it every time a rocket is deflected.
TitanTF is offline
pear
Member
Join Date: May 2017
Location: sea
Old 05-23-2017 , 16:57   [TF2] Dodgeball (1.2) + other plugins
Reply With Quote #439

Hi cuties o3o,

just got into learning how to make sourcemod plugins and I kinda managed to combine
speedometer + announcer and observer point (removed tf2items)
into one plugin. (Thanks to ReFlexPoison and ClassicGuzzi for making these!)

I also removed FCVAR_PLUGIN because it's not needed anymore and changed version to 1.2.
Tested on dedicated server and everything seems to work. (23rd of March 2017)

Spoiler


EDIT: I think it fails to compile because colors.inc is needed?
Attached Files
File Type: sp Get Plugin or Get Source (TF2_Dodgeball.sp - 153 views - 70.5 KB)
File Type: smx TF2_Dodgeball.smx (32.4 KB, 135 views)

Last edited by pear; 05-23-2017 at 17:07.
pear is offline
cigzag
AlliedModders Donor
Join Date: Nov 2014
Location: NZ
Old 07-07-2017 , 04:31   Re: [TF2] Dodgeball (1.2) + other plugins
Reply With Quote #440

Quote:
Originally Posted by pear View Post
EDIT: I think it fails to compile because colors.inc is needed?
Correct, although I do recommend morecolors.inc as of now on since it's cleaner.

NOTE : Any include inside the plugin which doesn't come with sourcemod itself will result in a failed compile.
cigzag 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 05:05.


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