Raised This Month: $ Target: $400
 0% 

[deleted]


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Careface
Junior Member
Join Date: Mar 2007
Old 10-07-2007 , 06:24   [deleted]
Reply With Quote #1

[deleted]

Last edited by Careface; 01-25-2014 at 02:08.
Careface is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 10-07-2007 , 08:52   Re: Hooking latejoin spawn
Reply With Quote #2

Don't know if it's hookable, i would try to kill players after a setable time.
Try something like this, players shouldn't leave if they spawn 3 seconds after the round has begun.

Code:
#include <amxmodx> #define MAX_PLAYERS 32 new bool:g_RestartAttempt[MAX_PLAYERS+1] new Float:g_roundstart_time new bool:g_freezetime = true new p_spawndelay public plugin_init() {     register_plugin("Too Late to Spawn","0.1","connor")         register_event("HLTV", "eNewRound", "a", "1=0", "2=0")     register_logevent("eRoundStart", 2, "1=Round_Start")     register_event("TextMsg", "eRestartAttempt", "a", "2=#Game_will_restart_in")     register_event("ResetHUD", "eResetHUD", "be")     p_spawndelay = register_cvar("amx_max_spawndelay","3.0")     register_clcmd("clcmd_fullupdate", "fullupdateCmd") } public fullupdateCmd() {     return PLUGIN_HANDLED_MAIN } public eRestartAttempt() {     new players[32], num     get_players(players, num, "a")     for (new i; i < num; ++i)         g_RestartAttempt[players[i]] = true } public eResetHUD(id) {     if (g_RestartAttempt[id]) {         g_RestartAttempt[id] = false         return     }     event_player_spawn(id) }   public event_player_spawn(id) {     new Float:delay = get_pcvar_float(p_spawndelay)     if(!delay)         return     if(g_freezetime)         return     if(get_gametime() - g_roundstart_time > delay)         user_silentkill(id) } public eNewRound() {     g_freezetime = true } public eRoundStart() {     g_freezetime = false     g_roundstart_time = get_gametime() }

Last edited by ConnorMcLeod; 10-21-2007 at 07:07.
ConnorMcLeod is offline
Old 10-07-2007, 09:51
Careface
This message has been deleted by Careface.
Old 10-07-2007, 17:03
Careface
This message has been deleted by Careface.
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 10-07-2007 , 19:22   Re: Hooking latejoin spawn
Reply With Quote #3

works fine for me...
ConnorMcLeod 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 16:13.


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