Raised This Month: $32 Target: $400
 8% 

Request: Auto Respawn Plugin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
wizzkidon
Senior Member
Join Date: Jan 2017
Old 06-05-2022 , 12:39   Request: Auto Respawn Plugin
Reply With Quote #1

I need a plugin when each round was started, first 15 seconds give respawn all ppls who die. After this 15 sec, will be stop respawning. + some HUD info

Last edited by wizzkidon; 06-05-2022 at 12:39.
wizzkidon is offline
DruGzOG
Veteran Member
Join Date: Nov 2007
Location: Unknown
Old 06-06-2022 , 06:53   Re: Request: Auto Respawn Plugin
Reply With Quote #2

PHP Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>
#include <hamsandwich>
#include <cstrike>


#define PLUGIN "Respawn"
#define VERSION "1.0"
#define AUTHOR "EaGle07"

new iTime

public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
register_event("ResetHUD""newRound""b")
    
register_event"DeathMsg""Hook_Deathmessage""a" );
    
}
public 
newRound(id)
{
    if( 
task_exists1337 ) )
        
remove_task1337 )
    
    
iTime 15
    set_task
1.0"countdown"1337__"a"15 )
    
    return 
PLUGIN_HANDLED;
}
public 
countdown()
{
    if( 
iTime >= )
    {
        
iTime--

        
set_hudmessage(17900, -1.0, -1.020.021.00.010.110);   
        
show_hudmessage0"Respawning in %i sec"iTime )
    }
    
    else if( 
iTime == )
    {
        
iTime--
        
        
set_hudmessage(0,0,205, -1.0, -1.011.04.00.10.52)
        
show_hudmessage0"You Have Been Respawned!" )
    }
    

public 
Hook_Deathmessage()
{
    new 
victim read_data);
    
    if(
iTime >= 1)
        
set_task(1.0,"Spawn",victim)
    
    return 
PLUGIN_HANDLED
}
public 
Spawn(id)
{
    if(
cs_get_user_team(id) == CS_TEAM_CT)
        
ExecuteHamB(Ham_CS_RoundRespawnid);

__________________
DruGzOG is offline
Send a message via AIM to DruGzOG
iceeedr
Veteran Member
Join Date: Apr 2017
Location: Brazil
Old 06-06-2022 , 12:52   Re: Request: Auto Respawn Plugin
Reply With Quote #3

Use the re-round event, not resethud.

PHP Code:
register_event("HLTV""event_new_round""a""1=0""2=0"
__________________


Quote:
Originally Posted by fysiks View Post
Please stop trying to help. You appear to just be posting random stuff. Wait until you actually understand more about AMX Mod X and how the game works.
https://iceeedr.com.br/

Last edited by iceeedr; 06-06-2022 at 12:53.
iceeedr is offline
Send a message via Skype™ to iceeedr
Supremache
Veteran Member
Join Date: Sep 2019
Location: Egypt
Old 06-07-2022 , 10:28   Re: Request: Auto Respawn Plugin
Reply With Quote #4

Quote:
give respawn all ppls who die
Do you mean give respawn for who is dead or give respawn for everyone

PHP Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <hamsandwich>

const TASK_RESTART 214777;

public 
plugin_init( ) 
{
    
register_plugin"Resapwn dead players""1.0.0""Supremache" );
    
register_event"HLTV""OnRoundStart""a""1=0""2=0" ); 
}

public 
OnRoundStart( )
{
    if( !
task_existsTASK_RESTART ) )
    {
        
set_task1.0"OnTaskRespawn"TASK_RESTART, .flags "a" , .repeat 15 )
    }
}    

public 
OnTaskRespawn( )
{
    new 
iPlayers32 ], iNum;
    
get_playersiPlayersiNum"b" )

    for( new 
iNum i++ )
    {
        
ExecuteHamBHam_CS_RoundRespawn);
        
set_hudmessage0,0,205, -1.0, -1.011.04.00.10.5);
        
show_hudmessagei"You Have Been Respawned!" )
    }

__________________
Youtube.com/Supremache

Bank System [Nvault - SQL Support]
VIP System
  • If you think it's that simple, then do it yourself.

Last edited by Supremache; 06-07-2022 at 10:37.
Supremache 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 10:08.


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