插件融合問題
#include <amxmodx>#include <cstrike>
#include <unlimited_money>
#define MONEY 1000
public plugin_init(){
register_plugin("Bomb Reward","1.0","ZhangSheng")
return PLUGIN_CONTINUE
}
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) + MONEY)
}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元", MONEY)
format(msg, 255-iLen, "^n全體匪徒扣除金錢%d元", 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) + MONEY)
}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元", MONEY)
format(msg, 255-iLen, "^n全體警察扣除金錢%d元", 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 中文版自動生成*/
/* UTF-8 func by www.DT-Club.net */
#include <amxmodx>
#include <amxmisc>
#include <engine>
public plugin_init() {
register_plugin("AMX Slay Losers","1.76c","Dt_C.H.M")
register_event("SendAudio","end_round","a","2=%!MRAD_terwin","2=%!MRAD_ctwin","2=%!MRAD_rounddraw")
register_cvar("mp_slaylosers","1",FCVAR_SERVER)
return PLUGIN_CONTINUE
}
public end_round() {
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)
client_print(0,print_center,"* * *任務失敗方要被處死* * *")
}
}
/* 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 }
*/
請問怎樣才能合左一起....
要有
炸彈被爆後ct扣錢t加錢和炸彈被拆後ct加錢t扣錢
和任務失敗會有1000元輔助金
因為炸彈被拆或引爆 和時間到 而c4沒被安裝 這3個條件所以我不會合左一起
回复: 插件融合問題
/*****************************************************************************amxmodx插件 amxmodx 1.75 测试通过
*处死任务失败者
*来源: http://cs-friends.com.cn
*原来的 slaylosers 有时候会有问题,现在重新编写,使用方法和来的一样
*作者:iG_os ,version 0.1.16 2006-6-8 4:00
*Slay Losers Lite 精简版--加入杀玩家的枪声--,去掉了杀死玩家的特效和音效
* CVAR:mp_slaylosers 1(默认值) 是否打开功能
****************************************************************************/
#define PLUGIN"Friends_slaylosers"
#define VERSION "0.3.16"
#define AUTHOR"iG_os"
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <unlimited_money>
public End_terwin()
{
set_task(1.2,"Kill_losers",2) // 传送输的队伍 CT
return PLUGIN_CONTINUE
}
public End_ctwin()
{
set_task(1.2,"Kill_losers",1) // 传送输的队伍 T
return PLUGIN_CONTINUE
}
public Kill_losers(LoseTeam)
{
if(!get_cvar_num("mp_slaylosers"))
return
new name,team,msg
new numplayers = get_maxplayers()
for (new i=1; i<=numplayers;i++){
if (!is_user_connected(i)) continue
team = get_user_team(i)
if ((team==LoseTeam) && (is_user_alive(i))){
get_user_name(i,name,31)
cs_set_user_money2(i,0)
client_cmd(0, "spk ambience/mgun_burst2") //播放机枪声音
format(msg, 511,"^x03处死任务失败者【%s】并且没收所有金钱^x01",name)
client_color(0, msg)
user_kill(i,1) //不扣分
//user_kill(i,0) //失败者扣一分
}
}
}
public client_color(id,msg[]){
new playerslist,playerscount//,i
get_players(playerslist,playerscount,"c")
while(replace(msg,127,"0x01","^x01")){}
while(replace(msg,127,"0x02","^x02")){}
while(replace(msg,127,"0x03","^x03")){}
while(replace(msg,127,"0x04","^x04")){}
if(id==0){
message_begin(MSG_ALL, get_user_msgid("SayText"), {0,0,0},1)
write_byte(1)
write_string(msg)
message_end()
}
else{
message_begin(MSG_ONE, get_user_msgid("SayText"), {0,0,0}, id)
write_byte(id)
write_string(msg)
message_end()
}
}
public plugin_precache(){
precache_sound( "ambience/mgun_burst2.wav")
return PLUGIN_CONTINUE
}
public plugin_init()
{
register_plugin(PLUGIN,VERSION,AUTHOR)
register_event("SendAudio","End_terwin","a","2&%!MRAD_terwin")
register_event("SendAudio","End_ctwin","a","2&%!MRAD_ctwin")
register_cvar("mp_slaylosers","1",FCVAR_SERVER)
}
我服务器用的失败方处死插件,我自己写了一句没收所有金钱代码
回复: 插件融合問題
Post by zhangsheng/****************************************************************************
*amxmodx插件 amxmodx 1.75 测试通过
*处死任务失败者
*来源: http://cs-friends.com.cn
*原来的 slaylosers 有时候会有问题,现在重新编写,使用方法和来的一样
*作者:iG_os ,version 0.1.16 2006-6-8 4:00
*Slay Losers Lite 精简版--加入杀玩家的枪声--,去掉了杀死玩家的特效和音效
* CVAR: mp_...
那樣會變成很沒意思...一下就沒錢.....
页:
[1]