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

Solved [TF2] Build instant sentry with instant level


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
oplkill
Member
Join Date: Aug 2015
Old 12-17-2017 , 09:50   [TF2] Build instant sentry with instant level
Reply With Quote #1

I trying to create instant sentry on point with instant level 2 or 3, with instant "PercentageConstructed", but its still has upgrade animation which during 1-2 seconds...
How to make it instant, that you created sentry(not engineer, via code) and it will ready to fight intantly, not after 2 seconds...?

PHP Code:
...
int sentry CreateEntityByName("obj_sentrygun");
    
if(!
IsValidEntity(sentry)) return 0;
    
int iTeam GetClientTeam(builder);

DispatchKeyValueVector(sentry"origin"Position);
DispatchKeyValueVector(sentry"angles"Angle);

SetEntProp(sentryProp_Send"m_iUpgradeLevel"level);
SetEntProp(sentryProp_Send"m_iHighestUpgradeLevel"level);
SetEntProp(sentryProp_Send"m_iUpgradeLevel"level);
SetEntProp(sentryProp_Data"m_spawnflags"flags);
SetEntProp(sentryProp_Send"m_bBuilding"1);
SetEntProp(sentryProp_Send"m_nSkin"iTeam -2);
SetEntProp(sentryProp_Send"m_iAmmoShells"999);
if(
GetEntProp(sentryProp_Send"m_iUpgradeLevel") == 3)
    
SetEntProp(sentryProp_Send"m_iAmmoRockets"200);
SetEntProp(sentryProp_Send"m_iState"1);
DispatchSpawn(sentry);

SetVariantInt(iTeam);
AcceptEntityInput(sentry"SetTeam");
ActivateEntity(sentry);
SetEntPropEnt(sentryProp_Send"m_hBuilder"builder);
SetEntPropFloat(sentryProp_Send"m_flPercentageConstructed"1.0);
... 

Last edited by oplkill; 12-17-2017 at 10:11.
oplkill is offline
Pelipoika
Veteran Member
Join Date: May 2012
Location: Inside
Old 12-17-2017 , 09:53   Re: [TF2] Build instant sentry with instant level
Reply With Quote #2

DispatchKeyValue sentry "defaultupgrade" 0 - 2
__________________
Pelipoika is offline
oplkill
Member
Join Date: Aug 2015
Old 12-17-2017 , 10:11   Re: [TF2] Build instant sentry with instant level
Reply With Quote #3

Thanks, that working!


for copypasters
PHP Code:
DispatchKeyValue(sentry"defaultupgrade""1"); 
oplkill 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 10:38.


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