Raised This Month: $ Target: $400
 0% 

force round end


Post New Thread Reply   
 
Thread Tools Display Modes
Emp`
AMX Mod X Plugin Approver
Join Date: Aug 2005
Location: Decapod 10
Old 03-09-2010 , 14:33   Re: force round end
Reply With Quote #11

Test it and find out. I don't know.

You could block the sound and text.
Emp` is offline
Send a message via AIM to Emp` Send a message via MSN to Emp` Send a message via Yahoo to Emp` Send a message via Skype™ to Emp`
dFF
sıɹɹoɥɔ ʞɔnu
Join Date: Oct 2009
Old 03-10-2010 , 08:57   Re: force round end
Reply With Quote #12

I found a method, but not always works
PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <fakemeta>
#include <cstrike>

#define PLUGIN "Force Round End"
#define VERSION "1.2"
#define AUTHOR "Alka"

#define TASK_ID 1337

new bool:g_round_started
new g_roundtime

new g_ipsz_dmg_ent

new g_MsgTextMsg
new g_MsgDeathMsg

new g_endround

public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
register_event("HLTV""event_new_round""a""1=0""2=0")
    
register_logevent("logevent_round_start"2"1=Round_Start")
    
register_logevent("logevent_round_end"2"1=Round_End")
    
    
register_event("TextMsg""round_restart""a""2&#Game_C""2&#Game_w")
    
    
register_message(get_user_msgid("RoundTime"), "Round_Timer")
    
    
g_ipsz_dmg_ent engfunc(EngFunc_AllocString"trigger_hurt")
    
g_MsgTextMsg get_user_msgid("TextMsg")
    
g_MsgDeathMsg get_user_msgid("DeathMsg")
}

public 
event_new_round() 
{
    
g_endround false
}

public 
logevent_round_start() 
{
    
g_round_started true
}

public 
logevent_round_end()
{
    
g_endround true
    remove_task
TASK_ID )
}

public 
round_restart() remove_taskTASK_ID )

public 
Round_Timer()
{
    if( 
g_round_started )
        
g_round_started false
    
else
        return
    
    
g_roundtime get_msg_arg_int)
    
    
set_task2.0 floatg_roundtime ), "force_end"TASK_ID )
    
}

public 
force_end()
{
    
team_looseCS_TEAM_T )
}

public 
team_looseCsTeams:team 
{
    if( 
g_endround )
        return 
PLUGIN_CONTINUE

    
new player32 ], numplayer232 ], num2
    
    get_players
playernum"aeh"team == CS_TEAM_T "TERRORIST" "CT" )
    
get_playersplayer2num2"aeh"team == CS_TEAM_CT "TERRORIST" "CT" )
    
    if( !
num || !num2 )
        return 
PLUGIN_CONTINUE

    
new id engfuncEngFunc_CreateFakeClient"fake_client" )
    if( !
id )
        return 
PLUGIN_CONTINUE

    
for( new 0num; ++)
        
cs_set_user_teamplayer], CS_TEAM_SPECTATOR )

    
set_msg_blockg_MsgTextMsgBLOCK_SET )
    
dllfuncDLLFunc_ClientPutInServerid )

    
cs_set_user_teamidteam 
    
cs_user_spawnid )

    
engfuncEngFunc_SetOriginidFloat:{ 8191.08191.08191.0 } )

    
set_msg_blockg_MsgTextMsgBLOCK_NOT )
    
set_msg_blockg_MsgDeathMsgBLOCK_ONCE 
    
fc_fakedamageid )

    
set_msg_blockg_MsgTextMsgBLOCK_SET )
    
server_cmd"kick #%d"get_user_useridid ) )
    
server_exec()
    
set_msg_blockg_MsgTextMsgBLOCK_NOT )

    for( new 
0num; ++)
        
cs_set_user_teamplayer], team )

    return 
PLUGIN_HANDLED
}

fc_fakedamageid 
{
    new 
entity engfuncEngFunc_CreateNamedEntityg_ipsz_dmg_ent )
    if( !
entity )
        return 
PLUGIN_CONTINUE

    set_dmg_ent_kvd
entity"dmg""1000.0" )
    
set_dmg_ent_kvdentity"damagetype""0" )
    
set_dmg_ent_kvdentity"origin""8191 8191 8191" )

    
dllfuncDLLFunc_Spawnentity )
    
set_peventitypev_classname"fc_killer" )
    
dllfuncDLLFunc_Touchentityid )
    
engfuncEngFunc_RemoveEntityentity )

    return 
PLUGIN_HANDLED
}

set_dmg_ent_kvdentitykey[ ], value[ ] ) 
{
    
set_kvd0KV_ClassName"trigger_hurt")
    
set_kvd0KV_KeyNamekey )
    
set_kvd0KV_Valuevalue )
    
set_kvd0KV_fHandled)

    return 
dllfuncDLLFunc_KeyValueentity)

Code:
Scoring will not start until both teams have players
Scoring will not start until both teams have players
Wtf !? When I tested, was all players alive.
dFF is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 03-19-2010 , 11:56   Re: force round end
Reply With Quote #13

Released : http://forums.alliedmods.net/showthread.php?t=121744
__________________
Arkshine 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 19:52.


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