請問我的sma有什麼問題

Home Home
引用 | 編輯 waipun
2011-07-28 17:45
樓主
推文 x0




複製程式
#include <amxmodx> 
#include <empty> 
#include <hamsandwich> 

new gash[33] 

public plugin_natives() 
{ 
register_native("ep_check_player_gash", "native_check_player_gash", 1) 
register_native("ep_set_player_gash", "native_set_player_gash", 1) 
} 

public plugin_init() 
{ 
register_plugin("gash", "1.0", "waipun") 
RegisterHam(Ham_Killed, "player", "fw_Player_kill") 
} 

public client_connect(id) 
{ 
set_hudmessage(200, 100, 0, 3.0, 0.35, 0, 6.0, 0.0, 0.1, 0.2,4) 
show_hudmessage(id,gash: %d,gash[id]) 
} 

public native_set_player_gash(id, set_gash) 
{ 
gash[id] = set_gash 
return PLUGIN_CONTINUE 
} 
public native_check_player_gash(id) 
{ 
return gash[id] 
} 
public fw_Player_kill(victim, attacker, shouldgib) 
{ 
gash[attacker]+1
return PLUGIN_CONTINUE 
}


獻花 x0
引用 | 編輯 史來姆
2011-07-28 17:53
1樓
  
show_hudmessage是顯示出string吧
string應有的" "去哪了

獻花 x0
引用 | 編輯 承。諾
2011-07-28 23:30
2樓
  
gash[attacker]+1

應該是

gash[attacker] += 1



獻花 x0