Raised This Month: $ Target: $400
 0% 

To not respawn at first join.


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
ironskillz1
AlliedModders Donor
Join Date: Jul 2012
Location: Sweden
Old 12-23-2016 , 10:53   Re: To not respawn at first join.
Reply With Quote #4

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

// how many seconds after round start are players allowed to spawn  
#define ALLOWED_SPAWN_SECONDS 1.0 

new Float:g_fRoundStart;  
new bool:g_bFreezeTime; 

public plugin_init( ) {  
    register_plugin( "Anti-LateSpawn", "0.0.1", "Exolent" );  
     
    register_event( "HLTV", "EventHLTV", "a", "1=0", "2=0" ); 
    register_logevent( "EventRoundStart", 2, "1=Round_Start" );  
     
    RegisterHam( Ham_Spawn, "player", "FwdPlayerSpawnPost", 1 );  
}  

public EventHLTV( ) { 
    g_bFreezeTime = true; 
} 

public EventRoundStart( ) {  
    g_bFreezeTime = false; 
     
    g_fRoundStart = get_gametime( );  
}  

public FwdPlayerSpawnPost( iPlayer ) {  
    if( !g_bFreezeTime 
    && is_user_alive( iPlayer )  
    && get_gametime( ) > ( g_fRoundStart + ALLOWED_SPAWN_SECONDS ) ) {  
        user_silentkill( iPlayer );  
         
        client_print( iPlayer, print_chat, "You spawned too late into the round." );  
    }  
}
__________________
I have many private and unique plugins for Jailbreak and Hide'N'Seek. PM me for more info.

Pm me.

Check out my roulette site.

Last edited by ironskillz1; 12-23-2016 at 10:54.
ironskillz1 is offline
Send a message via Skype™ to ironskillz1
 


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 18:12.


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