搜索
查看: 1385|回复: 1

[预先加满]大家试试这个插件 有效果不?

[复制链接]
发表于 2005-9-16 20:11:22 | 显示全部楼层 |阅读模式 来自 中国–北京–北京
大家试试这个插件 有效果不?以下为程序源码:#include <amxmod>单纯修改<amxmodx>是不行的。

#include <amxmod>
#include <amxmisc>
#include <fakemeta>

new fake_players = 0
new real_players = 0
new bool:fake_connecting
new fake_ids[33]

#define NUM_NAMES 134
new fake_names[NUM_NAMES][128] = {
"Beekon",
"drs",
"ERMAC",
"Havoc",
"Hypertron",
"ilbatting",
"kongedam",
"kowtow",
"Kreuger",
"latru",
"Solid Snake",
"Spetznaz_1",
"Steelwind",
"ST_jitch0t",
"tla-nick[OwP]",
"Toyota|MR2",
"TyrantII",
"Vandori",
"Lee",
"M3rCy",
"Mr.Pride",
"MrBlack",
"RagathoL",
"sharpsh0t",
"Sp33d",
"the prophet",
"XeRo",
"xerxes85",
"Young Al Capone",
"[AMD_Clan]Zeus",
"Tal Shiar",
"The-Preacher",
"The_Jester",
"Thrik",
"[B33R]Sledge",
"[EFR]The HEAD",
"[SWE30+]DD",
"[TpT]CodeyH",
"{SFA}Nod",
"|TiA|Coyote",
"Cheeto",
"Chuckles",
"CL1Ch3",
"Mr Carrot",
"oreo",
"PanzerKnacker",
"Penguin",
"Peter Cooper 6ABDiv",
"Shockwave",
"Silva",
"Soiled Undergarment",
"W7RE",
"Waffen-SS",
"Contra",
"|USMC|Shockwave",
"-=ss=-jimbob",
"-=]PK[=-SgtDeath[HR]",
"=([panzerskreke])=",
"A Very Large Rat",
"aliencowboy",
"AngryGopher",
"Animal Mother (NO)",
"Arc]i[Pello",
"BeeKeeper",
"Blizzard_Fox",
"Bowman",
"Castro",
"Cyric",
"Dan Williams",
"DaStompa",
"Digital Sentience",
"DocRage",
"Elmo",
"FuzzDad",
"Pod",
"Podunkian",
"Profe",
"RealyPssd",
"Relax-Zoring",
"reno42",
"severed baby heads",
"Ferguson",
"Sh3rlok",
"shocktart",
"Galdo",
"Silentkill",
"Silva",
"GI_Tombstone|Trojka",
"Gypter",
"HoleMan",
"Integrate",
"IschbindatOmega",
"johnbergdall",
"Kappa the imp",
"Killin is fun",
"Sheafer",
"Liquid_Nova",
"LiVinGHeLL",
"LIZARDKING*43*71*",
"Lt.Fenix",
"Lyter",
"sirhc",
"SOE.Nimzicki",
"Soldat",
"Sulla the Dictator",
"Teufelhunden",
"The Mole",
"TheSaint",
"SilentKilla",
"UberDave",
"Wagstanza",
"Marius",
"Mister Croup",
"Walt",
"White Wolf",
"xer0",
"yonderboy",
"[2ndRangers]Gunny",
"[BoB]Colt.",
"[R5]Rainbow_Phive",
"[TpF]-GeineD-[BoP]",
"|3/504th|Treesquid",
"Rickall2",
"Robert",
"Rotkopf",
"Rozdower",
"SAVARD",
"Schpine Lawnchair",
"Jackson",
"Xcept1",
"xXMaverickXx",
"[CS]molotov_billy",
"[R5]Rainbow_Phive",
"|506th|Plato"
}

public client_connect(id) {
        if(fake_connecting) {
                fake_connecting = false
                fake_ids[fake_players-1] = get_user_userid(id)
        } else {
                real_players++
                update_fake()
        }

        return PLUGIN_CONTINUE
}

public client_disconnect(id) {
        if(fake_connecting) {
                fake_connecting = false
        } else {
                real_players--
                update_fake()
        }

        return PLUGIN_CONTINUE
}

public update_fake() {
        new targetnum = floatround(0.3 * float(real_players), floatround_floor) + 1
        if(targetnum + real_players > get_maxplayers()-3)
                targetnum = get_maxplayers()-3-real_players

        if(targetnum > fake_players) {
                new addnum = targetnum-fake_players
                for(new i = 0; i < addnum; i++) {
                        create_fake()
                }
        } else if(targetnum < fake_players) {
                new removenum = fake_players-targetnum
                for(new i = 0; i < removenum; i++) {
                        remove_fake()
                }
        }
}

public create_fake() {
        fake_players++
        fake_connecting = true
        engfunc(EngFunc_CreateFakeClient, fake_names[random_num(0, NUM_NAMES-1)])
}

public remove_fake() {
        if(fake_players > 0) {
                fake_players--
                fake_connecting = true
                server_cmd("kick #%d", fake_ids[fake_players])
        }
}

public plugin_init() {
        register_plugin("Fake Clients","MM","doubleM")
        fake_players = 0
        real_players = 0
        fake_connecting = false
        set_task(1.0, "update_fake")

        return PLUGIN_CONTINUE
}
 楼主| 发表于 2005-9-16 20:27:32 | 显示全部楼层 来自 中国–北京–北京

回复: [预先加满]大家试试这个插件 有效果不?

观察者将服务器加满之后 每进一位玩家都会减少一位观察者
回复

使用道具 举报

游客
回复
您需要登录后才可以回帖 登录 | 注个册吧

快速回复 返回顶部 返回列表