Raised This Month: $ Target: $400
 0% 

how to remove bomb sites and hostages?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 12-16-2007 , 20:37   Re: how to remove bomb sites and hostages?
Reply With Quote #8

This one should work whatever the roundtime.

PHP Code:
#include <amxmodx>
#include <cstrike>

#define TASKID 1654879

native cs_force_team_win(CsTeams:team)

new const 
force_team_win_plugin_name[] = "Force Team Win"

new mp_roundtimeFloat:g_roundtime
new g_maxplayerssv_restart

public plugin_init() {
    
register_plugin("Round Countdown""1.1""M249-M4A1/connor")
    
register_event("HLTV""eNewRound""a""1=0""2=0")
    
register_logevent("eRoundStart"2"1=Round_Start")
}

public 
plugin_cfg() {
    
mp_roundtime get_cvar_pointer("mp_roundtime")
    
sv_restart get_cvar_pointer("sv_restart")
    
g_maxplayers get_maxplayers()
}

public 
eNewRound() {
    
g_roundtime get_pcvar_float(mp_roundtime)
}

public 
eRoundStart() {
    if (
task_exists(TASKID))
        
remove_task(TASKID)

    
set_task(g_roundtime"doSomething"TASKID)
}

public 
doSomething(taskid) {
    if(
is_plugin_loaded(force_team_win_plugin_name) && get_playersnum(1) < g_maxplayers)
        
cs_force_team_win(CS_TEAM_T)
    else
        
set_pcvar_float(sv_restart1.0)

edit : added restart if server is full as VEN plugin wouldn't work in that case, but i can replace with slay all players or a team
__________________
- tired and retired -

- my plugins -

Last edited by ConnorMcLeod; 12-16-2007 at 21:01.
ConnorMcLeod is offline
 



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 11:06.


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