Raised This Month: $110 Target: $400
 27% 

[TF2 MvM] Sentry Tanks


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Theon32
Member
Join Date: Sep 2018
Location: mvm_isolation_rc3
Old 06-19-2019 , 09:55   [TF2 MvM] Sentry Tanks
Reply With Quote #1

So I was trying to create sentry tanks (Couldn't find a plugin for it but I've seen it used on servers before) and when I tried to create the sentry, it was in the placing state instead of being built already, and I need to know how to place the sentry above the tank.



Here's my code:
PHP Code:
public OnEntityCreated(iEntity, const String:EntName[])
{
    if (
StrEqual(EntName"tank_boss"false))
    {
        
decl String:Buffer[12];
        
Format(Buffersizeof(Buffer), "Client%d"iEntity);
        
int gun CreateEntityByName("obj_sentrygun");
        
DispatchKeyValue(gun"spawnflags""2");
        
DispatchKeyValue(gun"teamnum""3");
        
DispatchKeyValue(gun"defaultupgrade""1");
        
DispatchSpawn(gun);
        
DispatchKeyValue(iEntity"targetname"Buffer);
        
SetVariantString(Buffer);
        
AcceptEntityInput(gun"SetParent");
    }

Anyone know any fixes?
Thanks! -Theon
Theon32 is offline
Whai
Senior Member
Join Date: Jul 2018
Old 07-08-2019 , 08:19   Re: [TF2 MvM] Sentry Tanks
Reply With Quote #2

Try this :
Code:
SetEntProp(gun, Prop_Send, "m_bBuilding", 1);
__________________
Whai is offline
Reply


Thread Tools
Display Modes

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 16:55.


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