|
发表于 2008-1-5 21:20:34
|
显示全部楼层
来自 智利
回复: 那位高手帮我写一个插件
好啦~ 现在拿去测试吧~ 其实我前天才开始学习amxx, 虽然我有27种语言基础, 但是也不知道是否正确, 如果有错, 请多多包涵..- #include <amxmodx>
- #include <amxmisc>
- #include <cstrike>
- public score_new() {
- if(read_data(2) == 50) {
- new playersCT[32]
- new playersT[32]
- new nbrCT, nbrT
- for(new i = 0; i < nbrCT; i++) {
- cs_set_user_team(playersCT[i], CS_TEAM_T)
- }
- for(new i = 0; i < nbrT; i++) {
- cs_set_user_team(playersT[i], CS_TEAM_CT)
- }
- set_cvar_string("sv_restart", "1")
- }
- return PLUGIN_CONTINUE
- }
- public plugin_init() {
- register_plugin("50 Rounds Swap Restart", "1.0", "Codetrinis")
- register_event("TeamScore", "score_new", "a")
- return PLUGIN_CONTINUE
- }
复制代码 |
|