First of all ... i would like to say ignore indentations , they dont mean much , anyways
PHP Code:
/* Autoslay by Hope
Will slay Nem or Sur in Nem/Surv. Mode when 3 rounds after the last same mode haven't past*/
#include <amxmodx>
#include <zombieplague>
#include <fakemeta>
#include <cstrike>
#define PLUGIN "[ZP] Auto Slay"
#define VERSION "1.0"
#define AUTHOR "Hope"
new i=1;
new pcvar;
new rounds;
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR);
pcvar = register_cvar("zp_auto_slay", "1"); // Enable/Disable Plugin
rounds = register_cvar("zp_rounds", "3"); // How many rounds should be no nem/sur after the last!
}
public plugin_cfg()
{
// Plugin is disabled
if (!get_pcvar_num(pcvar))
return;
}
public zp_round(gamemode, id)
{
if(gamemode != MODE_SURVIVOR)
{
if (i < rounds)
{
i=1;
new uid;
static name[32], authid[32];
get_user_name (id, name, 32);
uid = get_user_authid(id, authid, 32);
server_cmd("amx_slay #%d", uid)
client_print(0,print_chat,"%s have been slayed for making Survivor to early!", name);
}
}
if(gamemode != MODE_NEMESIS)
{
if (i < rounds)
{
i=1;
new uid;
static name[32], authid[32];
get_user_name (id, name, 32);
uid = get_user_authid(id, authid, 32);
server_cmd("amx_slay #%d", uid)
client_print(0,print_chat,"%s have been slayed for making Nemesis to early!", name);
}
}
if(gamemode != MODE_INFECTION)
{i++;
}
if(gamemode != MODE_SWARM)
{i++;
}
if(gamemode != MODE_PLAGUE)
{i++;
}
if(gamemode != MODE_MULTI)
{i++;
}
if(gamemode != MODE_PLAGUE)
{i++;
}
}
__________________