精品 源码中文问题
谁知道源码里的中文怎么写,在游戏里能让人看见! 例如不是VIP按i 件 出现【提示】您不是VIP 无需按键! 怎么该这句话的中文? #include <amxmisc>#include <engine>
#include <hamsandwich>
#include <fakemeta>
#include <cstrike>
#include <colorChat>
new jumpnum
new bool:dojump
new allowMj
new gCost = 800,//价格
gAcce = ADMIN_KICK // 权限c
public plugin_init(){
register_plugin(" Multi Jump","0.1","xy")
RegisterHam(Ham_Spawn, "player", "fwPlayerSpawn", 1)
register_cvar("amx_maxjumps","1")//可在空中跳多少次
register_clcmd("say /mj","cmdBuyMj")
}
public fwPlayerSpawn(id) allowMj = 0
public cmdBuyMj(id){
if(!access(id,gAcce)){
client_print(id,print_center,"【ace军团提示】您不是VIP 无需按键!")
return 1
}
new um = cs_get_user_money(id) - gCost
if(um < 0){
client_print(id,print_center,"【ace军团提示】金币不足")
return 1
}
if(allowMj){
client_print(id,print_center,"【ace军团提示】你已经购买了高跳卡")
return 1
}
allowMj = 1
cs_set_user_money(id,um)
new name
get_user_name(id,name,31)
ColorChat(id, GREEN, "^x04【ace军团提示】^x03 %s ^x04购买了一张^x03【高跳卡】^x01他可能在某处阴人,大家小心!",name)
return 1
}
public client_putinserver(id){
allowMj = jumpnum = 0
dojump = false
}
public client_disconnect(id)
{
jumpnum = 0
dojump = false
}
public client_PreThink(id){
if(!allowMj) return
new nbut = get_user_button(id)
new obut = get_user_oldbutton(id)
if((nbut & IN_JUMP) && !(get_entity_flags(id) & FL_ONGROUND) && !(obut & IN_JUMP))
{
if(jumpnum < get_cvar_num("amx_maxjumps"))
{
dojump = true
++jumpnum
return
}
}
if((nbut & IN_JUMP) && (get_entity_flags(id) & FL_ONGROUND))
jumpnum = 0
}
public client_PostThink(id)
{
if(dojump)
{
new Float:velocity
entity_get_vector(id,EV_VEC_velocity,velocity)
velocity = random_float(265.0,285.0)
entity_set_vector(id,EV_VEC_velocity,velocity)
dojump = false
return
}
}
另存为 UTF8-无BOM 格式,然后编译即可。
client_cmd
register_clcmd
client_print
要用到这3个函数
楼上正解,但是如果应该有了client_cmd,和register,那么就要用client_print(id,"【提示】您不是VIP 无需按键!),id是索引,建议你把源码发上来 #include<amxmisc>
#include<engine>
#include<hamsandwich>
#include<fakemeta>
#include<cstrike>
#include<colorChat>
new jumpnum
new bool:dojump
new allowMj
new gCost = 800,//浠锋牸
gAcce = ADMIN_KICK // 鏉冮檺c
public plugin_init(){
register_plugin(" Multi Jump","0.1","xy")
RegisterHam(Ham_Spawn, "player", "fwPlayerSpawn", 1)
register_cvar("amx_maxjumps","1")//鍙湪绌轰腑璺冲灏戞
register_clcmd("say /mj","cmdBuyMj")
}
public fwPlayerSpawn(id) allowMj = 0
public cmdBuyMj(id){
if(!access(id,gAcce)){
client_print(id,print_center,"姝や负浼氬憳閬撳叿,闇€鎺堟潈")
return 1
}
new um = cs_get_user_money(id) - gCost
if(um < 0){
client_print(id,print_center,"閲戝竵涓嶈冻")
return 1
}
if(allowMj){
client_print(id,print_center,"浣犲凡缁忚喘涔颁簡楂樿烦鍗?)
return 1
}
allowMj = 1
cs_set_user_money(id,um)
new name
get_user_name(id,name,31)
ColorChat(id, GREEN, "^x04鈥荤偣鐑熸彁绀衡€籢x03 %s ^x04璐拱浜嗕竴寮燸x03銆愰珮璺冲崱銆?^x01浠栧彲鑳藉湪鏌愬闃翠汉,澶у灏忓績!",name)
return 1
}
public client_putinserver(id){
allowMj = jumpnum = 0
dojump = false
}
public client_disconnect(id)
{
jumpnum = 0
dojump = false
}
public client_PreThink(id){
if(!allowMj) return
new nbut = get_user_button(id)
new obut = get_user_oldbutton(id)
if((nbut & IN_JUMP) && !(get_entity_flags(id) & FL_ONGROUND) && !(obut & IN_JUMP))
{
if(jumpnum < get_cvar_num("amx_maxjumps"))
{
dojump = true
++jumpnum
return
}
}
if((nbut & IN_JUMP) && (get_entity_flags(id) & FL_ONGROUND))
jumpnum = 0
}
public client_PostThink(id)
{
if(dojump)
{
new Float:velocity
entity_get_vector(id,EV_VEC_velocity,velocity)
velocity = random_float(265.0,285.0)
entity_set_vector(id,EV_VEC_velocity,velocity)
dojump = false
return
}
} 我想改成【ACE军团提示】 本帖最后由 机子卡大叔 于 2016-8-23 13:10 编辑
15522943239 发表于 2016-8-23 09:49
我想改成【ACE军团提示】
这不是连跳卡吗?我看看,你是想改成按i就提示【ace军团提示】你不是【提示】您不是VIP无需按键!? k1nader 发表于 2016-8-23 14:22
#include
#include
#include
厉害你能看懂那个好像中文的代码啊? 15522943239 发表于 2016-8-23 18:56
厉害你能看懂那个好像中文的代码啊?
你这个明显是乱码了呀 , 下载一个专业的编辑器,转换下就好了。 好贴!每日一赞!每日一顶!每日一日!每日一操!
页:
[1]
2