关于用刀杀人奖励8000的问题
首先,请斑竹别删此贴,潜力会员,其他版块都不能发帖,无奈,只得发到此处.....本人架设CS1.6魔兽服务器时在“刀杀奖励8000的”插件(suicidetext.amxx)上发现这个插件的提示是英文,如图。于是想改为中文的,但在cstrike\addons\amxmodx\data下并没有找到相关的suicidetext.txt,于是自行添加了该文件,并编辑如下:
KILLED_YOU_DIST = %suse knife kill player%s!!!^nwin$8000"
KILLED_YOU_DIST = %s用刀杀死player%s!!!^n奖励$8000
完了用UTF-8保存,进服后却发现什么也没改变,连乱码都没有,请各位达达帮忙解决下这个问题!到底该在哪里改,还是我编辑的不对? 没用过这插件把源码上传看看 晕,源码不能上传,我就把它写出来啦,请斑竹指教!!
/*==============================================================================
* Plugin name: Suicide Text 0.2+
* Made by: huyongbo
* Modules required: none
*===============================================================================*/
#include <amxmod>
public plugin_init() {
register_plugin("Suicide Text","0.2+","huyongbo")
register_logevent("DeathMsg",4,"1=committed suicide with")
register_event("DeathMsg","knife_kill","a","4&kni")
return PLUGIN_CONTINUE
}
public plugin_precache()
{
precache_sound( "djeyl/witch.wav")
return PLUGIN_CONTINUE
}
// when you die by falling somewhere off
public DeathMsg() {
new Arg1
read_logargv(0,Arg1,63)
new Name
parse_loguser(Arg1,Name,31)
client_cmd(0,"spk misc/witch")
set_hudmessage( 0, 255, 0, 0.02, 0.75, 1, 6.0, 6.0, 0.5, 0.15, 1);
show_hudmessage(0,"%sdead of high",Name)
return PLUGIN_HANDLED
}
// when someone knived
public knife_kill(){
new killer_id = read_data(1)
new victim_id = read_data(2)
new killer_name, victim_name
get_user_name(killer_id,killer_name,32)
get_user_name(victim_id,victim_name,32)
set_hudmessage(0, 255, 0, 0.02, 0.75, 1, 6.0, 6.0, 0.5, 0.15, 1)
show_hudmessage(0,"%suse knife kill player%s!!!^nwin$8000" ,killer_name ,victim_name)
set_user_money(killer_id,get_user_money(killer_id)+7700)
client_cmd(0,"spk vox/woop")
//return PLUGIN_HANDLED
} show_hudmessage(0,"%suse knife kill player%s!!!^nwin$8000" ,killer_name ,victim_name) 这一段自己琢磨 呵呵,我也想到这段了,并且试着改动为:show_hudmessage(0,"%s用刀杀死玩家%s!!!^n奖励$8000" ,killer_name ,victim_name) 用UTF-8保存编译后进F,还是一样,没作用哦! 额额
不会吧,我使用正常,不行的话 用我编译好的吧/*==============================================================================
* Plugin name: Suicide Text 0.2+
* Made by: huyongbo
* Modules required: none
*===============================================================================*/
#include <amxmod>
public plugin_init() {
register_plugin("Suicide Text","0.2+","huyongbo")
register_logevent("DeathMsg",4,"1=committed suicide with")
register_event("DeathMsg","knife_kill","a","4&kni")
return PLUGIN_CONTINUE
}
public plugin_precache()
{
precache_sound( "djeyl/witch.wav")
return PLUGIN_CONTINUE
}
// when you die by falling somewhere off
public DeathMsg() {
new Arg1
read_logargv(0,Arg1,63)
new Name
parse_loguser(Arg1,Name,31)
client_cmd(0,"spk misc/witch")
set_hudmessage( 0, 255, 0, 0.02, 0.75, 1, 6.0, 6.0, 0.5, 0.15, 1);
show_hudmessage(0,"%sdead of high",Name)
return PLUGIN_HANDLED
}
// when someone knived
public knife_kill(){
new killer_id = read_data(1)
new victim_id = read_data(2)
new killer_name, victim_name
get_user_name(killer_id,killer_name,32)
get_user_name(victim_id,victim_name,32)
set_hudmessage(0, 255, 0, 0.02, 0.75, 1, 6.0, 6.0, 0.5, 0.15, 1)
show_hudmessage(0,"%s用刀杀死玩家%s!!!^n奖励$8000" ,killer_name ,victim_name)
set_user_money(killer_id,get_user_money(killer_id)+7700)
client_cmd(0,"spk vox/woop")
//return PLUGIN_HANDLED
} 好,我试下你的。谢谢斑竹,不懂得不会得回来再请教!! OK,用斑竹改动得SMA文件编译后能改成中文显示了,谢谢斑竹!!!!
另外,想请教斑竹,你用得什么工具对SMA文件进行得编辑,保存为什么格式?
(我是先用记事本打开源码,编辑后保存为UTF-8,然后再用论坛下载的AmxxStudio1.4(源码编辑工具)打开,查看有无多出得字符和空格,并用SMA格式保存后可以正常编译,但服务器加载后还是显示英文,为什么会这样呢?我把我修改后得SMA文件和你修改后得对比了一下,你的大小是1.46kb,我的却是1.43kb,内容一样,大小却不一样,我的不能用,你的可以用,这是什么原因造成得?还请斑竹指教!!!) 路过。路人甲 没用过这插件!
页:
[1]
2