Raised This Month: $ Target: $400
 0% 

spectating climber ct_bar - kz_dajrokan


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
SlayeR
Member
Join Date: Jan 2009
Location: Poland
Old 06-09-2010 , 13:11   spectating climber ct_bar - kz_dajrokan
Reply With Quote #1

Hi.
I want to see the ct_bar from person who I actually spectating. Is this possible?

http://img191.**************/img191/830/ctbar.png - ct_bar

PHP Code:
public ct_bar() {

    new 
players[32], inumiidtl get_timeleft(), t[16]
    
get_players(playersinum)
    
get_time("Godzina: %H:%M"t15)
    for (
0inumi++) {
        
id players[i]
        if (
kz_cheat) {
              
client_cmd(id"fps_max 101")
            
client_cmd(id"fps_modem 101"
             
client_cmd(id"sv_cheats 0")
              
client_cmd(id"sv_gravity 800")
              
client_cmd(id"sv_airaccelerate 10")
              
client_cmd(id"sv_maxspeed 320")
              
client_cmd(id"sv_stepsize 18")
              
client_cmd(id"sv_maxvelocity 2000")
              
client_cmd(id"cl_forwardspeed 400")
              
client_cmd(id"cl_sidespeed 400")
              
client_cmd(id"cl_backspeed 400")
              
client_cmd(id"edgefriction 2")
              
client_cmd(id"mp_footsteps 1")
              
client_cmd(id"developer 0")
              
client_cmd(id"_cl_autowepswitch 1")
            }
        if (
climber_hud[id] && is_user_alive(id) && locs_set && kz_ct) {
            new  
Float:speed[3]
            switch (
climber_status[id]) {
                case 
STATUS_NONE: {
                    
set_hudmessage(25500, -1.00.000.0BAR_TIME 0.10.00.01)
                    switch (
climber_hud[id]) {
                        case 
1:    {show_hudmessage(id"ClimbTimer: Wylaczony")    
                        }
                        case 
2: {
                        
show_hudmessage(id"%s | TimeLeft: %02d:%02d"ttl 60tl 60)
                }
                        case 
3: {
                            
entity_get_vector(idEV_VEC_velocityspeed)
                            
show_hudmessage(id"Predkosc: %.2f px/s"vector_length(speed))
                        }
                    }
                }
                case 
STATUS_CLIMBING: {
                    
set_hudmessage(255255255, -1.00.000.0BAR_TIME 0.10.00.01)
                    switch (
climber_hud[id]) {
                        case 
1: {
                            new 
climbtimeHP[8] = ""
                            
climbtime = (get_user_time(id) - climber_time[id] + climber_checkpoints[id]*kz_cp_secs)
                            if (
get_user_godmode(id))
                                
HP " | GOD"
                            
else if (((kz_healing == 1) && !climber_no_block[id]) || !kz_healing)
                                
HP " | !HP"    
                            
show_hudmessage(id"ClimbTimer: %02d:%02d | Checkpoint: %d%s%s"climbtime 60 climbtime 60climber_checkpoints[id], climber_scout[id] > " | Scout" ""HP)
                    }
                        case 
2: {
                        
show_hudmessage(id"%s | TimeLeft: %02d:%02d"ttl 60tl 60)
                }
                        case 
3: {
                            new 
shift[32] = "brak wpisu do TOP15"0climbtime
                            climbtime 
= (get_user_time(id) - climber_time[id] + climber_checkpoints[id]*kz_cp_secs)
                            if (
climber_checkpoints[id] <= kz_cp_max) {
                                while (
compare(climber_checkpoints[id], climber_scout[id] > 0climbtimetop15_tp[j], top15_scout[j], top15_times[j])) {
                                    
j++
                                    if (
14) break
                                }
                                if (
15) {
                                    if (
compare(top15_tp[j], top15_scout[j], 0climber_checkpoints[id], climber_scout[id] > 00))
                                        
format(shift15"%d."j+1)
                                    else 
                                        
format(shift15"%d. (%d sek)"j+1climbtime top15_times[j])
                                }
                            }
                            
show_hudmessage(id"Miejsce: %s"shift)
                        }
                        case 
4: {
                            
entity_get_vector(idEV_VEC_velocityspeed)
                            
show_hudmessage(id"Predkosc: %.2f px/s"vector_length(speed))
                        }
                    }
                }
                case 
STATUS_FINISHED: {
                    
set_hudmessage(02550, -1.00.000.0BAR_TIME 0.10.00.01)
                    switch (
climber_hud[id]) {
                        case 
1:    {
                        
show_hudmessage(id"ClimbTimer: %02d:%02d | Checkpoint: %d%s", (climber_time[id]/60) , (climber_time[id]%60), climber_checkpoints[id], climber_scout[id] > " | Scout" "")
                }
                
            
                        case 
2: {    
                                
show_hudmessage(id"%s | TimeLeft: %02d:%02d"ttl 60tl 60)
                    }
                        case 
3: {
                            
entity_get_vector(idEV_VEC_velocityspeed)
                            
show_hudmessage(id"Predkosc: %.2f px/s"vector_length(speed))
                        }
                    }
                }
            }
        }
    }

    return 
PLUGIN_HANDLED

SlayeR is offline
Kreation
Veteran Member
Join Date: Jan 2010
Location: Illinois
Old 06-09-2010 , 19:08   Re: spectating climber ct_bar - kz_dajrokan
Reply With Quote #2

What is it exactly that you want?
__________________
Hi.
Kreation is offline
Alucard^
AMXX Moderator: Others
Join Date: Sep 2007
Location: Street
Old 06-10-2010 , 07:03   Re: spectating climber ct_bar - kz_dajrokan
Reply With Quote #3

You need to use pev_iuser() [fakemeta] or EV_INT_iuser key [engine].

Just search examples with this, or see plugins that do something similar, that for example specinfo or speclist.
__________________
Approved Plugins - Steam Profile

Public non-terminated projects:
All Admins Menu, HLTV parameters, Subnick,
Second Password (cool style), InfoZone,
Binary C4 plant/defuse, and more...

Private projects:
NoSpec (+menu), NV Surf Management,
PM Adanved System, KZ longjump2, and more...
Alucard^ is offline
Send a message via Skype™ to Alucard^
SlayeR
Member
Join Date: Jan 2009
Location: Poland
Old 06-13-2010 , 08:49   Re: spectating climber ct_bar - kz_dajrokan
Reply With Quote #4

Hmm I ain't good with scripting :s

Maybe someone Can rewrite this function from kz-arg to kz_dajrokan

Here's something like I need.

PHP Code:
public playersecondtask(id)
{
    
id -= TASK_ID_MINISECOND
    
    
if( get_pcvar_num(cvar_enable) != )
        return 
PLUGIN_CONTINUE
        
    
    
if( g_showtimein[id] > && g_playerstart[id] && is_user_alive(id) )
    {
        new 
Float:tiempo kz_realplayer_time(id)
        new 
iMinFloat:iSec
        iMin 
floatround(tiempofloatround_floor)/60
        
iSec tiempo - (60*iMin);
        
        if( 
g_showtimein[id] == )
        {
            
kz_hud_over(id"Timer: %02d:%s%.5f | CheckPoint: %i | GoCheck: %i"iMiniSec 10 "0"""iSecg_playercheckpoint[id], g_playergocheck[id])
        }
        else if( 
g_showtimein[id] == )
        {
            
kz_reymon_statustext(id0"Timer: %02d:%s%.5f | CheckPoint: %i | GoCheck: %i"iMiniSec 10 "0"""iSecg_playercheckpoint[id], g_playergocheck[id])
        }
    }
    
    if( !
is_user_alive(id) )
    {
        new 
mode pev(idpev_iuser1)
        if( 
mode == || mode == 
        {
            new 
target pev(idpev_iuser2)
            
g_idspecting[1][id] = target
            g_idspecting
[0][id] = true
            
            
if( get_pcvar_num(kz_specinfo) == && g_showkeyspec[id] )
            {
                new 
target pev(idpev_iuser2)

                new 
button pev(targetpev_button)
                new 
tiempo =  stock_get_user_roundtime(target)
    
                
// Credit of this --> cheap_suit
                
static key[6][6]
                
formatex(key[0], 5"%s", (button IN_FORWARD) && !(button IN_BACK) ? " W " "   ")
                
formatex(key[1], 5"%s", (button IN_BACK) && !(button IN_FORWARD) ? " S " "   ")
                
formatex(key[2], 5"%s", (button IN_MOVELEFT) && !(button IN_MOVERIGHT) ? "A   " "      ")
                
formatex(key[3], 5"%s", (button IN_MOVERIGHT) && !(button IN_MOVELEFT) ? "   D" "      ")
                
formatex(key[4], 5"%s", (button IN_DUCK) ? " DUCK " "      ")
                
formatex(key[5], 5"%s", (button IN_JUMP) ? " JUMP " "      ")
    
                
kz_hud_center(id"%s^n%s    %s^n%s^n%s^n%s^n^n^nTime: %02d:%02d  GoChecks: %d"key[0], key[2], key[3], key[1], key[5], key[4], (tiempo/60), (tiempo%60), g_playergocheck[target])
            }
        }
        else
        {
            
g_idspecting[0][id] = false
        
}
    }
    else if( 
is_user_alive(id) && get_pcvar_num(kz_specinfo) == && g_showkey[id] )
    {
        new 
button pev(idpev_button)
    
        
// Credit of this --> cheap_suit
        
static key[6][6]
        
formatex(key[0], 5"%s", (button IN_FORWARD) && !(button IN_BACK) ? " W " "   ")
        
formatex(key[1], 5"%s", (button IN_BACK) && !(button IN_FORWARD) ? " S " "   ")
        
formatex(key[2], 5"%s", (button IN_MOVELEFT) && !(button IN_MOVERIGHT) ? "A   " "      ")
        
formatex(key[3], 5"%s", (button IN_MOVERIGHT) && !(button IN_MOVELEFT) ? "   D" "      ")
        
formatex(key[4], 5"%s", (button IN_DUCK) ? " DUCK " "      ")
        
formatex(key[5], 5"%s", (button IN_JUMP) ? " JUMP " "      ")
    
        
kz_hud_center(id"%s^n%s    %s^n%s^n%s^n%s"key[0], key[2], key[3], key[1], key[5], key[4])
    }
    
    return 
PLUGIN_CONTINUE

SlayeR 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 05:24.


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