cs插件吧 关注:8,246贴子:88,508
  • 2回复贴,共1

【开源】传送到出生点 - ZTele(仿CSS僵尸乐园)

只看楼主收藏回复

就是一个pev的小插件.. 几分钟的事情.. 开着玩吧
希望大佬们勿喷 我还是个新手


1楼2017-10-05 12:48回复
    #include <amxmodx>
    #include <amxmisc>
    #include <cstrike>
    #include <fakemeta>
    #include <hamsandwich>
    #include <dhudmessage>
    #include <zombieplague>
    #define PLUGIN"[eG]传送出生点 - ZTele"
    #define AUTHOR"EmeraldGhost"
    #define VERSION"1.0"
    new Float:g_spawn_origin[33][3]
    new iTeleCount[33]
    new TASK_ZETELE = 3250010
    stock client_printc(const id, const string[], {Float, Sql, Resul,_}:...)
    {
    new msg[191], players[32], count = 1;
    vformat(msg, sizeof msg - 1, string, 3);
    replace_all(msg,190,"\g","^4");
    replace_all(msg,190,"\y","^1");
    replace_all(msg,190,"\t","^3");
    if(id)
    players[0] = id;
    else
    get_players(players,count,"ch");
    new index;
    for (new i = 0 ; i < count ; i++)
    {
    index = players[i];
    message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"),_, index);
    write_byte(index);
    write_string(msg);
    message_end();
    }
    }
    public plugin_init()
    {
    register_plugin(PLUGIN, VERSION, AUTHOR)
    register_clcmd("say /ZTele", "TeleToSpawn")
    register_clcmd("say !ZTele", "TeleToSpawn")
    register_clcmd("say_team /ZTele", "TeleToSpawn")
    register_clcmd("say_team !ZTele", "TeleToSpawn")
    register_clcmd("ZTele", "TeleToSpawn")
    RegisterHam(Ham_Spawn, "player", "fw_Spawn_Post", 1)
    register_event("ResetHUD","NewRound","be");
    }
    public fw_Spawn_Post(id)
    {
    pev(id, pev_origin, g_spawn_origin[id])
    }
    public NewRound(id) iTeleCount[id] = 0;
    public TeleToSpawn(id)
    {
    if(iTeleCount[id] < 3)
    {
    set_pev(id, pev_origin, g_spawn_origin[id])
    iTeleCount[id] ++
    client_printc(id, "\g[ZTele]\y 传送使用次数剩余\t %d/3 \y次.", iTeleCount[id])
    return;
    }
    else
    {
    client_printc(id, "\g[ZTele]\y 你的传送次数已用完 , 无法进行传送 .")
    }
    return;
    }


    3楼2017-10-05 12:50
    回复