Raised This Month: $ Target: $400
 0% 

How can I trigger the game to round a end


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Tirant
Veteran Member
Join Date: Jul 2008
Location: Los Angeles, California
Old 03-03-2010 , 02:30   How can I trigger the game to round a end
Reply With Quote #1

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
__________________

PM me if you're interested in buying the Credits addition for Base Builder
Battlefield Rebirth [66% done]
Call of Duty: MW2 [100% done]
Base Builder [100% done]
Tirant is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 03-03-2010 , 05:46   Re: How can I trigger the game to round a end
Reply With Quote #2

There is probably an easy way with Orpheu ; I will start to search.
__________________
Arkshine is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 03-19-2010 , 11:57   Re: How can I trigger the game to round a end
Reply With Quote #3

Released : http://forums.alliedmods.net/showthread.php?t=121744
__________________
Arkshine is offline
joropito
AlliedModders Donor
Join Date: Mar 2009
Location: pfnAddToFullPack
Old 06-21-2010 , 14:54   Re: How can I trigger the game to round a end
Reply With Quote #4

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

__________________

Divide et vinces
approved plugins | steam account

I don't accept PM for support. Just ask on forums.
If you're looking for private work, PM me.

Last edited by joropito; 06-21-2010 at 15:11.
joropito is offline
Send a message via MSN to joropito
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 08:39.


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