jim_yang来看看!!!!!!!!
这是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, num
get_players(players, num, "ae", "CT")
g_ct = num == 1 ? players : players
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 : players
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)
}
}
无法编译出现的提示:
[//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]
回复: 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 client_disconnect(id)
{
if(id == g_ct)
g_ct = 0
else if(id == g_t)
g_t = 0
}
public new_round()
{
if(get_playersnum() <= 2)
return
new id, players, num
get_players(players, num, "ae", "CT")
g_ct = num == 1 ? players : players
cs_set_user_team(g_ct, cs_get_user_team(id, g_ct_model), CS_CT_VIP)
become_a_leader(g_ct, 0, 0, 255)
get_players(players, num, "ae", "TERRORIST")
g_t = num == 1 ? players : players
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)
if(id == g_ct)
cs_set_user_team(id, CS_TEAM_CT, g_ct_model)
else if(id == g_t)
cs_set_user_team(id, CS_TEAM_T, g_t_model)
}
回复: jim_yang来看看!!!!!!!!
啊~不是你写的呀~?我晕~对不起~估计是我看错聊!~
哈哈!~~谢谢!
回复: jim_yang来看看!!!!!!!!
谁帮忙测试一下~插件正常加载了~为什么就一点效果也没呢?郁闷~~谁帮忙测试一下!谢谢!
页:
[1]