AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   How can I trigger the game to round a end (https://forums.alliedmods.net/showthread.php?t=120299)

Tirant 03-03-2010 02:30

How can I trigger the game to round a end
 
I've been searching for the past few days on how to force rounds to end (preferably w/o killing enemy team). Right now I have it slay everyone on the enemy team, but because I have a auto respawner, I think that sometimes certain players slip past the event and respawn after they are checked. It is weird, cause I think it even says the round has ended and the round restarts, but when we respawn, the teams haven't been swapped and same people who were alive are still alive (and in same spots too i think). Is there a way I can set up a set_task with an id AND task id, so I can remove the respawn task from all users and then kill them at least? If you don't understand, player my server, it doesn't happen too often, but often enough for it to be a problem when an admin isn't present. 63.215.74.167:27015

Thank you in advance for any help/ideas!
Tirant

Arkshine 03-03-2010 05:46

Re: How can I trigger the game to round a end
 
There is probably an easy way with Orpheu ; I will start to search.

Arkshine 03-19-2010 11:57

Re: How can I trigger the game to round a end
 
Released : http://forums.alliedmods.net/showthread.php?t=121744 :mrgreen:

joropito 06-21-2010 14:54

Re: How can I trigger the game to round a end
 
If you wont to make CT win only and don't want to use additional modules, here's an example:

forcectwin command should be called by CT player (you could adapt yourself to your needs).

If there's a push at info_player_start location, you should do some checks to avoid errors.
Also, you can set render to hostage to make it invisible.

PHP Code:

#include <amxmodx>
#include <fakemeta>
#include <engine>
#include <hamsandwich>

public plugin_init()
{
        
register_concmd("forcectwin""forcectwin")
}

public 
forcectwin(id)
{
        
// id must be from CT team and alive

        
new spawn find_ent_by_class(spawn"info_player_start")
        
create_entity("hostage_entity")
        new 
hostage
        
new Float:ori[3]
        
entity_get_vector(spawnEV_VEC_originori)
        while((
hostage find_ent_by_class(hostage"hostage_entity")))
        {
                
server_print("hostage %i %f %f %f"hostageori[0], ori[1], ori[2])
                
entity_set_origin(hostageori)
                
ExecuteHamB(Ham_Usehostageidid11.0)
        }

        return 
PLUGIN_HANDLED




All times are GMT -4. The time now is 08:39.

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