AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Help With Slay All Script (https://forums.alliedmods.net/showthread.php?t=85738)

shadow.hk 02-15-2009 08:38

Help With Slay All Script
 
I've only just started scripting (2 days ago) and I need one small code or snippet. I want to make a function to kill everyone on round-end. Except I don't know how...

Here's the code I've made so far (this was my second attempt at a plugin)

PHP Code:

/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <amxmisc>
#define PLUGIN "Round-End Death"
#define VERSION "1.0"
#define AUTHOR "shadow.hk"
new const death_warning[] = "There's 10 Seconds Remaining Before CombatZone Boredom Kills You!"
public plugin_init()
{
 
register_plugin(PLUGINVERSIONAUTHOR)
 
register_logevent("event_round_start",2,"0=World triggered","1=Round_Start");
 
register_logevent("event_round_death",2,"0=World triggered","1=Round_Draw");
}
public 
event_round_start()
{
 
set_task(135.0,"warning_message")
}
public 
warning_message()
{
 
set_hudmessage(255255255, -1.0, -1.006.03.5 0.75 0.75)
 
show_hudmessage(0"[CZ] %s"death_warning)
}
public 
event_round_death(index)
{
 


ANY help would be greatly appreciated :(

SnoW 02-15-2009 09:34

Re: Help With Slay All Script
 
In round end:
Code:

new max = get_maxplayers()
for(new i = 1; i <= max; i++)
    if(is_user_alive(i))
          user_kill(i, <1 or 0>); //Just set the decrease or not flag



All times are GMT -4. The time now is 16:51.

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