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

[req] lj stats without /ljtop etc.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
r14170
Veteran Member
Join Date: Dec 2009
Old 05-07-2010 , 10:49   [req] lj stats without /ljtop etc.
Reply With Quote #1

i need lj stats which shows only the distance you jumped .. without ljtop , jump msgs , sounds etc. thx
r14170 is offline
t*stylez
BANNED
Join Date: Apr 2010
Old 05-08-2010 , 01:21   Re: [req] lj stats without /ljtop etc.
Reply With Quote #2

just set them as comments XD
t*stylez is offline
Andree
Member
Join Date: Apr 2010
Old 05-08-2010 , 01:46   Re: [req] lj stats without /ljtop etc.
Reply With Quote #3

Same sorpack server ?
Andree is offline
r14170
Veteran Member
Join Date: Dec 2009
Old 05-08-2010 , 01:48   Re: [req] lj stats without /ljtop etc.
Reply With Quote #4

Quote:
Originally Posted by Andree View Post
Same sorpack server ?
whats that XD
r14170 is offline
SpeeDeeR
Veteran Member
Join Date: Mar 2010
Location: Bulgaria
Old 05-08-2010 , 05:32   Re: [req] lj stats without /ljtop etc.
Reply With Quote #5

if there is no one how can help you, you can always copy some code from already made lj stats,credit him, and format the output msgs as you wish.I see you can code, so what is the problem.
SpeeDeeR is offline
r14170
Veteran Member
Join Date: Dec 2009
Old 05-08-2010 , 07:01   Re: [req] lj stats without /ljtop etc.
Reply With Quote #6

ljstats plugin is big for edit like this ..

btw i saw this plugin in many servers .. it doesnt count you strafes or something only counts how much u have jumped thats all
r14170 is offline
lazarev
Veteran Member
Join Date: Sep 2008
Old 05-08-2010 , 07:12   Re: [req] lj stats without /ljtop etc.
Reply With Quote #7

copy-paste from KZ-Mini plugin:
PHP Code:
#include <amxmodx>
#include <engine>
#include <fakemeta>

#define PLUGIN "New Plugin"
#define VERSION "1.0"
#define AUTHOR "Juice"

// LJStats
#define INFO_ONE 1
#define INFO_ZERO 0

new strafes[33]
new 
weaponspeed

new bool:gHasLjStats[33]
new 
bool:gInAir[33]

new 
bool:OnGround[33]
new 
bool:turning_right[33]
new 
bool:turning_left[33]
new 
bool:strafing_aw[33]
new 
bool:strafing_sd[33]

new 
Float:old_angle1[33]
new 
Float:angle[3]
new 
Float:vFramePos[33][2][3]
new 
Float:vFrameSpeed[33][2][3]
new 
Float:vJumpedAt[33][3]
new 
Float:fDistance
new Float:fDistance1
new Float:fDistance2
new Float:rDistance[2]
new 
Float:rLandPos[3]
new 
Float:vOrigin[3]
new 
Float:vOldOrigin[33][3]
new 
Float:vVelocity[3]
new 
Float:frame2time
new Float:jumptime[33]
new 
Float:lasttime[33]

public 
plugin_init() 
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
register_forward(FM_Touch"fwdTouch"1)
    
register_forward(FM_PlayerPreThink"fwdPlayerPreThink"0)
    
register_forward(FM_PlayerPostThink"fwdPlayerPostThink"0)
    
    
register_clcmd"say /ljstats""cmdLjStats")
    
}

public 
client_putinserver(id
{
    
// LJStats
    
gHasLjStats[id] = true
    turning_right
[id] = false
    turning_left
[id] = false
    strafing_aw
[id] = false
    strafing_sd
[id] = false
    OnGround
[id] = false
}

public 
client_disconnect(id
{

    
// LJStats
    
gHasLjStats[id] = false
    turning_right
[id] = false
    turning_left
[id] = false
    strafing_aw
[id] = false
    strafing_sd
[id] = false
    OnGround
[id] = false
}


// LJStats Begin //
public gocheck(id) {
    
gInAir[id] = false
}

public 
cmdLjStats(id) {
    
gHasLjStats[id] = !gHasLjStats[id]
    
set_hudmessage(4589116, -1.00.800.02.00.00.04)
    
show_hudmessage(id"LJStats is O%s!"gHasLjStats[id] ? "N" "FF")
    return 
PLUGIN_HANDLED
}

public 
fwdPlayerPreThink(id) {
    if( 
is_user_alive(id) ) {
        static 
flagsbuttonsoldbuttons
        flags 
pev(idpev_flags)
        
buttons pev(idpev_button)
        
oldbuttons pev(idpev_oldbuttons)
        static 
Float:fGravity
        pev
(idpev_gravityfGravity)
        
pev(idpev_anglesangle)
        
old_angle1[id] = angle[1]
        if( 
gInAir[id] == true && !(flags&FL_ONGROUND) ) {
            static 
i
            
for( INFO_ZERO2i++ ) {
                if( (
vFramePos[id][i][0] == 0
                
&& vFramePos[id][i][1] == 0
                
&& vFramePos[id][i][2] == 0
                
&& vFrameSpeed[id][i][0] == 0
                
&& vFrameSpeed[id][i][1] == 0
                
&& vFrameSpeed[id][i][2] == 0)
                || (
== 1) ) {
                    
pev(idpev_originvOrigin)
                    
vFramePos[id][i][0] = vOrigin[0]
                    
vFramePos[id][i][1] = vOrigin[1]
                    
vFramePos[id][i][2] = vOrigin[2]
                    
pev(idpev_velocityvVelocity)
                    
vFrameSpeed[id][i][0] = vVelocity[0]
                    
vFrameSpeed[id][i][1] = vVelocity[1]
                    
vFrameSpeed[id][i][2] = vVelocity[2]
                    
i=2
                
}
            }
        }
        
pev(idpev_velocityvVelocity)
        if( 
flags&FL_ONGROUND && flags&FL_INWATER )
            
vVelocity[2] = 0.0
        pev
(idpev_originvOrigin)
        
fDistance get_distance_f(vOldOrigin[id], vOrigin)
        
pev(idpev_originvOldOrigin[id])
        
pev(idpev_velocityvVelocity)
        if( 
vVelocity[2] != )
            
vVelocity[2]-=vVelocity[2]
        
// WeaponSpeed Protection
        // pev(id, pev_maxspeed) != 250.0
        
if( pev(idpev_movetype) != MOVETYPE_WALK
        
|| fGravity != 1.0
        
|| pev(idpev_waterlevel) >= 2
        
|| fDistance 20 ) {
            
gocheck(id)
            return 
FMRES_IGNORED
        
}
        if( !(
flags&FL_ONGROUND) )
            
lasttime[id] = get_gametime()
        if( 
buttons&IN_JUMP
        
&& !(oldbuttons&IN_JUMP)
        && 
flags&FL_ONGROUND
        
&& gInAir[id] == false ) {
            
set_task(0.8,"gocheck"id)
            
weaponspeed pev(idpev_maxspeed)
            
jumptime[id] = get_gametime()
            
gInAir[id] = true
            pev
(idpev_originvOrigin)
            
vJumpedAt[id][0] = vOrigin[0]
            
vJumpedAt[id][1] = vOrigin[1]
            
vJumpedAt[id][2] = vOrigin[2]
            
strafes[id] = INFO_ZERO
            turning_right
[id] = false
            turning_left
[id] = false
            strafing_aw
[id] = false
            strafing_sd
[id] = false
            
static i
            
for( INFO_ZERO2i++ ) {
                
vFramePos[id][i][0] = 0.0
                vFramePos
[id][i][1] = 0.0
                vFramePos
[id][i][2] = 0.0
                vFrameSpeed
[id][i][0] = 0.0
                vFrameSpeed
[id][i][1] = 0.0
                vFrameSpeed
[id][i][2] = 0.0
            
}
        }
        else if( 
flags&FL_ONGROUND
        
&& gInAir[id] == true ) {
            
set_task(0.5,"gocheck"id)
            
gInAir[id] = false
            pev
(idpev_originvOrigin)
            
fDistance1 get_distance_f(vJumpedAt[id], vOrigin)+32.0625
            
if( !(vFramePos[id][0][2] > vOrigin[2]) )
                return 
FMRES_IGNORED
            rLandPos
[2] = vFrameSpeed[id][0][2] * vFrameSpeed[id][0][2] + (1600 * (vFramePos[id][0][2] - vOrigin[2]))
            
rDistance[0] = (floatsqroot(rLandPos[2]) * -1) - vFrameSpeed[id][1][2]
            
rDistance[1] = 800.000000*-1
            frame2time 
floatdiv(rDistance[0], rDistance[1])
            if( 
vFrameSpeed[id][1][0] < )
                
vFrameSpeed[id][1][0] = vFrameSpeed[id][1][0]*-1
            rDistance
[0] = frame2time*vFrameSpeed[id][1][0]
            if( 
vFrameSpeed[id][1][1] < )
                
vFrameSpeed[id][1][1] = vFrameSpeed[id][1][1]*-1
            rDistance
[1] = frame2time*vFrameSpeed[id][1][1]
            if( 
vFramePos[id][1][0] < vOrigin[0] )
                
rLandPos[0] = vFramePos[id][1][0] + rDistance[0]
            else
                
rLandPos[0] = vFramePos[id][1][0] - rDistance[0]
            if( 
vFramePos[id][1][1] < vOrigin[1] )
                
rLandPos[1] = vFramePos[id][1][1] + rDistance[1]
            else
                
rLandPos[1] = vFramePos[id][1][1] - rDistance[1]
            if( 
is_in_duck(id) )
                
vOrigin[2]+=18.0
            rLandPos
[2] = vOrigin[2]
            
frame2time += (lasttime[id]-jumptime[id])
            if( 
vOrigin[2] == vJumpedAt[id][2] ) {
                if( 
is_in_duck(id) && !(frame2time 0.71 && frame2time 0.77) )
                    
vOrigin[2] = vOrigin[2]*-1
                
else if( !(is_in_duck(id)) && !(frame2time 0.65 && frame2time 0.70) )
                    
vOrigin[2] = vOrigin[2]*-1
            
}
            
fDistance2 get_distance_f(vJumpedAt[id], rLandPos)+32.0625
            
if( fDistance1 fDistance2 ) {
                
fDistance fDistance2
                vOrigin
[0] = rLandPos[0]
                
vOrigin[1] = rLandPos[1]
            }
            else
                
fDistance fDistance1
            
if( vJumpedAt[id][2] == vOrigin[2]
            && 
fDistance 200
            
&& !(fDistance 280) ) {
                static 
iname[33], strdist[128]
                
get_user_name(idname31)
                
num_to_word(floatround(fDistancefloatround_floor), strdist127)
                for( 
INFO_ONE33i++ ) {
                    if( 
== id && gHasLjStats[i] ) {
                        
// Red, Green, Blue, X, Y, Effects, Fxtime, HoldTime, Fadeintime, Fadeouttime, Channel
                        
set_hudmessage(2552552550.050.500.02.00.10.12)
                        if(
weaponspeed != 250.0) {
                            
show_hudmessage(id"Distance: %.1f units^nStrafes: %i^nWeaponspeed: %d units/sec "fDistancestrafes[id], weaponspeed )
                            
client_print(idprint_console"[LJS] %s jumped %.3f units with %i strafes & %i units/sec weaponspeed."namefDistancestrafes[id], weaponspeed )
                        }
                        else if(
210 fDistance 280
                        {
                            
show_hudmessage(id"Distance: %.3f units^nStrafes: %i "fDistancestrafes[id] )
                            if(
fDistance 240)
                            {
                                
client_print(0print_chat"[LJS] %s jumped %.3f units with %i strafes."namefDistancestrafes[id] )
                            }
                        }
                    }
                }
            }
            
gInAir[id] = false
        
}
        else if( 
flags&FL_ONGROUND
        
&& gInAir[id] == false ) {
            
pev(idpev_velocityvVelocity)
            
vVelocity[2]-=vVelocity[2]
            
// Max PreStrafe
            
if( vector_length(vVelocity) >= 312 )
                
set_task(0.5,"gocheck"id)
            
gInAir[id] = false
        
}
        if( 
flags&FL_ONGROUND ) {
            static 
ClassName[32]
            
pev(pev(idpev_groundentity), pev_classnameClassName32)
            if( 
equal(ClassName"func_train") || equal(ClassName"func_door") || equal(ClassName"func_door_rotating") || equal(ClassName"func_conveyor") ) {
                
gocheck(id)
                
set_task(0.4,"gocheck"id)
            }
            if( 
OnGround[id] == false ) {
                
pev(idpev_originvOrigin)
                if( 
buttons&IN_JUMP
                
&& !(oldbuttons&IN_JUMP) )
                    
set_task(0.4,"gocheck"id)
                
OnGround[id] = true
            
}
        }
        if( !(
flags&FL_ONGROUND) )
            
OnGround[id] = false
    
}
    return 
FMRES_IGNORED
}

public 
fwdPlayerPostThink(id) {
    if( 
is_user_alive(id) ) {
        static 
buttonsflags
        buttons 
pev(idpev_button)
        
flags pev(idpev_flags)
        if( 
flags&FL_ONGROUND
        
&& (gInAir[id] == true
        
|| OnGround[id] == false) )
            
fwdPlayerPreThink(id)
        
pev(idpev_anglesangle)
        if( 
old_angle1[id] > angle[1] ) {
            
turning_left[id] = false
            turning_right
[id] = true
        
}
        else if( 
old_angle1[id] < angle[1] ) {
            
turning_left[id] = true
            turning_right
[id] = false
        
}
        else {
            
turning_left[id] = false
            turning_right
[id] = false
        
}
        if( 
strafing_aw[id] == false
        
&& (buttons&IN_MOVELEFT
        
|| buttons&IN_FORWARD)
        && (
turning_left[id] == true
        
|| turning_right[id] == true )
        && !(
buttons&IN_MOVERIGHT
        
|| buttons&IN_BACK) ) {
            
strafing_aw[id] = true
            strafing_sd
[id] = false
            strafes
[id] += INFO_ONE
        
}
        else if( 
strafing_sd[id] == false
        
&& (buttons&IN_MOVERIGHT
        
|| buttons&IN_BACK)
        && (
turning_left[id] == true
        
|| turning_right[id] == true )
        && !(
buttons&IN_MOVELEFT
        
|| buttons&IN_FORWARD) ) {
            
strafing_aw[id] = false
            strafing_sd
[id] = true
            strafes
[id] += INFO_ONE
        
}
        
pev(idpev_velocityvVelocity)
        
vVelocity[2] = 0.0
    
}
}

public 
fwdTouch(entid) { 
    static 
ClassName[32]
    if( 
pev_valid(ent) ) {
        
pev(entpev_classnameClassName31)
    }
    static 
ClassName2[32]
    if( 
pev_valid(id) ) {
        
pev(idpev_classnameClassName231)
    }
    if( 
equal(ClassName2"player") ) {
        if( 
pev(idpev_groundentity) == ent && (gInAir[id] || !OnGround[id]) ) {
            if( 
pev(idpev_flags)&FL_ONGROUND ) {
                if( 
get_gametime() > (jumptime[id]+0.1) )
                    
fwdPlayerPreThink(id)
            }
        }
        if( 
equal(ClassName"func_train") || equal(ClassName"func_door") || equal(ClassName"func_door_rotating") || equal(ClassName"func_conveyor") ) {
            
gocheck(id)
            
set_task(0.4,"gocheck"id)
        }
    }
}

stock is_in_duck(player) {
    
// supplied with invalid entities
    
if( !pev_valid(player)  )
        return 
0
    
// retrieve absolutes
    
static Float:absmin[3], Float:absmax[3]
    
pev(playerpev_absminabsmin)
    
pev(playerpev_absmaxabsmax)
    
absmin[2]+=64.0
    
if( absmin[2] < absmax[2] )
        return 
0
    
return 1
}
// LJStats End // 

Last edited by lazarev; 05-08-2010 at 07:21.
lazarev is offline
r14170
Veteran Member
Join Date: Dec 2009
Old 05-08-2010 , 07:22   Re: [req] lj stats without /ljtop etc.
Reply With Quote #8

WORKS
r14170 is offline
t*stylez
BANNED
Join Date: Apr 2010
Old 05-08-2010 , 11:35   Re: [req] lj stats without /ljtop etc.
Reply With Quote #9

OF COURSE IT WORKS, it's juice who made it.
t*stylez is offline
lazarev
Veteran Member
Join Date: Sep 2008
Old 05-08-2010 , 11:56   Re: [req] lj stats without /ljtop etc.
Reply With Quote #10

I didn't make it
lazarev 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 16:10.


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