搜索
查看: 2638|回复: 3

jim_yang来看看!!!!!!!!

[复制链接]
发表于 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]
发表于 2008-12-16 13:27:03 | 显示全部楼层 来自 中国–北京–北京–朝阳区

回复: jim_yang来看看!!!!!!!!

是我写的吗,我发烧也不会写出这种代码来吧,是不是被人改了
  1. #include <amxmodx>
  2. #include <cstrike>
  3. #include <engine>
  4. new g_t, g_ct
  5. new CsInternalModel:g_t_model
  6. new CsInternalModel:g_ct_model
  7. public plugin_init()
  8. {
  9. register_plugin("Random Team Leader","1.0","X-man")
  10. register_logevent("new_round",2,"0=World triggered","1=Round_Start")
  11. register_event("DeathMsg", "death", "a")
  12. }
  13. public client_disconnect(id)
  14. {
  15. if(id == g_ct)
  16.   g_ct = 0
  17. else if(id == g_t)
  18.   g_t = 0
  19. }
  20. public new_round()
  21. {
  22. if(get_playersnum() <= 2)
  23.   return
  24. new id, players[32], num
  25. get_players(players, num, "ae", "CT")
  26. g_ct = num == 1 ? players[0] : players[random_num(0, num - 1)]
  27. cs_set_user_team(g_ct, cs_get_user_team(id, g_ct_model), CS_CT_VIP)
  28. become_a_leader(g_ct, 0, 0, 255)
  29. get_players(players, num, "ae", "TERRORIST")
  30. g_t = num == 1 ? players[0] : players[random_num(0, num - 1)]
  31. cs_set_user_team(g_t, cs_get_user_team(id, g_t_model), CS_CT_VIP)
  32. become_a_leader(g_t, 255, 0, 0)
  33. }
  34. public become_a_leader(id, r, g, b)
  35. {
  36. entity_set_float(id, EV_FL_health, 200.0)
  37. cs_set_user_armor(id, 200, CS_ARMOR_VESTHELM)
  38. cs_set_user_money(id, 16000)
  39. set_rendering(id, kRenderFxGlowShell, r, g, b, kRenderNormal, 20)
  40. }
  41. public death()
  42. {
  43. new id = read_data(2)
  44. if(id == g_ct)
  45.   cs_set_user_team(id, CS_TEAM_CT, g_ct_model)
  46. else if(id == g_t)
  47.   cs_set_user_team(id, CS_TEAM_T, g_t_model)
  48. }
复制代码
回复

使用道具 举报

 楼主| 发表于 2008-12-16 23:12:23 | 显示全部楼层 来自 中国–湖北–黄冈

回复: jim_yang来看看!!!!!!!!

啊~不是你写的呀~?
我晕~对不起~估计是我看错聊!~
哈哈!~~谢谢!
回复

使用道具 举报

 楼主| 发表于 2008-12-17 00:14:25 | 显示全部楼层 来自 中国–湖北–黄冈

回复: jim_yang来看看!!!!!!!!

谁帮忙测试一下~插件正常加载了~为什么就一点效果也没呢?郁闷~~
谁帮忙测试一下!谢谢!
回复

使用道具 举报

游客
回复
您需要登录后才可以回帖 登录 | 注个册吧

快速回复 返回顶部 返回列表