弑血
|
分享:
▼
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 |
|
|
|