lili2009 发表于 2012-6-3 23:18:15

有乱码啊啊啊啊

本帖最后由 lili2009 于 2012-6-3 23:29 编辑

http://user.qzone.qq.com/470998550/photo/V116GVVY2UKTyD/NDFiFt4SHHCCy09UeKwsQ.L4hP8iAAA!/

lili2009 发表于 2012-6-3 23:42:24

经1.8.1编辑,出错!

hackroad 发表于 2012-6-4 00:05:01

lili2009 发表于 2012-6-3 21:52 static/image/common/back.gif
请高手看下!哪里出错。




#include <amxmodx>
#include <amxmisc>
#define PLUGIN_NAME "Flag Name"
#define PLUGIN_VERSION "1.0"
#define PLUGIN_AUTHOR "zwfgdlc"
public plugin_init()
{
register_plugin(PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR);
server_cmd("mp_limitteams 1")
register_event("TeamInfo","join_team","a","2!UNASSIGNED","2!SPECTATOR")
}
public join_team()
{
new id=read_data(1)
new team
read_data(2,team,15)
AddTag(id,team);
client_print(id,print_console,"你已经加入了%s",team)
}
public AddTag(id,team[])
{
new temp,name,tag
get_user_info(id,"name",name,31)
copy(temp,5,name)
if(equali(team,"CT"))
{
if(equal(temp,""))
{
return;
}else if(contain(temp,"")!=-1){
copy(temp,5,name);
if(equal(temp,""))
format(tag,31," %s",name);
}else{
format(tag,31," %s",name);
}
set_user_info(id,"name",tag)
}
if(equali(team,"TERRORIST"))
{
if(equal(temp,""))
{
format(tag,31," %s",name);
}else if(contain(temp,"")!=-1){
copy(temp,5,name)
if(equal(temp,""))
return;
}else{
format(tag,31," %s",name);
}
set_user_info(id,"name",tag)
}
}
public client_infochanged(id)
{
if(!is_user_connected(id))
return PLUGIN_CONTINUE;

new oldname,newname,team
get_user_name(id,oldname,31)
get_user_info(id,"name",newname,31)
if(!equal(oldname,newname))
{
get_user_team(id,team,15);

if(!is_user_alive(id))
{
message_begin(MSG_BROADCAST, get_user_msgid("SayText"))
write_byte(id)
write_string("#Cstrike_Name_Change")
write_string(oldname)
write_string(newname)
message_end()
}
}
AddTag(id,team)
return PLUGIN_CONTINUE
} 编译无错,正常使用。

lili2009 发表于 2012-6-4 22:24:11

本帖最后由 lili2009 于 2012-6-4 22:25 编辑

编辑是可以的,在游戏里就不行了!http://b223.photo.store.qq.com/psb?/V116GVVY2UKTyD/ve.SQh6z0kXUNNPYRkm3AwpCqPYOzerzKYF*n1jSszc!/b/YVAn7oRzIgAAYkPi.IT*IgAA

lili2009 发表于 2012-6-6 19:46:09

你好!hackroad!代码可以编辑,但队标没起作用。CS1.5谢谢!

zhangsheng 发表于 2012-6-8 20:54:39

试试这个版本的

726691010 发表于 2012-6-8 21:30:26

zhangsheng 发表于 2012-6-8 20:54 static/image/common/back.gif
试试这个版本的

CS1.5也能用嗎?

zhangsheng 发表于 2012-6-8 21:52:22

能啊有什么不能用的

lili2009 发表于 2012-6-9 00:17:25

TAG Unregistered Persons.sma怎么用的啊!请详细好吗?immune_names.txt怎么用。

zhangsheng麻烦你明细下,大家好明白。万分感激!

zhangsheng 发表于 2012-6-9 00:27:49

默认队标是如果玩家也带有这个队标名字进入服务器的话。是不会在执行的,会自动检测是否存在这个队标名字了,建立1个immune_names.txt到amxmodx\configs目录,immune_names.txt是排除不需要设置队标的玩家名字从上到下的写
例子
name1
name2
name3
name4
页: 1 [2] 3
查看完整版本: 【求助】玩家名字前面加队标