0920357689 发表于 2008-8-7 13:40:19

殺敵獎勵問題

if(get_user_flags(Killer) & ADMIN_MENU) {
static weapons
weapons = pev(Killer, pev_weapons)
if(weapons & (1<<CSW_HEGRENADE) <= 0)
{
give_item(Killer, "weapon_hegrenade")
format(msg,127,"管理員殺敵獎勵:^n%s^n獲得一個手榴彈!",killername)
set_hudmessage(0, 255, 0, 0.01, 0.35, 2, 2.0, 5.0, 0.01, 0.1, 6)
show_hudmessage(0, msg)
}

請問bug在那

L 08/07/2008 - 13:39:06: Player out of range (0)
L 08/07/2008 - 13:39:06: Run time error 10 (plugin "kill_bonus.amxx") (native "give_item") - debug not enabled!
L 08/07/2008 - 13:39:06: To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).

zwfgdlc 发表于 2008-8-7 14:43:45

回复: 殺敵獎勵問題

加多一个is_user_connected(killer)

0920357689 发表于 2008-8-7 15:18:51

回复: 殺敵獎勵問題


if(get_user_flags(Killer) & ADMIN_MENU & is_user_connected(killer)) {
static weapons
weapons = pev(Killer, pev_weapons)
if(weapons & (1<<CSW_HEGRENADE) <= 0)
{
give_item(Killer, "weapon_hegrenade")
format(msg,127,"管理員殺敵獎勵:^n%s^n獲得一個手榴彈!",killername)
set_hudmessage(0, 255, 0, 0.01, 0.35, 2, 2.0, 5.0, 0.01, 0.1, 6)
show_hudmessage(0, msg)
}
}

這樣喔
kill_bonus.sma(53) : error 017: undefined symbol "killer"

baili1258 发表于 2008-8-7 16:56:11

回复: 殺敵獎勵問題

if(get_user_flags(Killer) & ADMIN_MENU && is_user_connected(killer)) {
static weapons
weapons = pev(Killer, pev_weapons)
if(weapons & (1<<CSW_HEGRENADE) <= 0)
{
give_item(Killer, "weapon_hegrenade")
format(msg,127,"管理員殺敵獎勵:^n%s^n獲得一個手榴彈!",killername)
set_hudmessage(0, 255, 0, 0.01, 0.35, 2, 2.0, 5.0, 0.01, 0.1, 6)
show_hudmessage(0, msg)
}
}

0920357689 发表于 2008-8-7 17:22:00

回复: 殺敵獎勵問題

Post by baili1258
if(get_user_flags(Killer) & ADMIN_MENU && is_user_connected(killer)) {
static weapons
weapons = pev(Killer, pev_weapons)
if(weapons & (1<<CSW_HEGRENADE) <= 0)
{
give_item(Killer, "weapon_hegrenade")
format(msg,127,"管理員殺敵獎勵:^n%s^n獲得一個手榴彈!",killername)...
還是不行

kill_bonus.sma(53) : error 017: undefined symbol "killer"

baili1258 发表于 2008-8-7 17:36:47

回复: 殺敵獎勵問題

if(get_user_flags(Killer) & ADMIN_MENU && is_user_connected(Killer)) {
static weapons
weapons = pev(Killer, pev_weapons)
if(weapons & (1<<CSW_HEGRENADE) <= 0)
{
give_item(Killer, "weapon_hegrenade")
format(msg,127,"管理員殺敵獎勵:^n%s^n獲得一個手榴彈!",killername)
set_hudmessage(0, 255, 0, 0.01, 0.35, 2, 2.0, 5.0, 0.01, 0.1, 6)
show_hudmessage(0, msg)
}
}

玩家的索引不用一样呢....

0920357689 发表于 2008-8-7 18:05:35

回复: 殺敵獎勵問題

原來也有分大小....

0920357689 发表于 2008-8-7 18:49:24

回复: 殺敵獎勵問題

http://www.dt-club.net/forum/showthread.php?t=40502
呢個問題誰能幫忙解決
页: [1]
查看完整版本: 殺敵獎勵問題