AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Suggestions / Requests (https://forums.alliedmods.net/forumdisplay.php?f=12)
-   -   Slay CTs at end of round. (https://forums.alliedmods.net/showthread.php?t=61271)

kewkies602 09-25-2007 14:40

Slay CTs at end of round.
 
I was hoping someone could make a plugin for my Hide N Seek server. I want it like force_end_round.amxx, but I want it to just slay the CTs after each round draw.

It would be greatly appreciated!

l33tnewb 09-25-2007 14:44

Re: Slay CTs at end of round.
 
http://forums.alliedmods.net/showthr...slay+end+round

kewkies602 09-25-2007 15:26

Re: Slay CTs at end of round.
 
Ya, I understand that. But I want one that slays JUST the CTs.

l33tnewb 09-25-2007 17:10

Re: Slay CTs at end of round.
 
ill think about doing it ok or if someone beats me to it

kewkies602 09-25-2007 18:07

Re: Slay CTs at end of round.
 
It would be greatly appreciated if u do make it for me!

Styles 09-25-2007 23:37

Re: Slay CTs at end of round.
 
Lets get his plugin started. Heres what I have. I don't think it will work but you can give it a try. It was last min created.

PHP Code:

#include <amxmodx>
#include <cstrike>

#define PLUGIN "Slay CT"
#define VERSION "1.0"
#define AUTHOR "Styles"


public plugin_init() 
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
/* 
    GHW Via aim for the event. 
    I haven't been around so im now restarting to code in pawn 
    */
    
register_event("SendAudio","round_end","a","2=%!MRAD_ctwin","2=%!MRAD_rounddraw")
}

public 
round_end()
{
    new 
player_num get_playersnum()
    new 
letsCount
    
    
while(letsCount player_num)
    {
        if(
is_user_alive(letsCount) && cs_get_user_team(letsCount) == CS_TEAM_CT)
        {
            
user_silentkill(letsCount)
            
letsCount++
        }
    }



ConnorMcLeod 09-26-2007 04:31

Re: Slay CTs at end of round.
 
You register the event with the name "newround" and your function is "round_end", so it won't work.

You can also register round end like this :
register_logevent("eRoundEnd", 2, "1=round_end")

Have a look at this great tut :
http://forums.alliedmods.net/showthread.php?t=42159

Arkshine 09-26-2007 05:26

Re: Slay CTs at end of round.
 
Code:
#include <amxmodx> public plugin_init() {     register_plugin( "Slay CT", "1.0", "Amxx Community" );     register_event( "SendAudio", "eRoundDraw", "a", "2=%!MRAD_rounddraw" ); } public eRoundDraw() {     new //  - - - - - - - - - - -         iPlayers[32],         iNum; //  - - - - - - - - - - -             get_players( iPlayers, iNum, "ae", "CT" );         for( new i; i < iNum; i++ )         user_silentkill( iPlayers[i] ); }

Styles 09-26-2007 13:20

Re: Slay CTs at end of round.
 
Yeah told you it was last min. I didn't even bother checking the funciton it was calling :P Mybad.

Thanks arkshine.

kewkies602 09-26-2007 23:25

Re: Slay CTs at end of round.
 
So do I copy arkshine's code or do I put it inside styles code?

*EDIT* I tested arkshine's contribute, but it didn't work... Please help.


All times are GMT -4. The time now is 09:27.

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