|
发表于 2008-12-16 13:11:58
|
显示全部楼层
|阅读模式
来自 中国–湖北–黄冈
这是jim_yang 写的一个插件~觉得很好玩~弄下来去编译发现无法编译~还望jim_yang修改一下呀~
也请各位老大看看呀帮忙搞定一下~谢谢了~
#include <amxmodx>
#include <cstrike>
#include <engine>
new g_t, g_ct
new CsInternalModel:g_t_model
new CsInternalModel:g_ct_model
public plugin_init()
{
register_plugin("Random Team Leader","1.0","X-man")
register_logevent("new_round",2,"0=World triggered","1=Round_Start")
register_event("DeathMsg", "death", "a")
}
public new_round()
{
if(get_playersnum() <= 2)
return
new id, players[32], num
get_players(players, num, "ae", "CT")
g_ct = num == 1 ? players[0] : players[random_num(0, num - 1)]
cs_set_user_team(g_ct, cs_get_user_team(id, g_ct_model), CS_CT_VIP)
become_a_leader(g_ct, team, 0, 0, 255)
get_players(players, num, "ae", "TERRORIST")
g_t = num == 1 ? players[0] : players[random_num(0, num - 1)]
cs_set_user_team(g_t, cs_get_user_team(id, g_t_model), CS_CT_VIP)
become_a_leader(g_t, 255, 0, 0)
}
public become_a_leader(id, r, g, b)
{
entity_set_float(id, EV_FL_health, 200.0)
cs_set_user_armor(id, 200, CS_ARMOR_VESTHELM)
cs_set_user_money(id, 16000)
set_rendering(id, kRenderFxGlowShell, r, g, b, kRenderNormal, 20)
}
public death()
{
new id = read_data(2)
switch(id)
{
case: g_ct: cs_set_user_team(id, CS_TEAM_CT, g_ct_model)
case: g_t: cs_set_user_team(id, CS_TEAM_T, g_t_model)
}
}
无法编译出现的提示:
[QUOTE][//AMXXPC compile.exe
// by the AMX Mod X Dev Team
//// Random Team Leader1.sma
// D:\游戏\CS大全\scripting\Random Team Leader1.sma(22) : error 017: undefined s
ymbol "team"
// D:\游戏\CS大全\scripting\Random Team Leader1.sma(22) : warning 215: expressio
n has no effect
// D:\游戏\CS大全\scripting\Random Team Leader1.sma(22) : warning 215: expressio
n has no effect
// D:\游戏\CS大全\scripting\Random Team Leader1.sma(22) : warning 215: expressio
n has no effect
// D:\游戏\CS大全\scripting\Random Team Leader1.sma(22) : error 001: expected to
ken: ";", but found ")"
// D:\游戏\CS大全\scripting\Random Team Leader1.sma(22) : error 029: invalid exp
ression, assumed zero
// D:\游戏\CS大全\scripting\Random Team Leader1.sma(22) : fatal error 107: too m
any error messages on one line
//
// Compilation aborted.
// 4 Errors.
// Could not locate output file D:\游戏\CS大全\scripting\compiled\Random Team Le
ader1.amx (compile failed).
//
// Compilation Time: 0.11 sec
// ----------------------------------------
Press enter to exit .../QUOTE] |
|