zlove84 发表于 2010-4-18 01:40:36

求修改R3插件

原来插件为使用amxx权限来直接开启插件 amx_restartgame
求高人修改为使用rcon 也可以开启,谢谢,附源码:

/* AMXMOD script.
*
* (c) Copyright 2000-2002, BenZoN - Rich - Shift
* This file is provided as is (no warranties).
*
*   v0.5 - Password shown only to teamed players ( not HLTV )
*
*   v0.4 - Initial Release
*
*/

#include <amxmod>
#include <amxmisc>

public amx_restartgame(id,level,cid)
{
    if (!cmd_access(id,level,cid,0))
    {
      return PLUGIN_CONTINUE
    }
    set_hudmessage(0, 200, 0, -1.0, 0.40, 0, 6.0, 6.0, 0.1, 0.1, 1)
    show_hudmessage(0,"Live on Three Restarts")
    set_task(3.0, "rround")
    set_task(6.0, "rround")
    set_task(9.0, "rround")
    set_task(11.0, "lmessage")
    return PLUGIN_HANDLED
}

public rround()
{
    server_cmd("sv_restartround 1")
}

public lmessage()
{
    new sv_pass, players, playernum
    set_hudmessage(0, 200, 0, -1.0, 0.40, 0, 6.0, 6.0, 0.1, 0.1, 3)
    show_hudmessage(0,"WE ARE LIVE AND THE FIGHT IS ON !")
    get_cvar_string("sv_password",sv_pass,32)
    set_hudmessage(255, 255, 255, -1.0, 0.80, 0, 6.0, 6.0, 0.1, 0.1, 4)
    get_players(players,playernum)
    for(new a = 1; a < playernum; ++a)
    {
      if ( get_user_team(players) < 3 )
      {
            show_hudmessage(players,"Server Password: %s",sv_pass)
      }
    }
}

public plugin_init()
{
    register_plugin("Restart Game","0.5","BenZoN - Rich - Shift")
    register_clcmd("amx_restartgame","amx_restartgame",ADMIN_CFG,"amx_restartgame - Tripple Restart For Match")
    return PLUGIN_CONTINUE

wfwt 发表于 2010-4-18 13:37:03

1.5能用吗 !!!

zlove84 发表于 2010-4-19 20:23:47

1.5能用,我就是想可以使用rcon 也可以调用R3插件

22219822 发表于 2010-5-27 10:57:51

http://www.dt-club.net/forum/viewthread.php?tid=48188
页: [1]
查看完整版本: 求修改R3插件