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

[TF2] Prevent Sentry Placement


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Requiesta
Senior Member
Join Date: May 2012
Location: Texas
Old 04-16-2017 , 12:55   [TF2] Prevent Sentry Placement
Reply With Quote #1

I've looked at a lot of different threads and tutorials on this site and others on how to block sentries from being placed. If someone else posted this, please delete this one but I couldn't find it after searching for a good 10 minutes.

Code:
// Block Sentries
public OnEntityCreated(iEnt, const String:classname[])
{
	if(!IsValidEntity(iEnt))
		return;
	
	if(StrEqual(classname, "obj_sentrygun"))
	{
		AcceptEntityInput(iEnt, "Kill");
	}
}
In-game this prevents the sentry blueprint from even showing up and I can't circumvent it through the build menu. I tried the Command Listener version but it could be circumvented.
__________________
YouTuber, Modder, Accountant, and somehow I still enjoy programming after all that.

Check out my YouTube Channel.
Requiesta is offline
 



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:24.


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