下面是引用 s8720419 于 2010-01-22 20:28 发表的 : 有没有能丢弃,小枪的指令? 我捡到小枪时,小枪没丢掉,只有主枪有换到。 能教我怎么排吗,或者是打什么指令才有办法~ 谢谢。
const SECONDARY_WEAPONS_BIT_SUM = (1<<CSW_P228)|(1<<CSW_ELITE)|(1<<CSW_FIVESEVEN)|(1<<CSW_USP)|(1<<CSW_GLOCK18)|(1<<CSW_DEAGLE)
stock drop_secondary_weapons(id) { // Get user weapons static weapons[32], num, i, weaponid num = 0 // reset passed weapons count (bugfix) get_user_weapons(id, weapons, num) for (i = 0; i < num; i++) { weaponid = weapons if ((1<<weaponid) & SECONDARY_WEAPONS_BIT_SUM) { static wname[32] get_weaponname(weaponid, wname, sizeof wname - 1) engclient_cmd(id, "drop", wname) } } }
drop_secondary_weapons(id)