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

Respawn Event


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Dragos
Senior Member
Join Date: Oct 2018
Location: Romania
Old 09-14-2019 , 04:22   Respawn Event
Reply With Quote #1

hi, a friend told me if I can make a respawn event, and... I make it but I don't know if it will work
Can somebody tell if I make it correct?

the hlds don't work for me anymore

PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <hamsandwich>

new start,
stop,
h,
m

new boolactivate[33];

public 
plugin_init()
{
    
register_plugin("Rspawn Event""1.0""Deza")
    
    
start register_cvar"vip_start""20" );
    
stop register_cvar"vip_end""23" )
    
RegisterHam(Ham_Spawn"player""fwSpawned"1);
    
RegisterHam(Ham_Killed"player""fwKilled"1);

    
    
set_task60.0"check"___"b" );
    
}

public 
fwSpawned(id)
{
      if (
activate [id]) 
      if (
is_user_alive(id))
            
remove_task(id);
}   
 


public 
fwKilled(id)
{     
      if (
activate [id])
      if (!
task_exists(id))
            
set_task(150.0"Respawn"id);
}

public 
Respawn(id)
{  
      if (
activate [id])
      if (!
is_user_alive(id))
            
ExecuteHamB(Ham_CS_RoundRespawnid);
}    

public 
client_putinserver(id)
{
    
check(id)
}
public 
check(id)
{
    
    
timehm);
    
    if(
>= get_pcvar_numstart ) && get_pcvar_numstop ))
    {        
            
activate [id] = true;
        }
    else if(
get_pcvar_numstart ) || >= get_pcvar_numstop ))
    {
        
activate [id] = false
        
}
    } 
__________________
sup

Last edited by Dragos; 09-14-2019 at 04:31.
Dragos is offline
LearninG
Senior Member
Join Date: Apr 2019
Location: Iran
Old 09-14-2019 , 05:15   Re: Respawn Event
Reply With Quote #2

I didn't understand exactly what are you trying to do. what vip_stop , vip_start stands for ? what is m , h...explain more about what your trying to do.
LearninG is offline
Dragos
Senior Member
Join Date: Oct 2018
Location: Romania
Old 09-14-2019 , 07:23   Re: Respawn Event
Reply With Quote #3

you know it's a event VIP free plugin on this forum and i copy hes date and modify it to respawn event
__________________
sup
Dragos is offline
LearninG
Senior Member
Join Date: Apr 2019
Location: Iran
Old 09-14-2019 , 10:15   Re: Respawn Event
Reply With Quote #4

dude , we can't read your mind ! explain what you need , not what you did.
LearninG is offline
SHIELD755
Veteran Member
Join Date: Feb 2018
Location: FROM MARVEL STUDIO
Old 09-14-2019 , 11:47   Re: Respawn Event
Reply With Quote #5

As much i understand what he wanted is that on his free vip time , he wanted to respawn the player who are killed in that period of that vip time , something like deathmatch , respawning player
__________________
SED LYF !!!

Last edited by SHIELD755; 09-14-2019 at 11:48.
SHIELD755 is offline
AmXDusT
Member
Join Date: Feb 2019
Location: Italy / Albania
Old 09-14-2019 , 13:36   Re: Respawn Event
Reply With Quote #6

Hi, try this out:
PHP Code:
#include <amxmodx>
#include <hamsandwich>

#if AMXX_VERSION_NUM < 183
    #define client_disconnected client_disconnect
#endif 

new HamHook:HamKilledHamHook:HamSpawn
new bool:is_active

new p_startp_stopp_time

public plugin_init(){
    new 
VERSION[] = "1.0"

    
register_plugin("Respawn Event"VERSION"DusT")
    
DisableHamForwardHamKilled RegisterHam(Ham_Killed"player""fw_Killed_Post"1) )
    
DisableHamForwardHamSpawn RegisterHam(Ham_Spawn"player""fw_Spawned_Post"1) )

    
p_start register_cvar("amx_respawn_start""23")
    
p_stop register_cvar("amx_respawn_stop""06")
    
p_time register_cvar("amx_respawn_time""15")

    
CheckRespawnToggle()
    
set_task600.0"CheckRespawnToggle", .flags"b")
}


public 
fw_Killed_Postid )
    if( !
task_existsid ) )
        
set_taskget_pcvar_floatp_time ), "Respawn"id );

public 
fw_Spawned_Postid )
    if( 
task_existsid ) && is_user_aliveid ) )
        
remove_taskid );


public 
client_putinserverid )
    if( 
is_active && !task_existsid ) && get_user_teamid ) != && get_user_teamid ) != )
        
set_taskget_pcvar_floatp_time ), "Respawn"id );

public 
client_disconnectedid )
    if( 
task_existsid ) )
        
remove_taskid );

public 
Respawnid )
    if( 
is_active && !is_user_aliveid ) )
            
ExecuteHamBHam_CS_RoundRespawnid );


public 
CheckRespawnToggle(){
    new 
h
    time
);
    
is_active get_pcvar_nump_start ) < get_pcvar_nump_stop )? get_pcvar_nump_start ) <= get_pcvar_nump_stop ):( get_pcvar_nump_start ) <= || get_pcvar_nump_stop ) )
    if( 
is_active ){
        
EnableHamForwardHamKilled )
        
EnableHamForwardHamSpawn )
    } 
    else{
        
DisableHamForwardHamKilled )
        
DisableHamForwardHamSpawn )
    }

AmXDusT 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 08:54.


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