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

[TF2] Shoot player into the air?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
AnubisTF2
Senior Member
Join Date: Oct 2015
Old 06-29-2018 , 13:26   [TF2] Shoot player into the air?
Reply With Quote #1

I'm attempting to make a play get shot up into the air on command, then freeze into the air. Sadly it's not going as planned.

Here is what I have. Instead of shooting the player up, it won't do anything until the player jumps, THEN will shoot them into the air, and keep doing it everytime they hit the ground, but I only want it to happen once.

Code:
new Float:uVelocity[3]
uVelocity[0] = 0.0
uVelocity[1] = 0.0
uVelocity[2] = 800.0
	
TeleportEntity(iBoss, NULL_VECTOR, NULL_VECTOR, uVelocity);
SetEntityGravity(iBoss, 0.1);
Any and all help is greatly appreciated!
__________________
naw
AnubisTF2 is offline
mug1wara
AlliedModders Donor
Join Date: Jun 2018
Old 06-29-2018 , 15:28   Re: [TF2] Shoot player into the air?
Reply With Quote #2

Maybe this will help? SetEntityFlags(iClient, !FL_ONGROUND);

PHP Code:
#include <sourcemod>
#include <sdktools>

#pragma semicolon 1

public void OnPluginStart()
{
    
RegConsoleCmd("sm_test"Cmd_Test);
}

public 
Action Cmd_Test(int iClientint iArgs)
{
    if (
IsClientInGame(iClient))
    {
        
SetEntityFlags(iClient, !FL_ONGROUND);
        
        
float uVelocity[3];
        
        
uVelocity[0] = 0.0;
        
uVelocity[1] = 0.0;
        
uVelocity[2] = 800.0;
            
        
TeleportEntity(iClientNULL_VECTORNULL_VECTORuVelocity);
        
        
CreateTimer(0.5Timer_FreezeiClient);
    }
    
    return 
Plugin_Continue;
}

public 
Action Timer_Freeze(Handle hTimerint iClient)
{
    
SetEntPropFloat(iClientProp_Data"m_flLaggedMovementValue"0.0);

mug1wara is offline
ddhoward
Veteran Member
Join Date: May 2012
Location: California
Old 06-29-2018 , 19:15   Re: [TF2] Shoot player into the air?
Reply With Quote #3

PHP Code:
SetEntityFlags(iClient, !FL_ONGROUND); 
This does not do what you think it does.
__________________
ddhoward is offline
AnubisTF2
Senior Member
Join Date: Oct 2015
Old 06-29-2018 , 19:38   Re: [TF2] Shoot player into the air?
Reply With Quote #4

Quote:
Originally Posted by ddhoward View Post
PHP Code:
SetEntityFlags(iClient, !FL_ONGROUND); 
This does not do what you think it does.
so should I not use that?
__________________
naw
AnubisTF2 is offline
mug1wara
AlliedModders Donor
Join Date: Jun 2018
Old 06-30-2018 , 05:47   Re: [TF2] Shoot player into the air?
Reply With Quote #5

Quote:
Originally Posted by ddhoward View Post
PHP Code:
SetEntityFlags(iClient, !FL_ONGROUND); 
This does not do what you think it does.
Well I think it makes the player to be not attatched to the ground, which allows the shootup in the air. I tested that single function before, so I am reliable on what the results of that tests
mug1wara is offline
eyal282
Veteran Member
Join Date: Aug 2011
Old 06-30-2018 , 11:45   Re: [TF2] Shoot player into the air?
Reply With Quote #6

Quote:
Originally Posted by mug1wara View Post
Well I think it makes the player to be not attatched to the ground, which allows the shootup in the air. I tested that single function before, so I am reliable on what the results of that tests
This is a constant value, and an unexpectable one by me at least. Also will strip all other flags.

SetEntityFlags(iBoss, GetEntityFlags(iBoss) & ~FL_ONGROUND);

Or something like that.
__________________
I am available to make plugins for pay.

Discord: Eyal282#1334

Last edited by eyal282; 06-30-2018 at 11:46.
eyal282 is offline
AnubisTF2
Senior Member
Join Date: Oct 2015
Old 06-30-2018 , 11:59   Re: [TF2] Shoot player into the air?
Reply With Quote #7

sadly that didn't work
the player still doesn't get shot up until they jump, then they keep getting shot up forever.
__________________
naw
AnubisTF2 is offline
eyal282
Veteran Member
Join Date: Aug 2011
Old 06-30-2018 , 12:11   Re: [TF2] Shoot player into the air?
Reply With Quote #8

Quote:
Originally Posted by AnubisTF2 View Post
sadly that didn't work
the player still doesn't get shot up until they jump, then they keep getting shot up forever.
Send me the code.
__________________
I am available to make plugins for pay.

Discord: Eyal282#1334
eyal282 is offline
AnubisTF2
Senior Member
Join Date: Oct 2015
Old 06-30-2018 , 17:40   Re: [TF2] Shoot player into the air?
Reply With Quote #9

anyone else have any idea how I could do this? I didn't think it would be too hard
__________________
naw
AnubisTF2 is offline
ddhoward
Veteran Member
Join Date: May 2012
Location: California
Old 06-30-2018 , 20:16   Re: [TF2] Shoot player into the air?
Reply With Quote #10

Quote:
Originally Posted by mug1wara View Post
Well I think it makes the player to be not attatched to the ground, which allows the shootup in the air. I tested that single function before, so I am reliable on what the results of that tests
Not only does this line wipe out all other flags, it will probably result in a tag mismatch.

PHP Code:
SetEntityFlags(iClientfalse); 
That's basically what you're doing, which makes no sense.

PHP Code:
SetEntityFlags(iClientGetEntityFlags(iClient) & ~FL_ONGROUND); 
This is more what you're looking for, but I'm still not convinced that this is even necessary?
__________________

Last edited by ddhoward; 06-30-2018 at 20:19.
ddhoward 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 04:16.


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