弒血
|
分享:
▼
x3
|
[插件] 補給箱丟武器指令教學
今天我要教大家的是補給箱武器丟掉指令,也就是設定補給箱撿取後,會把手上的武器丟棄,撿取補給箱內的武器指令。 我先打上武器丟棄指令; drop_primary_weapons(id) //丟棄主要武器指令 drop_secondary_weapons(id) //丟棄小槍武器指令 drop_current_weapon(id) //丟棄手上拿的槍指令以上紅色的那三行是武器的丟棄指令。請大家在dtgift_weapons的sma檔裡加入以下的指令:const PRIMARY_WEAPONS_BIT_SUM = (1<<CSW_SCOUT)|(1<<CSW_XM1014)|(1<<CSW_MAC10)|(1<<CSW_AUG)|(1<<CSW_UMP45)|(1<<CSW_SG550)| (1<<CSW_GALIL)|(1<<CSW_FAMAS)|(1<<CSW_AWP)|(1<<CSW_MP5NAVY)|(1<<CSW_M249)|(1<<CSW_M3)|(1<<CSW_M4A1)|(1<<CSW_TMP)| (1<<CSW_G3SG1)|(1<<CSW_SG552)|(1<<CSW_AK47)|(1<<CSW_P90) 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_primary_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) & PRIMARY_WEAPONS_BIT_SUM) { static wname[32] get_weaponname(weaponid, wname, sizeof wname - 1) engclient_cmd(id, "drop", wname) } } }stock drop_current_weapon(id) { static weapon_id, clip, ammo weapon_id = get_user_weapon(id, clip, ammo) if (((1<<weapon_id) & PRIMARY_WEAPONS_BIT_SUM) || ((1<<weapon_id) & SECONDARY_WEAPONS_BIT_SUM)) { static weapon_name[32] get_weaponname(weapon_id, weapon_name, sizeof weapon_name - 1) engclient_cmd(id, "drop", weapon_name) } }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) } } }我先示範輸入指令:public get_sg552( id){ drop_primary_weapons(id) ←這個是主槍丟棄指令 give_item( id, "weapon_sg552"); give_item( id, "ammo_556nato"); give_item( id, "ammo_556nato"); give_item( id, "ammo_556nato");上方的紅色代表是主武器丟棄指令:public get_de( id){ drop_secondary_weapons(id) ←這個是小槍丟棄指令 give_item( id, "weapon_deagle"); give_item( id, "ammo_50ae"); give_item( id, "ammo_50ae"); give_item( id, "ammo_50ae"); give_item( id, "ammo_50ae");這個紅色代表是小槍丟棄指令。記得要把指令排在補給箱,武器前面別亂排,要不然撿到後會亂丟要打指令前,記得要分清楚 主槍跟 小槍。重點:您的回覆或是推薦是我發教學的動力來源
|
|
x1
[樓 主]
From:台灣中華電信 | Posted:2010-01-23 21:00 |
|
|
|