Raised This Month: $ Target: $400
 0% 

Restarting the round


Post New Thread Reply   
 
Thread Tools Display Modes
Russianeer
SourceMod Donor
Join Date: Feb 2011
Old 12-21-2011 , 04:36   Re: Restarting the round
Reply With Quote #11

Quote:
Originally Posted by Max! View Post
Figured out a way that seems to work universally!
By universally he means all maps, we had trouble getting it to work on certain gametypes. Anyways, good job Max!
Russianeer is offline
Max!
Member
Join Date: Jun 2009
Old 12-21-2011 , 06:55   Re: Restarting the round
Reply With Quote #12

Ooops! looks like that other code only serves to show how nooby I am in Source xD. I've fixed it so you can pick the winning team, and the gates and whatnot reset when its ended.

Let me know if this ones better than the last!
PHP Code:
public EndRound(iTeam)
{
    new 
entindex = -1;
    
entindex CreateEntityByName("game_round_win")
    if(
entindex != -1)
    {
        
DispatchSpawn(entindex);
        
DispatchKeyValue(entindex"force_map_reset""1");        
    }
    
    
SetVariantInt(iTeam);
    
AcceptEntityInput(entindex,"SetTeam");
    
    
AcceptEntityInput(entindex,"RoundWin");

Max! is offline
Russianeer
SourceMod Donor
Join Date: Feb 2011
Old 12-23-2011 , 22:37   Re: Restarting the round
Reply With Quote #13

Just to add to this.

Code:
RemoveEdict(entity);

Last edited by Russianeer; 12-24-2011 at 00:34.
Russianeer 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 17:53.


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