回合時間結束問題
public bomb_defusedc4被拆public bomb_explodec4被爆
public end_round 因時間到而回合結束
那有沒一個是炸彈沒被安裝而時間結束的函數?
回复: 回合時間結束問題
register_event("SendAudio","event_round_end","a","2&%!MRAD_terwin","2&%!MRAD_ctwin","2&%!MRAD_rounddraw")public event_round_end()
{
........................
}
回复: 回合時間結束問題
請問能不能幫我改改/* 本插件由 AMXX-Studio 中文版自動生成*/
/* UTF-8 func by www.DT-Club.net */
#include <amxmodx>
#include <amxmisc>
#include <engine>
#include <unlimited_money>
#define MONEY 1000
#define MONEY2 2000
public plugin_init() {
register_plugin("失敗處死加C4獎勵","1.76c","Dt_C.H.M")
register_event("SendAudio","event_round_end","a","2&%!MRAD_terwin","2&%!MRAD_ctwin","2&%!MRAD_rounddraw")
register_cvar("mp_slaylosers","1",FCVAR_SERVER)
return PLUGIN_CONTINUE
}
public event_round_end()
{
if( get_cvar_num("mp_slaylosers") == 1) {
new parm
read_data(2,parm,31)
set_task(1.0,"slay_those_losers",15120,parm, 31)
}
return PLUGIN_CONTINUE
}
public slay_those_losers(parm[])
{
new player, playersnum
get_players(player,playersnum,"ea",(parm == 't') ? "CT" : "TERRORIST" )
for(new i = 0; i < playersnum; ++i){
user_silentkill(player )
if (playersnum)
set_hudmessage(0,128,255,-1.0,0.65,0, 1.5, 5.0, 0.01, 0.01, 9)
show_hudmessage(id,"^n^n* * *任務失敗方要被處死* * *^n失敗者會有1000元輔助金")
//client_print(0,print_center,"* * *任務失敗方要被處死* * *")
}
}
public bomb_defused(defuser)
{
new CsTeams:team
for(new i=1;i<=32;i++)
{
if(!is_user_connected(i)) continue
team = cs_get_user_team(i)
if(team==CS_TEAM_CT){
cs_set_user_money2(i, cs_get_user_money2(i) + MONEY2)
}else if(team==CS_TEAM_T){
cs_set_user_money2(i, cs_get_user_money2(i) - MONEY)
}
}
new msg
new iLen = format(msg, 255, "炸彈被拆除")
iLen += format(msg, 255-iLen, "^n全體警察額外獎勵%d元", MONEY2)
format(msg, 255-iLen, "^n全體匪徒扣除金錢%d元^n* * *任務失敗方要被處死* * *", MONEY)
set_hudmessage(0,128,255,-1.0,0.65,0, 1.5, 5.0, 0.01, 0.01, 9)
show_hudmessage(0,msg)
}
public bomb_explode(planter, defuser)
{
new CsTeams:team
for(new i=1;i<=32;i++)
{
if(!is_user_connected(i)) continue
team = cs_get_user_team(i)
if(team==CS_TEAM_T){
cs_set_user_money2(i, cs_get_user_money2(i) + MONEY2)
}else if(team==CS_TEAM_CT){
cs_set_user_money2(i, cs_get_user_money2(i) - MONEY)
}
}
new msg
new iLen = format(msg, 255, "炸彈被引爆")
iLen += format(msg, 255-iLen, "^n全體匪徒額外獎勵%d元", MONEY2)
format(msg, 255-iLen, "^n全體警察扣除金錢%d元^n* * *任務失敗方要被處死* * *", MONEY)
set_hudmessage(0,128,255,-1.0,0.65,0, 1.5, 5.0, 0.01, 0.01, 9)
show_hudmessage(0,msg)
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ ansicpg936\\ deff0{\\ fonttbl{\\ f0\\ fnil\\ fcharset134 Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang2052\\ f0\\ fs16 \n\\ par }
*/
回复: 回合時間結束問題
自己试试看吧:embarrass回复: 回合時間結束問題
找到別的方法了.謝謝
页:
[1]