Raised This Month: $45 Target: $400
 11% 

help register_event


Post New Thread Reply   
 
Thread Tools Display Modes
1M1e
Member
Join Date: Mar 2020
Old 09-19-2020 , 21:35   Re: help register_event
Reply With Quote #11

now the hudmessage does not show

(not working )
1M1e is offline
Supremache
Veteran Member
Join Date: Sep 2019
Location: Egypt
Old 09-19-2020 , 21:40   Re: help register_event
Reply With Quote #12

Quote:
Originally Posted by 1M1e View Post
now the hudmessage does not show

(not working )
LOL xD, Wait until i open my pc because i have to check full plugin!!!

Try to change this code from g_counter-- to g_counter++ and test it..
__________________
Supremache is offline
1M1e
Member
Join Date: Mar 2020
Old 09-19-2020 , 21:43   Re: help register_event
Reply With Quote #13

Quote:
Originally Posted by Supremache View Post
LOL xD, Wait until i open my pc because i have to check full plugin!!!

Try to change this code from g_counter-- to g_counter++ and test it..
ok i will be waiting

ty
1M1e is offline
1M1e
Member
Join Date: Mar 2020
Old 09-24-2020 , 21:40   Re: help register_event
Reply With Quote #14

Quote:
Originally Posted by Supremache View Post
Try to change this code from g_counter-- to g_counter++ and test it..
i changed it, now its show but when the round end the hud will not restart

( not work )
1M1e is offline
Supremache
Veteran Member
Join Date: Sep 2019
Location: Egypt
Old 09-24-2020 , 21:53   Re: help register_event
Reply With Quote #15

Quote:
Originally Posted by 1M1e View Post
i changed it, now its show but when the round end the hud will not restart

( not work )
Oops i didn't saw that, you dont need to add hltv start round you can do it from logevent round start just put remove task and set task

Like this:
Code:
public LogEventRoundStart() {     RoundStartTime = get_gametime()         new iPlayers[32]     new iNum         get_players( iPlayers, iNum )         for( new i = 0; i < iNum; i++ )     {         g_iRespawn[iPlayers[i]] = true     }     remove_task(123456) // Remove old task     set_task(1.0,"TimeCounter",123456,_,_,"a",get_pcvar_num(g_Time_Interval)) //set a new task     set_task(get_pcvar_float(g_Time_Interval),"Runda_Terminata",789123) }
__________________

Last edited by Supremache; 09-24-2020 at 22:46.
Supremache is offline
1M1e
Member
Join Date: Mar 2020
Old 09-25-2020 , 09:33   Re: help register_event
Reply With Quote #16

Quote:
Originally Posted by Supremache View Post
Code:
public LogEventRoundStart() {     RoundStartTime = get_gametime()         new iPlayers[32]     new iNum         get_players( iPlayers, iNum )         for( new i = 0; i < iNum; i++ )     {         g_iRespawn[iPlayers[i]] = true     }     remove_task(123456) // Remove old task     set_task(1.0,"TimeCounter",123456,_,_,"a",get_pcvar_num(g_Time_Interval)) //set a new task     set_task(get_pcvar_float(g_Time_Interval),"Runda_Terminata",789123) }
still dose not work
1M1e is offline
AnimalMonster
Senior Member
Join Date: May 2020
Old 09-25-2020 , 15:51   Re: help register_event
Reply With Quote #17

I Hope This Helps You!
PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <hamsandwich>

#define PLUGIN "Dr. Respawn"
#define VERSION "1.0"
#define AUTHOR "DeclineD"

#define X 0.0
#define Y 0.83

new g_seconds
new idk
new cvar_seconds

public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
register_logevent("log_roundstart",2,"1=RoundStart")
    
register_event("DeathMsg""respawn","a")
    
    
cvar_seconds register_cvar("dr_respawntime""20")
}

public 
log_roundstart()
{
    
g_seconds get_pcvar_num(cvar_seconds)
    
idk g_seconds
    
    set_task
(1.0,"Count"0__"b")
}

Count()
{
    new 
r,b
    r 
random_num(0,255)
    
random_num(0,255)
    
random_num(0,255)
    
    if(
idk && idk g_seconds)
    {
        
set_dhudmessage(rgbXY00.10.90.20.2)
        
show_dhudmessage(0"Respawn Ends in %d"idk 1)
    }
    else return;
}

public 
respawn(id)
{
    if(
idk && idk g_seconds)
    {
        
ExecuteHamB(Ham_CS_RoundRespawnid)
    }
    else return;

AnimalMonster is offline
1M1e
Member
Join Date: Mar 2020
Old 09-25-2020 , 16:01   Re: help register_event
Reply With Quote #18

Quote:
Originally Posted by AnimalMonster View Post
PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <hamsandwich>

#define PLUGIN "Dr. Respawn"
#define VERSION "1.0"
#define AUTHOR "DeclineD"

#define X 0.0
#define Y 0.83

new g_seconds
new idk
new cvar_seconds

public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
register_logevent("log_roundstart",2,"1=RoundStart")
    
register_event("DeathMsg""respawn","a")
    
    
cvar_seconds register_cvar("dr_respawntime""20")
}

public 
log_roundstart()
{
    
g_seconds get_pcvar_num(cvar_seconds)
    
idk g_seconds
    
    set_task
(1.0,"Count"0__"b")
}

Count()
{
    new 
r,b
    r 
random_num(0,255)
    
random_num(0,255)
    
random_num(0,255)
    
    if(
idk && idk g_seconds)
    {
        
set_dhudmessage(rgbXY00.10.90.20.2)
        
show_dhudmessage(0"Respawn Ends in %d"idk 1)
    }
    else return;
}

public 
respawn(id)
{
    if(
idk && idk g_seconds)
    {
        
ExecuteHamB(Ham_CS_RoundRespawnid)
    }
    else return;

dose not work
1M1e is offline
AnimalMonster
Senior Member
Join Date: May 2020
Old 09-25-2020 , 16:03   Re: help register_event
Reply With Quote #19

Quote:
Originally Posted by 1M1e View Post
dose not work
maybe i should of not put id and write in the resapwn function new victim = read_data(2) and change id to victim in ExecuteHamB
AnimalMonster is offline
1M1e
Member
Join Date: Mar 2020
Old 09-25-2020 , 16:04   Re: help register_event
Reply With Quote #20

Quote:
Originally Posted by AnimalMonster View Post
maybe i should of not put id and write in the resapwn function new victim = read_data(2) and change id to victim in ExecuteHamB
and the hud dose not show
1M1e is offline
Reply


Thread Tools
Display Modes

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 14:22.


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