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

[REQ][TF2] Limit Sentries to Level 1


Post New Thread Reply   
 
Thread Tools Display Modes
Pawn 3-pg
Senior Member
Join Date: Jul 2009
Old 11-03-2010 , 11:44   Re: [REQ][TF2] Limit Sentries to Level 1
Reply With Quote #11

More than one engineer could complete the upgrade before the Y/2 timer goes off.
Pawn 3-pg is offline
Wazz
SourceMod Donor
Join Date: Mar 2009
Old 11-03-2010 , 15:51   Re: [REQ][TF2] Limit Sentries to Level 1
Reply With Quote #12

You could implement http://forums.alliedmods.net/showthread.php?t=133372 and use that.
Wazz is offline
icequeenzz
Member
Join Date: May 2008
Old 11-03-2010 , 16:39   Re: [REQ][TF2] Limit Sentries to Level 1
Reply With Quote #13

Quote:
Originally Posted by bl4nk View Post
Engineers will lose metal when trying to upgrade their sentries, as I haven't found a reliable way to detect when they've hit their sentry to give it back.
you could hook the sound fire event from the wrench because there are 2 sound related to a engy hitting a building ;)
__________________

icequeenzz is offline
Reconunit415
Junior Member
Join Date: Jul 2008
Old 11-03-2010 , 21:42   Re: [REQ][TF2] Limit Sentries to Level 1
Reply With Quote #14

Thanks guys. Any real way to block engies from upgrading their turrets is doable. Be it losing their metal in the process, or anything else for that matter.

Will forward this to my server's administator.
Reconunit415 is offline
bl4nk
SourceMod Developer
Join Date: Jul 2007
Old 11-03-2010 , 22:59   Re: [REQ][TF2] Limit Sentries to Level 1
Reply With Quote #15

Quote:
Originally Posted by icequeenzz View Post
you could hook the sound fire event from the wrench because there are 2 sound related to a engy hitting a building ;)
But does that tell you who the sound is coming from?
bl4nk is offline
Reconunit415
Junior Member
Join Date: Jul 2008
Old 11-04-2010 , 00:21   Re: [REQ][TF2] Limit Sentries to Level 1
Reply With Quote #16

Ok, Bl4nk, I installed your script and we have an issue. I can't exactly place it, but when there are alot of sentries in an area, and something gets destroyed most likely, or maybe someone switches weapons (to gunslinger, ie.), the script disables. You can then upgrade at will.
Reconunit415 is offline
bl4nk
SourceMod Developer
Join Date: Jul 2007
Old 11-05-2010 , 15:24   Re: [REQ][TF2] Limit Sentries to Level 1
Reply With Quote #17

Try the below code out. It doesn't work how I'd like it to, but it should do what you want just fine:

PHP Code:
#pragma semicolon 1

#include <sourcemod>

public Plugin:myinfo =
{
    
name "Block Sentry Upgrades",
    
author "bl4nk",
    
description "Makes it so sentries cannot be upgraded past level 1",
    
version "1.0.0",
    
url "http://forums.alliedmods.net/"
};

public 
OnGameFrame() {
    new 
iEnt = -1;
    while ((
iEnt FindEntityByClassname(iEnt"obj_sentrygun")) > -1) {
        
SetEntProp(iEntProp_Send"m_iUpgradeMetal"0);
    }

Engineers should be able to repair their sentries, but any metal towards upgrading their sentry will be lost.
bl4nk is offline
Reconunit415
Junior Member
Join Date: Jul 2008
Old 11-05-2010 , 18:49   Re: [REQ][TF2] Limit Sentries to Level 1
Reply With Quote #18

Error upon compiling, states that FindEntityByClassname is an undefined symbol.

Sorry to trouble you with this all :S

Last edited by Reconunit415; 11-05-2010 at 18:53.
Reconunit415 is offline
psychonic

BAFFLED
Join Date: May 2008
Old 11-05-2010 , 20:33   Re: [REQ][TF2] Limit Sentries to Level 1
Reply With Quote #19

Quote:
Originally Posted by Reconunit415 View Post
Error upon compiling, states that FindEntityByClassname is an undefined symbol.

Sorry to trouble you with this all :S
#include <sdktools>
psychonic is offline
Reconunit415
Junior Member
Join Date: Jul 2008
Old 11-05-2010 , 22:27   Re: [REQ][TF2] Limit Sentries to Level 1
Reply With Quote #20

Cheers. Will let y'all know if this works as intended.

Thanks.

EDIT: So far, so good. Updating OP with your post, for future search reference.

Last edited by Reconunit415; 11-06-2010 at 14:00.
Reconunit415 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 12:51.


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