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

[REQ][TF2]if player is not owner dispenser, block supply


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Research
SourceMod Donor
Join Date: Nov 2011
Old 05-09-2015 , 22:14   [REQ][TF2]if player is not owner dispenser, block supply
Reply With Quote #1

I mean if 'player A' build dispenser, A can get health / ammo / metal but other teammate can't get ammo and metal for A's dispenser. they can get only health.
is this possible?

Last edited by Research; 05-09-2015 at 23:13.
Research is offline
Oshizu
Veteran Member
Join Date: Nov 2012
Location: Warsaw
Old 05-10-2015 , 11:35   Re: [REQ][TF2]if player is not owner dispenser, block supply
Reply With Quote #2

For doing so i'd suggest using arthurdead's code as a base:
https://forums.alliedmods.net/showthread.php?t=259931
- Remove healing related part
- Add check if player is owner of dispenser
- If he is not then return false:
PHP Code:
        DHookSetReturn(hReturnfalse);
        return 
MRES_Supercede
You will need DHooks Extension for that plugin to work tho
__________________
...

Last edited by Oshizu; 05-10-2015 at 11:36.
Oshizu is offline
Chdata
Veteran Member
Join Date: Aug 2012
Location: Computer Chair, Illinois
Old 05-10-2015 , 12:43   Re: [REQ][TF2]if player is not owner dispenser, block supply
Reply With Quote #3

yes, though I made a version where teammates can take metal if the owner has more than 150 ammo.

I plan to make it a convar and have clientprefs for !metalsteal on/off or !metalsteal 150 to change whether or not you want others to take your metal.

Flat out blocking it kind griefs noobs and overall weakens your nest if they just don't know.
__________________

Last edited by Chdata; 05-10-2015 at 12:44.
Chdata is offline
Research
SourceMod Donor
Join Date: Nov 2011
Old 05-11-2015 , 01:07   Re: [REQ][TF2]if player is not owner dispenser, block supply
Reply With Quote #4

uh, how can I check dispenser owner?

edit: I found how can do that. maybe.

Last edited by Research; 05-11-2015 at 08:11.
Research 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 23:30.


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