引用 | 编辑
观众甲
2012-06-25 18:01 |
楼主
▼ |
||
![]() 我从Deathrun提取了TR Fake player,可以增加,但是希望可以美化一下 请问谁可以帮我写一个 如果TR"玩家"=0的话,移除BOT,>= 1的话,增加BOT 目的是用在建造基地,防止tr死光之后就完结 但是,如果有玩家先进入CT,就会连接游戏,而下一个玩家进入TR的时候,就不会自动刷新(建造时间不够或者没有建造时间) 这是我唯一想到的办法,希望大大可以帮忙写出来 ![]()
|
引用 | 编辑
tw2twtw
2012-06-25 22:23 |
1楼
▲ ▼ |
client_putinserver和client_disconnect插件里面应该就有了,把内容放进去即可
public client_putinserver(id) { //如果此玩家进入后,没有任何TR-BOT,把BOT设为1 new ts_num, ts_bot get_in_players(id, ts_bot, ts_num) if(ts_bot == 0) server_cmd("bot_quota 1") } public client_disconnect(id) { //如果此玩家离开后,没有任何TR玩家,把BOT设为0 new ts_num, ts_bot get_in_players(id, ts_bot, ts_num) if(ts_num == 0) server_cmd("bot_quota 0") } stock get_in_TRplayers(id, &ts_bot, &ts_num) { ts_num = 0 ts_bot = 0 for (new i = 1; i <= g_maxplayers; i++) { if (!is_user_connected(i) || i == id) continue; if (cs_get_user_team(i) == CS_TEAM_T) { if(is_user_bot(i)) ts_bot++ else ts_num++ } } } ![]() |