AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugin/Gameplay Ideas and Requests (https://forums.alliedmods.net/forumdisplay.php?f=60)
-   -   [L4D] Hunter Pounce-Leap while in ghost (https://forums.alliedmods.net/showthread.php?t=99317)

Dragonshadow 08-03-2009 19:29

[L4D] Hunter Pounce-Leap while in ghost
 
I'd like a plugin that will let me pounce-leap in ghosting mode with crouch-rightclick.
I don't think it needs more explaining that that ;)

savagekid 08-04-2009 09:36

Re: [L4D] Hunter Pounce-Leap while in ghost
 
This seems to be a great idea, now you can get to places where you can't normally get to without spawning. I smell a Visceral video in ghost mode :)

GM-Scorp 08-04-2009 12:59

Re: [L4D] Hunter Pounce-Leap while in ghost
 
Mmmm that sound Good to me
i alway have to spawn to get to places you would normaly never get
without spawning

spus you have the risk of getting killed before you get to the place if you spawn

This just sounds to good to have
Hope someone can do it

AtomicStryker 08-04-2009 17:18

Re: [L4D] Hunter Pounce-Leap while in ghost
 
I had something similar done already. This works on any Infected ghost, yet i dont see that as disadvantage ^^

EDIT
This is the SM 1.3 Version by the way. Ill put the SM 1.2 Version one post below


For better control, this works so: It amplifies whatever speed you have when pressing ATTACK2 and also jolts you upwards. So you can do minor jumps or huge pounces depending on your running speed.


PHP Code:

#include <sourcemod>
#include <sdktools>

#define PLUGIN_VERSION "1.0"

new propinfoghost;
new 
bool:jumpdelay[MAXPLAYERS+1];

public 
Plugin:myinfo 
{
    
name "L4D_Ghostpounce",
    
author " AtomicStryker",
    
description "Left 4 Dead Ghost Pounce",
    
version PLUGIN_VERSION,
    
url ""
}

public 
OnPluginStart()
{
    
propinfoghost FindSendPropInfo("CTerrorPlayer""m_isGhost");
    
CreateConVar("l4d_ghostpounce_version"PLUGIN_VERSION" Ghost Pounce Plugin Version "FCVAR_PLUGIN|FCVAR_SPONLY|FCVAR_NOTIFY|FCVAR_DONTRECORD);
}

public 
Action:OnPlayerRunCmd(client, &buttons, &impulseFloat:vel[3], Float:angles[3], &weapon)
{
    if (
buttons IN_ATTACK2 && jumpdelay[client] == false)
    {
    if (!
IsClientConnected(client)) return Plugin_Continue;
    if (!
IsClientInGame(client)) return Plugin_Continue;
    if (
GetClientTeam(client)!=3) return Plugin_Continue;
    if (!
IsPlayerSpawnGhost(client)) return Plugin_Continue;
        
     
jumpdelay[client] = true;
    
CreateTimer(1.0ResetJumpDelayclient);
    
DoPounce(client);
    }
    return 
Plugin_Continue;
}

public 
Action:DoPounce(any:client)
{
    new 
Float:vec[3];
    
GetEntPropVector(clientProp_Data"m_vecVelocity"vec);
    
    if (
vec[2] != 0)
    {
    
PrintCenterText(client"You must be on even ground to ghost pounce");
    return 
Plugin_Handled;
    }
    if (
vec[0] == 0)
    {
    
PrintCenterText(client"You must be on the move to ghost pounce");
    return 
Plugin_Handled;
    }
    if (
vec[1] == 0)
    {
    
PrintCenterText(client"You must be on the move to ghost pounce");
    return 
Plugin_Handled;
    }
    
    
vec[0] *= 3;
    
vec[1] *= 3;
    
vec[2] = 750.0;
    
    
TeleportEntity(clientNULL_VECTORNULL_VECTORvec);
    return 
Plugin_Continue;
}


bool:IsPlayerSpawnGhost(client)
{
    new 
isghost GetEntData(clientpropinfoghost1);
    
    if (
isghost == 1) return true;
    else return 
false;
}

public 
Action:ResetJumpDelay(Handle:timerHandle:client)
{
    
jumpdelay[client] = false;



AtomicStryker 08-04-2009 17:21

Re: [L4D] Hunter Pounce-Leap while in ghost
 
SM 1.2 Version

PHP Code:

#include <sourcemod>
#include <sdktools>

#define PLUGIN_VERSION "1.0"

new propinfoghost;
new 
bool:jumpdelay[MAXPLAYERS+1];

public 
Plugin:myinfo 
{
    
name "L4D_Ghostpounce",
    
author " AtomicStryker",
    
description "Left 4 Dead Ghost Pounce",
    
version PLUGIN_VERSION,
    
url ""
}

public 
OnPluginStart()
{
    
propinfoghost FindSendPropInfo("CTerrorPlayer""m_isGhost");
    
CreateConVar("l4d_ghostpounce_version"PLUGIN_VERSION" Ghost Pounce Plugin Version "FCVAR_PLUGIN|FCVAR_SPONLY|FCVAR_NOTIFY|FCVAR_DONTRECORD);
}

public 
OnGameFrame()
{
    for (new 
i=1i<=MaxClientsi++)
    {
        if (
IsClientInGame(i))
        {
            if (
IsClientConnected(i))
            {
                new 
buttons GetEntProp(iProp_Data"m_nButtons"buttons);
                if(
buttons IN_ATTACK2 && jumpdelay[i] == false)
                {
                
PlayerPressesAttack2(i);
                }
            }
        }
    }
}

public 
Action:PlayerPressesAttack2(client)
{
    if (!
IsClientConnected(client)) return Plugin_Continue;
    if (!
IsClientInGame(client)) return Plugin_Continue;
    if (
GetClientTeam(client)!=3) return Plugin_Continue;
    if (!
IsPlayerSpawnGhost(client)) return Plugin_Continue;

    
jumpdelay[client] = true;
    
CreateTimer(1.0ResetJumpDelayclient);
    
DoPounce(client);

    return 
Plugin_Continue;
}

public 
Action:DoPounce(any:client)
{
    new 
Float:vec[3];
    
GetEntPropVector(clientProp_Data"m_vecVelocity"vec);
    
    if (
vec[2] != 0)
    {
    
PrintCenterText(client"You must be on even ground to ghost pounce");
    return 
Plugin_Handled;
    }
    if (
vec[0] == 0)
    {
    
PrintCenterText(client"You must be on the move to ghost pounce");
    return 
Plugin_Handled;
    }
    if (
vec[1] == 0)
    {
    
PrintCenterText(client"You must be on the move to ghost pounce");
    return 
Plugin_Handled;
    }
    
    
vec[0] *= 3;
    
vec[1] *= 3;
    
vec[2] = 750.0;
    
    
TeleportEntity(clientNULL_VECTORNULL_VECTORvec);
    return 
Plugin_Continue;
}


bool:IsPlayerSpawnGhost(client)
{
    new 
isghost GetEntData(clientpropinfoghost1);
    
    if (
isghost == 1) return true;
    else return 
false;
}

public 
Action:ResetJumpDelay(Handle:timerHandle:client)
{
    
jumpdelay[client] = false;



Dragonshadow 08-04-2009 21:00

Re: [L4D] Hunter Pounce-Leap while in ghost
 
Haven't tested yet, but can you wall-jump with that?

GM-Scorp 08-05-2009 08:33

Re: [L4D] Hunter Pounce-Leap while in ghost
 
Sorry for this question but i'm not a coder

What do i have to do with that code to make it work ?

Dragonshadow 08-05-2009 14:56

Re: [L4D] Hunter Pounce-Leap while in ghost
 
1 Attachment(s)
Quote:

Originally Posted by GM-Scorp (Post 890752)
Sorry for this question but i'm not a coder

What do i have to do with that code to make it work ?

Here ya go

triggerman 08-06-2009 12:27

Re: [L4D] Hunter Pounce-Leap while in ghost
 
can players spawn when moving at this velocity? be neat for some cannonball boomers!

oh and Dragonshadow, is that the 1.3 or 1.2 version you've compiled there?

Dragonshadow 08-06-2009 16:10

Re: [L4D] Hunter Pounce-Leap while in ghost
 
oh, should be 1.2, forgot about the 1.3 version


All times are GMT -4. The time now is 03:19.

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