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

Respawn bar for CSDM


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Thinker
Junior Member
Join Date: Mar 2015
Old 08-22-2015 , 01:54   Respawn bar for CSDM
Reply With Quote #1

Hello! I need plugin for CSDM 2.1.3d which will show bar (like when you plant or defuse the bomb) before respawning.
Thinker is offline
Thinker
Junior Member
Join Date: Mar 2015
Old 09-04-2015 , 17:23   Re: Respawn bar for CSDM
Reply With Quote #2

Anyone?..
Thinker is offline
mekkinha
Member
Join Date: Dec 2010
Old 04-19-2016 , 19:00   Re: Respawn bar for CSDM
Reply With Quote #3

I also need this plugin, anyone can do?
mekkinha is offline
Bellka .
Member
Join Date: Apr 2016
Location: Home
Old 04-19-2016 , 19:31   Re: Respawn bar for CSDM
Reply With Quote #4

search !!!
Bellka . is offline
Send a message via MSN to Bellka .
EFFx
Veteran Member
Join Date: Feb 2016
Location: São Paulo, Brasil
Old 04-19-2016 , 19:37   Re: Respawn bar for CSDM
Reply With Quote #5

Here's

PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <hamsandwich>
 
#define PLUGIN "Reload Bar"
#define VERSION "1.0"
#define AUTHOR "EFFx"
 
new gMsgBarTime
new TimeInSeconds
public plugin_init() 
{
 
register_plugin(PLUGINVERSIONAUTHOR)
 
 
TimeInSeconds register_cvar("showbar_time","5")
 
 
RegisterHam(Ham_Spawn,"player","SpawnShowBar",1)
 
 
gMsgBarTime get_user_msgid("BarTime")
}
public 
SpawnShowBar(id)
{
 if(
is_user_alive(id))
 {
  
manage_bar(id,get_pcvar_num(TimeInSeconds))
 }
}
stock manage_bar(indexg_time)
{
 
message_begin(MSG_ONE_UNRELIABLEgMsgBarTime_index)
 
write_short(g_time)
 
message_end()

__________________
• Ranking System • AutoMix 5vs5 System
• Web Ban System • Plugins for free

____________________________________________
For private works:
• Discord: EFFEXo#8850 • Steam: EFFEXo

Last edited by EFFx; 04-19-2016 at 19:42.
EFFx is offline
mekkinha
Member
Join Date: Dec 2010
Old 04-19-2016 , 19:45   Re: Respawn bar for CSDM
Reply With Quote #6

Code:
#include <amxmodx>
#include <fakemeta>
#include <csdm>
#include <cstrike>

new g_iMsgIdBarTime, spawn_wait_time, weapons_stay


public csdm_CfgInit()
{
    csdm_reg_cfg("settings", "read_cfg")
}

public plugin_init()
{
    register_plugin("Death Match Respawn Count","1.0","NST")
    g_iMsgIdBarTime = get_user_msgid("BarTime")
}

public client_death(killer, victim, wpnindex, hitplace, TK)
{
    if (csdm_active())
    {
        for (new i = 1;i <= 3 ;i++)
        { 
            new name[24], wp
            if (i==1) wp = CSW_HEGRENADE
            else if (i==2) wp = CSW_SMOKEGRENADE
            else if (i==3) wp = CSW_FLASHBANG
            
            get_weaponname(wp, name, 23)
            csdm_remove_weapon(victim, name, weapons_stay, 1)
        }
        
        message_begin(MSG_ONE, g_iMsgIdBarTime, _, victim)
        write_short(spawn_wait_time)
        message_end()
    }
    new parm[2]
    parm[0] = victim
    parm[1] = spawn_wait_time
    set_task(0.1,"check_respawn",0,parm,2)
    return PLUGIN_CONTINUE
}

 public check_respawn(parm[])
 {
    new id = parm[0]
    new time = parm[1]
    parm[1]--
    if(is_user_alive(id))
        return

    if(time>0){
        if(time<=10){
            new speak[30]
            num_to_word(time, speak, 29)
            client_cmd(id,"spk ^"meka/vox/count/%s^"",speak) 
        }
        client_print(id, print_center, "Voce vai renascer em %d segundo(s)", time)
        set_task(1.0,"check_respawn",0,parm,2)
    }
 }

public read_cfg(readAction, line[], section[])
{
    if (!csdm_active())
    {
        return
    }
        
    if (readAction == CFG_READ)
    {
        new setting[24], sign[3], value[32];

        parse(line, setting, 23, sign, 2, value, 31);
        
        if (equali(setting, "spawn_wait_time"))
        {
            spawn_wait_time = str_to_num(value)
        }
        else if (equali(setting, "weapons_stay"))
        {
            weapons_stay = str_to_num(value)
        }
    }
}

public csdm_PostSpawn(player, bool:fake)
{
    cs_set_user_money(player, cs_get_user_money(player)+3000)
}
mekkinha is offline
siriusmd99
Veteran Member
Join Date: Oct 2013
Location: Republic of Moldova
Old 04-21-2016 , 14:41   Re: Respawn bar for CSDM
Reply With Quote #7

PHP Code:
#include <amxmodx>
#include <amxmisc>
 
#define PLUGIN "Pre-Spawn Reload Bar"
#define VERSION "1.0"
#define AUTHOR "siriusmd99"
 
new g_iBarTime2
new g_time

public plugin_init() 
{

 
register_plugin(PLUGINVERSIONAUTHOR)
 
 
g_time get_cvar_pointer"spawn_wait_time" )
 
g_iBarTime2 get_user_msgid("BarTime2")
 
register_event("DeathMsg""ev_death""a")

 
}

public 
ev_death()
{

 
Make_BarTime2(read_data(2), get_pcvar_float(g_time))

}

Make_BarTime2(idFloat:flSeconds

    new 
iRoundedSeconds floatround(flSecondsfloatround_ceil
    new 
iStartPercent floatround((1.0-(flSeconds iRoundedSeconds))*100
    
message_begin(MSG_ONE_UNRELIABLEg_iBarTime2, .player=id
    
write_short(iRoundedSeconds
    
write_short(iStartPercent
    
message_end() 

Btw, he said before he respawns, not after.
siriusmd99 is offline
Thinker
Junior Member
Join Date: Mar 2015
Old 06-18-2016 , 10:08   Re: Respawn bar for CSDM
Reply With Quote #8

Quote:
Originally Posted by siriusmd99 View Post
PHP Code:
#include <amxmodx>
#include <amxmisc>
 
#define PLUGIN "Pre-Spawn Reload Bar"
#define VERSION "1.0"
#define AUTHOR "siriusmd99"
 
new g_iBarTime2
new g_time

public plugin_init() 
{

 
register_plugin(PLUGINVERSIONAUTHOR)
 
 
g_time get_cvar_pointer"spawn_wait_time" )
 
g_iBarTime2 get_user_msgid("BarTime2")
 
register_event("DeathMsg""ev_death""a")

 
}

public 
ev_death()
{

 
Make_BarTime2(read_data(2), get_pcvar_float(g_time))

}

Make_BarTime2(idFloat:flSeconds

    new 
iRoundedSeconds floatround(flSecondsfloatround_ceil
    new 
iStartPercent floatround((1.0-(flSeconds iRoundedSeconds))*100
    
message_begin(MSG_ONE_UNRELIABLEg_iBarTime2, .player=id
    
write_short(iRoundedSeconds
    
write_short(iStartPercent
    
message_end() 

Btw, he said before he respawns, not after.
Thanks, but this doesn't work...

Code:
L 06/18/2016 - 17:06:19: [AMXX] Run time error 10 (plugin "respawn_bar.amxx") (native "get_pcvar_float") - debug not enabled!
L 06/18/2016 - 17:06:19: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 06/18/2016 - 17:06:22: Invalid CVAR pointer
Thinker is offline
siriusmd99
Veteran Member
Join Date: Oct 2013
Location: Republic of Moldova
Old 06-18-2016 , 17:10   Re: Respawn bar for CSDM
Reply With Quote #9

Because 2.1.3d doesn't have cvar spawn_wait_time . Why you are not using 2.1.2?
It's stable and has that cvar.
But if not using cvar then you should use wait time which is used in your csdm version. You will have to remove get pcvar function and write directly your value which I think you can find in the source code of your version.
siriusmd99 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 22:57.


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