xxfeng
|
分享:
x0
|
[CS1.6] 帮忙修改下生化模式下进服务器自动复活的差劲
我有个进服务器复活的插件。可是在复仇者模式下会复活成僵尸。破坏了游戏规则。所以我想添加一个判断是复仇模式下就复活成人类。其他模式下复活成僵尸。
#include < amxmodx > #include < zombieplague >
new g_TeamJoin[33] public plugin_init() { register_plugin("进服复活", "2.0", "xxfeng") register_event( "TeamInfo" , "fwPlayerJoinedTeam" , "a" , "2=TERRORIST" , "2=CT") } public client_connect(HelloAlliedmods) g_TeamJoin[HelloAlliedmods] = 0 public fwPlayerJoinedTeam() { static id id = read_data(1) if (!g_TeamJoin[id]) { g_TeamJoin[id] = 1 } else { g_TeamJoin[ id ] = 0 set_task( 10.0, "respawn_player", id) } } public respawn_player(index) if( zp_has_round_started( ) ) set_task (1.0, "respawn_player2", index) public respawn_player2(gamemode) { if (gamemode = MODE_NEMESIS) { zp_respawn_user( gamemode , ZP_TEAM_HUMAN ) } else { zp_respawn_user( gamemode , ZP_TEAM_ZOMBIE ) }
|