AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   how to remove bomb sites and hostages? (https://forums.alliedmods.net/showthread.php?t=64469)

Battousai-sama 12-16-2007 16:07

how to remove bomb sites and hostages?
 
Im trying to make something so i can remove the bomb site and hostages from the map, and i dont know how to start it, if someone can give me some tips :D

Thanks.

hugz` 12-16-2007 16:55

Re: how to remove bomb sites and hostages?
 
Search "No Objectives"

Battousai-sama 12-16-2007 16:58

Re: how to remove bomb sites and hostages?
 
no objective has remove timer also.

hugz` 12-16-2007 17:36

Re: how to remove bomb sites and hostages?
 
Comment out lines #116-#119 in the .sma to put timer back on
But remember.. the round won't end because the are no objectives.

If you want the round to be over, then search for it.. I recommend CT slay plugin.. or something like that.

Battousai-sama 12-16-2007 17:49

Re: how to remove bomb sites and hostages?
 
i got a remove objective edited modified, it has timer and stuff but no hostage and bomb.
But round wont end, ima work on something to make t's win if round ends.

hugz` 12-16-2007 19:33

Re: how to remove bomb sites and hostages?
 
Compile this..
Quote:

#include <amxmodx>
#include <amxmisc>

#define PLUGIN "3:00 Countdown"
#define VERSION "1.0"
#define AUTHOR "M249-M4A1"


public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_event("HLTV", "Countdown", "a", "1=0", "2=0")
}

public
Countdown() {
if (
task_exists(12345)) {
remove_task(12345)
set_task(180.0, "doSomething", 12345)
} else {
set_task(180.0, "doSomething", 12345)
}
}

public
doSomething() {
server_cmd("team_win 1")
}

And add also get this plugin: http://forums.alliedmods.net/showthr...force+team+win

Both of them will work as a "Terrorists Win" at the end of the timer.
Make sure your round time is set to 3 minutes.

Battousai-sama 12-16-2007 20:04

Re: how to remove bomb sites and hostages?
 
the tiem cant be lower than 3?

Edit, nvm it can be lower or grater than 3, 180.0 = 3 mins

Well thanks, hugz.

ConnorMcLeod 12-16-2007 20:37

Re: how to remove bomb sites and hostages?
 
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

Battousai-sama 12-16-2007 20:40

Re: how to remove bomb sites and hostages?
 
yea u did getcvar mp roudntimer so it detects and goes with that cvar, nice work connorr :D

ConnorMcLeod 12-16-2007 20:58

Re: how to remove bomb sites and hostages?
 
Updated again for safe use (i hope:mrgreen:)


All times are GMT -4. The time now is 11:06.

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