This site is a testing version, but all data is shared with the live forum.


Raised This Month: $ Target: $400
 0% 

[REQ] Slay the CTs when the round timer ends


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Kennen
Junior Member
Join Date: Oct 2012
Location: Bulgaria
Old 08-21-2015 , 17:27   [REQ] Slay the CTs when the round timer ends
Reply With Quote #1

I need a plugin which will be used in Deathrun server. I need it to slay all the CTs when the round timer is 0:00 and the round will be won by the Terrorist. +all the CT's scores have to be untouched... Also a message like "[DeathRun] Nobody managed to cheat the death. You all must die now!" would be cool.

Last edited by Kennen; 08-21-2015 at 17:28. Reason: [REQ]
Kennen is offline
Send a message via Skype™ to Kennen
OnePL
BANNED
Join Date: May 2012
Location: GB
Old 08-22-2015 , 12:34   Re: [REQ] Slay the CTs when the round timer ends
Reply With Quote #2

PHP Code:
#include <amxmodx>

new g_iRoundTime;
new 
Float:g_fTimeRoundStartFloat:g_fRoundTime;

public 
plugin_init() {
    
register_logevent("RoundStart"2"1=Round_Start");

    
g_iRoundTime get_cvar_pointer("mp_roundtime");
}

public 
RoundStart() {
    
g_fRoundTime floatmul(get_pcvar_float(g_iRoundTime), 60.0) - 1.0;
    
g_fTimeRoundStart get_gametime();

    
set_task(1.0"CheckTime"44441, .flags="b");
}

public 
CheckTime() {
    new 
szTime[6];
    
format_time(szTime5"%M:%S"floatround(g_fRoundTime - (get_gametime() - g_fTimeRoundStart)));

    if(
equal(szTime"00:00")) {
        new 
szPlayers[32], iNumiPlayer;
        
get_players(szPlayersiNum"aeh""CT");

        for(new 
iiNumi++) {
            
iPlayer szPlayers[i];
            
user_silentkill(iPlayer);
        }
        
remove_task(44441);
    }

OnePL is offline
Send a message via ICQ to OnePL Send a message via AIM to OnePL Send a message via Yahoo to OnePL Send a message via Skype™ to OnePL
Kennen
Junior Member
Join Date: Oct 2012
Location: Bulgaria
Old 08-22-2015 , 13:03   Re: [REQ] Slay the CTs when the round timer ends
Reply With Quote #3

Thank you! It works perfect.
Will it work the same for terrorists if I just rewrite
Quote:
get_players(szPlayers, iNum, "aeh", "CT");
to get_players(szPlayers, iNum, "aeh", "T"); ?

Last edited by Kennen; 08-22-2015 at 14:49.
Kennen is offline
Send a message via Skype™ to Kennen
OnePL
BANNED
Join Date: May 2012
Location: GB
Old 08-22-2015 , 20:45   Re: [REQ] Slay the CTs when the round timer ends
Reply With Quote #4

PHP Code:
get_players(szPlayersiNum"aeh""TERRORIST"); 
or
PHP Code:
get_players(szPlayersiNum"ah"); 
for ct's & t's

Last edited by OnePL; 08-22-2015 at 20:46.
OnePL is offline
Send a message via ICQ to OnePL Send a message via AIM to OnePL Send a message via Yahoo to OnePL Send a message via Skype™ to OnePL
Kennen
Junior Member
Join Date: Oct 2012
Location: Bulgaria
Old 08-23-2015 , 03:23   Re: [REQ] Slay the CTs when the round timer ends
Reply With Quote #5

Thank you. This plugin if perfect.
Kennen is offline
Send a message via Skype™ to Kennen
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 16:02.


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