Raised This Month: $ Target: $400
 0% 

(REQ) Slay all at the end of the round


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
mando127
Veteran Member
Join Date: Dec 2006
Location: virginia
Old 04-15-2009 , 20:15   (REQ) Slay all at the end of the round
Reply With Quote #1

hi i need a real fast plugin made up need all players (ct)&(t) - admins (with ban flag) to be slayed at the end of each round.
__________________
mando127 is offline
Send a message via Skype™ to mando127
ZombieMan
Senior Member
Join Date: May 2008
Location: Italy.
Old 04-15-2009 , 20:26   Re: (REQ) Slay all at the end of the round
Reply With Quote #2

Try this
__________________
BACK TO BUSINESS

If you want to feel better give me + karma but ... don't forget to leave your name

DO NOT PM me for support
ZombieMan is offline
mando127
Veteran Member
Join Date: Dec 2006
Location: virginia
Old 04-15-2009 , 22:20   Re: (REQ) Slay all at the end of the round
Reply With Quote #3

no i mean auto slay at each round but not admins just players. cuz i run a zombie server and we runs lots of mods just for humans (lots of guns) and some of witch i don't want players reusing them so the idea poped up (auto slay) + we run death gribs so on the end of each round thare will be a mass blow up of gribs and blood all over.
__________________

Last edited by mando127; 04-15-2009 at 22:23.
mando127 is offline
Send a message via Skype™ to mando127
Emilioneri
Senior Member
Join Date: Feb 2009
Location: Georgia, Tbilisi
Old 04-16-2009 , 03:54   Re: (REQ) Slay all at the end of the round
Reply With Quote #4

I'm too noob
will this work
PHP Code:
/* Plugin generated by Emilioneri */

#include <amxmodx>
#include <amxmisc>

#define PLUGIN "Auto slay at round end"
#define VERSION "1.0"
#define AUTHOR "Emilioneri"


public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
// Add your code here...
    
register_logevent("Event_Round_End"2"1=Round_End")
}

public 
Event_Round_End(id)
{
    
client_cmd(id"kill")

__________________
Emilioneri is offline
Send a message via Skype™ to Emilioneri
hleV
Veteran Member
Join Date: Mar 2007
Location: Lithuania
Old 04-16-2009 , 05:17   Re: (REQ) Slay all at the end of the round
Reply With Quote #5

No, because RoundEnd logevent wont return any player ID.
Code:
#include <amxmodx>   #define DECREASE_FRAG; // Comment this if you don't want to decrease frag after slay   new g_MaxPlayers;   public plugin_init() {         register_plugin("Round End Slay", "1.0", "hleV");         register_logevent("RoundEnd", 2, "1=Round_End"); }   public plugin_cfg() g_MaxPlayers = get_maxplayers();   public RoundEnd(Client) for (Client = 1; Client <= g_MaxPlayers; Client++) if (is_user_alive(Client)) #if defined DECREASE_FRAG         user_kill(Client); #else         user_kill(Client, 1); #endif
__________________
hleV is offline
Dores
Veteran Member
Join Date: Jun 2008
Location: You really don't wanna k
Old 04-16-2009 , 10:09   Re: (REQ) Slay all at the end of the round
Reply With Quote #6

Writing codes like that, 1 line with a lot of conditions and keywords, is unreadable.
Try to not be cheap on spaces and curved braces, no matter how short the code is.
__________________
O o
/Ż________________________
| IMMA FIRIN' MAH LAZOR!!!
\_ŻŻŻ

Last edited by Dores; 04-16-2009 at 11:55.
Dores is offline
hleV
Veteran Member
Join Date: Mar 2007
Location: Lithuania
Old 04-16-2009 , 10:11   Re: (REQ) Slay all at the end of the round
Reply With Quote #7

Quote:
Originally Posted by Dores View Post
is highly unoptimized
Why?
__________________

Last edited by hleV; 04-16-2009 at 10:14.
hleV is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 04-16-2009 , 10:23   Re: (REQ) Slay all at the end of the round
Reply With Quote #8

Quote:
Originally Posted by Dores View Post
highly unoptimized and unreadable.
In this situation, I agree with the unreadable part. But the unoptimized part, how?
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 04-16-2009 , 10:56   Re: (REQ) Slay all at the end of the round
Reply With Quote #9

PHP Code:
#include <amxmodx>

new g_MaxPlayers;

public 
plugin_init() {
    
register_plugin("Round End Slay""1.0""hleV");
    
register_logevent("RoundEnd"2"1=Round_End");
    
    
g_MaxPlayers get_maxplayers(); // i dont see anyreason to make this in plugin_cfg
}

public 
RoundEnd( ) {
    for( new 
1<= g_MaxPlayersi++ )
        if( 
is_user_alive) )
            
user_killi);

LoL
__________________
xPaw is offline
hleV
Veteran Member
Join Date: Mar 2007
Location: Lithuania
Old 04-16-2009 , 11:30   Re: (REQ) Slay all at the end of the round
Reply With Quote #10

I don't see any reason to not make that in plugin_cfg. I just get messages' IDs, maxplayers and familiar things in plugin_cfg.
__________________
hleV 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 08:19.


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