|
发表于 2007-7-27 02:10:04
|
显示全部楼层
|阅读模式
来自 中国–广东–佛山–三水区
如果自己改成中文编译就会出现代码缩进不能编译的!怎样改才可以?
[PHP]#include <amxmod>
#include <csstats>
new g_round
public plugin_init(){
register_plugin("First Shot","1.0","ahcat")
register_event("DeathMsg", "hook_death", "a")
register_logevent("hook_roundstart",2,"0=World triggered","1=Round_Start")
g_round = 0
}
public hook_death(){
if (g_round!=0)
return PLUGIN_HANDLED
new Killer = read_data(1)
new Victim = read_data(2)
if(Killer==Victim)
return PLUGIN_HANDLED
new x = random_num(50, 900000)
set_user_money(Killer,x+get_user_money(Killer))
new p_name[32]
get_user_name(Killer,p_name,31)
set_hudmessage(100,100,255,0.03, 0.31, 0, 6.0, 10.0, 0.1, 0.2, 3)
show_hudmessage(0, "%s Kills enemy bravely !! And be award %d Dollars by Server",p_name,x)
client_cmd(0,"spk misc/coin01,x")
g_round = 1
return PLUGIN_HANDLED
}
public hook_roundstart(){
g_round = 0
}
public plugin_precache(){
precache_sound( "misc/coin01.wav")
return PLUGIN_CONTINUE
}[/PHP] |
|