Quote:
Originally Posted by drekes
Try this:
PHP Code:
#include < amxmodx >
#include < hamsandwich >
// how many seconds after round start are players allowed to spawn
#define ALLOWED_SPAWN_SECONDS 1
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 try to compile this but:
Your plugin failed to compile! Read the errors below:
SourcePawn Compiler 1.3.7
Copyright (c) 1997-2006, ITB CompuPhase, (C)2004-2008 AlliedModders, LLC
/home/groups/sourcemod/upload_tmp/php1KcJWE.sp(1) : fatal error 120: cannot read from file: "amxmodx"
Compilation aborted.
1 Error.
please help. realy need this plugin