Raised This Month: $ Target: $400
 0% 

Force Round End


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
purple_pixie
Veteran Member
Join Date: Jun 2007
Location: Winchester, England
Old 09-07-2007 , 08:11   Re: Force Round End
Reply With Quote #11

Well I can't say what Alka would think, but I've added that change for you.

NOTE: The Slay T / Slay CT are INVERTED.
This was to make my code a bit more efficient.

(1 = slay all, 2 = slay T's, 3 = slay CT's )

Changes:
"Header" ( i.e. outside of a function)
Code:
new g_slay_players

"plugin_init"
Code:
    g_slay_players = register_cvar("amx_fre_sp","1");


"force_end"
Replace:
Code:
    for(new i = 0; i < num; i++)     {          x = g_players[i];         user_silentkill(x);         cs_set_user_deaths(x, get_user_deaths(x) - 1);     }
With:
Code:
    new slay_players = get_pcvar_num(g_slay_players)     for(new i = 0; i < num; i++)     {         x = g_players[i];         if ( slay_players == 1 )         {             user_silentkill(x);             cs_set_user_deaths(x, get_user_deaths(x) - 1);         }         else if ( get_user_team(x) == slay_players - 1 )         {             user_silentkill(x);             cs_set_user_deaths(x, get_user_deaths(x) - 1);         }     }


But I'm none too hot on the subject of editing other people's still-supported plugins ... if this is a massive faux-pas someone slap me.

EDIT: Oh, I make no claims to any of that edited code, Alka can freely include it and not cite me as a "credit" if he wants, or [get someone to] delete my post.
Attached Files
File Type: sma Get Plugin or Get Source (force_round_end.sma - 804 views - 4.3 KB)

Last edited by purple_pixie; 09-07-2007 at 08:23.
purple_pixie 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:23.


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