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

[TF2] Changing owner of stickies.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Drixevel
AlliedModders Donor
Join Date: Sep 2009
Location: Somewhere headbangin'
Old 04-30-2016 , 09:28   [TF2] Changing owner of stickies.
Reply With Quote #1

So the goal is to change the owner of stickies from one Demoman to another in order to allow the other Demoman to detonate them and allow them to stay spawned if the original owner dies.

Things tried so far:
Code:
		SetEntPropEnt(entity, Prop_Data, "m_hOwnerEntity", client);
		SetEntPropEnt(entity, Prop_Data, "m_hThrower", client);
		SetEntPropEnt(entity, Prop_Send, "m_hLauncher", weapon);
		SetEntPropEnt(entity, Prop_Send, "m_hOriginalLauncher", weapon);
'client' is the new client and 'weapon' is the stickybomb launcher he's holding.

This doesn't seem to do much except give the sticky count in the bottom right of the screen an abnormal behavior and the ability to hold right click and hear the detonation sound spam until you let the bind go.

Any help would be appreciated, please and thank you guys.
Drixevel is offline
Farbror Godis
AlliedModders Donor
Join Date: Feb 2016
Old 05-01-2016 , 05:36   Re: [TF2] Changing owner of stickies.
Reply With Quote #2

Code:
SetEntPropEnt(entity, Prop_Send, "m_hThrower", client);
Perhaps?
__________________

Last edited by Farbror Godis; 05-01-2016 at 18:09.
Farbror Godis is offline
Drixevel
AlliedModders Donor
Join Date: Sep 2009
Location: Somewhere headbangin'
Old 05-01-2016 , 10:45   Re: [TF2] Changing owner of stickies.
Reply With Quote #3

Quote:
Originally Posted by Farbror Godis View Post
Code:
SetEntPropEnt(entity, Prop_Send, "m_hThrower", client);
Perhaps?
If you do that, it'll give you an error saying that netprop doesn't exist.
Drixevel is offline
Farbror Godis
AlliedModders Donor
Join Date: Feb 2016
Old 05-01-2016 , 10:57   Re: [TF2] Changing owner of stickies.
Reply With Quote #4

Yeah, just realised i was wrong about CTFStickBomb having that prop. It does however (double checked) have a m_hOwnerEntity netprop (not the datamap), so perhaps you could also try that
__________________

Last edited by Farbror Godis; 05-01-2016 at 18:09.
Farbror Godis is offline
Drixevel
AlliedModders Donor
Join Date: Sep 2009
Location: Somewhere headbangin'
Old 05-02-2016 , 06:53   Re: [TF2] Changing owner of stickies.
Reply With Quote #5

Quote:
Originally Posted by Farbror Godis View Post
Yeah, just realised i was wrong about CTFStickBomb having that prop. It does however (double checked) have a m_hOwnerEntity netprop (not the datamap), so perhaps you could also try that
Changed it to a netprop and It's still not working. There might be a signature somewhere that can maybe do this but I don't have the knowledge or skills to do that.
Drixevel is offline
psychonic

BAFFLED
Join Date: May 2008
Old 05-02-2016 , 08:29   Re: [TF2] Changing owner of stickies.
Reply With Quote #6

The sticky launcher itself contains a list of the "active" stickies that have been fired by it. This list is used for detonating and other things. Modifying it through just Sourcepawn is quite a bit tricky.

It might be easier to just change the owner of the sticky launcher (basically, steal their gun and equip on the new owner).
psychonic is offline
talkingmelon
Junior Member
Join Date: Dec 2014
Old 08-23-2017 , 17:52   Re: [TF2] Changing owner of stickies.
Reply With Quote #7

First of all sorry for necro...
(also I'm not actually using sourcepawn but I think the answer will be similar regardless)

Quote:
Originally Posted by psychonic View Post
The sticky launcher itself contains a list of the "active" stickies that have been fired by it. This list is used for detonating and other things. Modifying it through just Sourcepawn is quite a bit tricky.

It might be easier to just change the owner of the sticky launcher (basically, steal their gun and equip on the new owner).

So I'm trying to do something similar to this - basically, spawn in a sticky for a player. The actual spawning was no problem but like you said getting the 'owner' to be set properly is tricky. Would I be correct in assuming that the way you would go about doing this is by manually navigating the datatables and managing that list yourself? Looking at the dump, I'm guessing m_Item but I'm not sure what to do from there. Can someone point me in the right direction?

Thanks
talkingmelon 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 19:56.


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