換隊插件老是有問題
那里錯了...完全看不出另外出現排位錯誤......#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#define PLUGINNAME "CHANGE TEAM"
#define VERSION "1.0"
#define AUTHOR "ToKyo"
public plugin_init()
{
register_plugin( PLUGINNAME, VERSION, AUTHOR )
register_clcmd("say /ct","ct")
register_clcmd("say /ts","ts")
}
public ts(id)
{
if (cs_get_user_team(id) == CS_TEAM_T)
{
client_print(id,print_chat,"提示: 你現正在TS隊伍")
return PLUGIN_CONTINUE
}
else
{
cs_set_user_team(id, CS_T_GUERILLA)
cs_reset_user_model(id)
user_kill(id, 1)
if (is_user_alive(id))
{
user_kill(id, 1)
}
}
return PLUGIN_CONTINUE
}
public ct(id)
{
if (cs_get_user_team(id) == CS_TEAM_CT)
{
client_print(id,print_chat,"提示: 你現正在CT隊伍")
return PLUGIN_CONTINUE
}
else
{
cs_set_user_team(id, CS_CT_GSG9)
cs_reset_user_model(id)
user_kill(id, 1)
if (is_user_alive(id))
{
user_kill(id, 1)
}
}
return PLUGIN_CONTINUE
} #include <amxmodx>
#include <amxmisc>
#include <cstrike>
#define PLUGINNAME "CHANGE TEAM"
#define VERSION "1.0"
#define AUTHOR "ToKyo"
public plugin_init()
{
register_plugin( PLUGINNAME, VERSION, AUTHOR )
register_clcmd("say /ct","ct")
register_clcmd("say /ts","ts")
}
public ts(id)
{
if (cs_get_user_team(id) == CS_TEAM_T)
{
client_print(id,print_chat,"提示: 你現正在TS隊伍")
}
else
{
cs_set_user_team(id, CS_TEAM_T, CS_T_GUERILLA)
cs_reset_user_model(id)
user_kill(id, 1)
if (is_user_alive(id))
{
user_kill(id, 1)
}
}
return PLUGIN_CONTINUE
}
public ct(id)
{
if (cs_get_user_team(id) == CS_TEAM_CT)
{
client_print(id,print_chat,"提示: 你現正在CT隊伍")
return PLUGIN_CONTINUE
}
else
{
cs_set_user_team(id, CS_TEAM_CT, CS_CT_GSG9)
cs_reset_user_model(id)
user_kill(id, 1)
if (is_user_alive(id))
{
user_kill(id, 1)
}
}
return PLUGIN_CONTINUE
}
cs_set_user_team(玩家索引, 队伍, 皮肤) 原來這里寫錯了...
我還以為是其他地方錯了
感謝喔...3蕉 为什么不2个合并在一起?
say /change就够了。 我比較想分開@_@
页:
[1]