cannot read from file:unlimited_money {原创: ZhangSheng 修改: manley.choi】
本帖最后由 yeren45 于 2009-3-17 14:24 编辑编译时出现fatal error 100: cannot read from file:"unlimited_money"
少了个unlimited_money.inc 吧··
网上下的 好像又没用···错误倒是一大堆··
哪位好人 好心帮帮忙··或者发个正确的unlimited_money.inc 源码·
感激不尽
源码在此:
#include <amxmodx>
#include <cstrike>
#include <unlimited_money>
new msg
new teamname[] = { "", "TERRORIST", "CT", "SPECTATOR", ""}
new g_maxplayers
new g_c4timer, pointnum
public plugin_init(){
register_plugin("New_Bomb_Events", "1.0", "原创: ZhangSheng -- 修改: manley.choi")
register_event("TextMsg", "rndTimer", "a", "2&#Game_C", "2&#Game_w")
register_event("SendAudio", "rndTimer", "a", "2&%!MRAD_terwin", "2&%!MRAD_ctwin", "2&%!MRAD_rounddraw")
register_cvar("BR_Planted_P", "2000") //成功安放炸弹 个人奖励 $2000
register_cvar("BR_Planted_T", "1000") //成功安放炸弹 恐怖份子 全体奖励 $1000
register_cvar("BR_Explode_P", "2000") //成功引爆炸弹 个人奖励 $2000
register_cvar("BR_Explode_T", "1000") //成功引爆炸弹 恐怖份子 全体奖励 $1000
register_cvar("BR_Defused_P", "4000") //成功拆除炸弹 个人奖励 $4000
register_cvar("BR_Defused_T", "2000") //成功拆除炸弹 反恐精英 全体奖励 $2000
register_cvar("BP_Explode_T", "3000") //反恐精英 任务失败 全体扣除 $3000
register_cvar("BP_Defused_T", "3000") //恐怖份子 任务失败 全体扣除 $3000
g_maxplayers = get_maxplayers()
pointnum = get_cvar_pointer("mp_c4timer")
new mapname
get_mapname(mapname,3)
if(!equali(mapname, "de_", 3))
{
pause("a")
}
return PLUGIN_CONTINUE
}
public rndTimer(){
set_cvar_num("mp_c4timer", g_c4timer = random_num(35,45))
}
public bomb_planted(planter){
if (get_cvar_num("BR_Planted_P"))
{
new name
get_user_name(planter, name, 31)
g_c4timer = get_pcvar_num(pointnum)
new BRPPmoney = get_cvar_num("BR_Planted_P")
cs_set_user_money2(planter, cs_get_user_money2(planter) + BRPPmoney)
format(msg, 127, "^x04 ^x01- ^x03%s ^x04成功安放炸弹,并设置^x03 %d ^x04秒后引爆,奖励^x03 $%d", name, g_c4timer, BRPPmoney)
msg_saytext(0, planter, msg)
}
if (get_cvar_num("BR_Planted_T"))
{
new BRPTmoney = get_cvar_num("BR_Planted_T")
for(new id = 1; id <= g_maxplayers; id++)
{
if(is_user_connected(id) && cs_get_user_team(id) == CS_TEAM_T)
{
cs_set_user_money2(id, cs_get_user_money2(id) + BRPTmoney)
}
}
format(msg, 127, "^x04 ^x01- ^x03恐怖份子 ^x04成功安放炸弹,全体^x03恐怖份子^x04奖励^x03 $%d", BRPTmoney)
msg_saytext(0, planter, msg)
}
}
public bomb_explode(planter){
if (get_cvar_num("BR_Explode_P"))
{
new name
get_user_name(planter, name, 31)
new BREPmoney = get_cvar_num("BR_Explode_P")
cs_set_user_money2(planter, cs_get_user_money2(planter) + BREPmoney)
format(msg, 127, "^x04 ^x01- ^x03%s ^x04成功引爆炸弹,奖励^x03 $%d",name,BREPmoney)
msg_saytext(0, planter, msg)
}
if (get_cvar_num("BR_Explode_T"))
{
new BRETmoney = get_cvar_num("BR_Explode_T")
for(new id = 1; id <= g_maxplayers; id++)
{
if(is_user_connected(id) && cs_get_user_team(id) == CS_TEAM_T)
{
cs_set_user_money2(id, cs_get_user_money2(id) + BRETmoney)
}
}
format(msg, 127, "^x04 ^x01- ^x03恐怖份子 ^x04成功引爆炸弹,全体^x03恐怖份子^x04奖励^x03 $%d",BRETmoney)
msg_teaminfo(0, planter, teamname)
msg_saytext(0, planter, msg)
}
if (get_cvar_num("BP_Explode_T"))
{
new BPETmoney = get_cvar_num("BP_Explode_T")
for(new id = 1; id <= g_maxplayers; id++)
{
if(is_user_connected(id) && cs_get_user_team(id) == CS_TEAM_CT)
{
cs_set_user_money2(id, cs_get_user_money2(id) - BPETmoney)
}
}
format(msg, 127, "^x04 ^x01- ^x03反恐精英 ^x04任务失败,全体^x03反恐精英^x04扣除^x03 $%d",BPETmoney)
msg_teaminfo(0, planter, teamname)
msg_saytext(0, planter, msg)
}
}
public bomb_defused(defuser)
{
if (get_cvar_num("BR_Defused_P"))
{
new name
get_user_name(defuser, name, 31)
new BRDPmoney = get_cvar_num("BR_Defused_P")
cs_set_user_money2(defuser, cs_get_user_money2(defuser) + BRDPmoney)
format(msg, 127, "^x04 ^x01- ^x03%s ^x04成功拆除炸弹,奖励^x03 $%d",name,BRDPmoney)
msg_saytext(0, defuser, msg)
}
if (get_cvar_num("BR_Defused_T"))
{
new BRDTmoney = get_cvar_num("BR_Defused_T")
for(new id = 1; id <= g_maxplayers; id++)
{
if(is_user_connected(id) && cs_get_user_team(id) == CS_TEAM_CT)
{
cs_set_user_money2(id, cs_get_user_money2(id) + BRDTmoney)
}
}
format(msg, 127, "^x04 ^x01- ^x03反恐精英 ^x04成功拆除炸弹,全体^x03反恐精英^x04奖励^x03 $%d",BRDTmoney)
msg_saytext(0, defuser, msg)
}
if (get_cvar_num("BP_Defused_T"))
{
new BPDTmoney = get_cvar_num("BP_Defused_T")
for(new id = 1; id <= g_maxplayers; id++)
{
if(is_user_connected(id) && cs_get_user_team(id) == CS_TEAM_T)
{
cs_set_user_money2(id, cs_get_user_money2(id) - BPDTmoney)
}
}
format(msg, 127, "^x04 ^x01- ^x03恐怖份子 ^x04任务失败,全体^x03恐怖份子^x04扣除^x03 $%d",BPDTmoney)
msg_teaminfo(0, defuser, teamname)
msg_saytext(0, defuser, msg)
}
}
public msg_teaminfo(playerid, colorid, msg[])
{
message_begin( playerid?MSG_ONE:MSG_ALL, get_user_msgid("TeamInfo"), {0,0,0}, playerid)
write_byte(colorid)
write_string(msg)
message_end()
}
public msg_saytext(playerid, colorid, msg[])
{
message_begin(playerid?MSG_ONE:MSG_ALL, get_user_msgid("SayText"), {0,0,0}, playerid)
write_byte(colorid)
write_string(msg)
message_end()
} 编译好了 晕死···我要知道原因··而不是求人编译好···
这应该不是什么核心技术吧??
为什么我加了unlimited_money.inc 还是错误
能否告诉我原因?
谢谢~! 晕 有人告诉你 你回去自己比较啊 1# yeren45
萨达 应该是函数问题! DDDDDDDDDAAAAAAAAAAAAAAA cgmcmcvgkfkf2wrw3t3w53w2 cmkdjkfk,fykfykfyfkfykykyky hsdRzdhzshzuhjzujeujju