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

Problem with doublejump


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
BrUn3S
Member
Join Date: Jan 2012
Location: Slovakia
Old 01-01-2016 , 17:45   Problem with doublejump
Reply With Quote #1

Hi guys,
I have big problem with doublejump. When I edit my plugin and when I give to the server with Sourcemod 1.7.3 it doesn't work. And when I give a same plugin to server with Sourcemod 1.7.2 it work.

Where can be problem?

PHP Code:
public Action:OnPlayerRunCmd(client, &buttons, &impulseFloat:vel[3], Float:angles[3], &weapon)
{
    
// VIP?
    
if(Jump[client] == true)
    {
        new 
flags GetUserFlagBits(client); 
        if (
flags ADMFLAG_CUSTOM1 || !IsPlayerAlive(client))
        {
            
// Last button
            
static bool:bPressed[MAXPLAYERS+1] = false;
            
                
// Reset when on Ground
            
if (GetEntityFlags(client) & FL_ONGROUND)
            {
                
g_iFroggyJumped[client] = 0;
                
bPressed[client] = false;
            }
            else
            {
                
// Player pressed jump button?
                
if (buttons IN_JUMP)
                {
                        
// For second time?
                    
if (!bPressed[client] && g_iFroggyJumped[client]++ == 1)
                    {
                        new 
Float:velocity[3];
                        new 
Float:velocity0;
                        new 
Float:velocity1;
                        new 
Float:velocity2;
                        new 
Float:velocity2_new;
                            
// Get player velocity
                        
velocity0 GetEntPropFloat(clientProp_Send"m_vecVelocity[0]");
                        
velocity1 GetEntPropFloat(clientProp_Send"m_vecVelocity[1]");
                        
velocity2 GetEntPropFloat(clientProp_Send"m_vecVelocity[2]");
                        
velocity2_new float(GetConVarInt(g_hStrong));

                            
// calculate new velocity^^
                        
if (velocity2 150.0)
                        {
                            
velocity2_new velocity2_new 20.0;
                        }
                        if (
velocity2 100.0
                        {
                            
velocity2_new velocity2_new 30.0;
                        }
                        if (
velocity2 50.0
                        {
                            
velocity2_new velocity2_new 40.0;
                        }
                        if (
velocity2 0.0
                        {
                            
velocity2_new velocity2_new 50.0;
                        }
                        if (
velocity2 < -50.0
                        {
                            
velocity2_new velocity2_new 60.0;
                        }
                        if (
velocity2 < -100.0
                        {
                            
velocity2_new velocity2_new 70.0;
                        }
                        if (
velocity2 < -150.0
                        {
                            
velocity2_new velocity2_new 80.0;
                        }
                        if (
velocity2 < -200.0
                        {
                            
velocity2_new velocity2_new 90.0;
                        }


                        
// Set new velocity
                        
velocity[0] = velocity0 0.1;
                        
velocity[1] = velocity1 0.1;
                        
velocity[2] = velocity2_new;
                        
                        
// Double Jump
                        
SetEntPropVector(clientProp_Send"m_vecBaseVelocity"velocity);
                    }

                    
bPressed[client] = true;
                }
                else
                {
                    
bPressed[client] = false;
                }
            }
        }
    }
    return 
Plugin_Continue;

compiler doesn't give me any error only warning tag mismatch..
Thanks and sorry for my Slovak-English.
BrUn3S is offline
BrUn3S
Member
Join Date: Jan 2012
Location: Slovakia
Old 01-02-2016 , 14:30   Re: Problem with doublejump
Reply With Quote #2

any help?
BrUn3S 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 18:07.


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