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

PM Got a velocity too low on 2


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Rainq
Member
Join Date: Sep 2015
Old 09-26-2019 , 03:58   PM Got a velocity too low on 2
Reply With Quote #1

This is another problem, I searched the net but could not find a good solution.

https://i.imgur.com/eMih1JD.png

to see the active plugins : https://forums.alliedmods.net/showthread.php?t=318866


if so I added this code to this link: https://forums.alliedmods.net/showth...=190098&page=2

Code:
#include < amxmodx >
#include < fakemeta >
#include < orpheu >
#include < orpheu_stocks >

#define PLUGIN "PM_CheckVelocity debugger"
#define VERSION "0.1"
#define AUTHOR "meTaLiCroSS"

new OrpheuStruct:g_pPMove

public plugin_init( )
{
    register_plugin( PLUGIN, VERSION, AUTHOR )
    
    OrpheuRegisterHook( OrpheuGetDLLFunction( "pfnPM_Move", "PM_Move" ), "PM_Move" );
    OrpheuRegisterHook( OrpheuGetFunction( "PM_CheckVelocity" ), "PM_CheckVelocity" );
}

public PM_Move( OrpheuStruct:ppmove, server )
{
    g_pPMove = ppmove;
}

public PM_CheckVelocity( )
{
    static i, iPlayer, szConsolePrint[64], Float:flMaxVelocity, Float:vecVelocity[3]
    iPlayer = OrpheuGetStructMember( g_pPMove, "player_index" ) + 1;
    flMaxVelocity = Float:OrpheuGetStructMember( OrpheuStruct:OrpheuGetStructMember( g_pPMove, "movevars" ), "maxvelocity" );
    OrpheuGetStructMember( g_pPMove, "velocity", vecVelocity );
    
    for(i = 0; i < 3; i++)
    {
        if(vecVelocity[i] > flMaxVelocity)
        {
            formatex( szConsolePrint, charsmax(szConsolePrint), "PM %d Got a velocity too high on %d^n", iPlayer, i );
            engfunc( EngFunc_AlertMessage, at_aiconsole, szConsolePrint )
            
            vecVelocity[i] = flMaxVelocity // skip original engine message
            OrpheuSetStructMember( g_pPMove, "velocity", vecVelocity )
            
        }
        else if(vecVelocity[i] < -flMaxVelocity)
        {
            formatex( szConsolePrint, charsmax(szConsolePrint), "PM %d Got a velocity too low on %d^n", iPlayer, i );
            engfunc( EngFunc_AlertMessage, at_aiconsole, szConsolePrint )
            
            vecVelocity[i] = -flMaxVelocity // skip original engine message
            OrpheuSetStructMember( g_pPMove, "velocity", vecVelocity )
        }
    }
    /*
    if (pmove->velocity[i] > pmove->movevars->maxvelocity) 
    {
        pmove->Con_DPrintf ("PM  Got a velocity too high on %i\n", i);
        pmove->velocity[i] = pmove->movevars->maxvelocity;
    }
    else if (pmove->velocity[i] < -pmove->movevars->maxvelocity)
    {
        pmove->Con_DPrintf ("PM  Got a velocity too low on %i\n", i);
        pmove->velocity[i] = -pmove->movevars->maxvelocity;
    }*/
}
__________________

Leul şi tigru sunt mai puternici ca lupul,dar lupul la circ nu participă.

Last edited by Rainq; 09-26-2019 at 04:00.
Rainq 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 07:23.


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