您好
若槍枝太多 您要刪除的話
恩.... 舉例來說
----------------------------------------------------
case 1:
{
drop_weapons(id, 1)
fm_give_item(id, "weapon_mp5navy")
fm_give_item(id, "ammo_9mm")
fm_give_item(id, "ammo_9mm")
fm_give_item(id, "ammo_9mm")
fm_give_item(id, "ammo_9mm")
client_print(0, print_center, "%s 撿到一把MP5 衝鋒槍", name)
}
case 2:
{
drop_weapons(id, 1)
fm_give_item(id, "weapon_sg552")
fm_give_item(id, "ammo_556nato")
fm_give_item(id, "ammo_556nato")
fm_give_item(id, "ammo_556nato")
fm_give_item(id, "ammo_556nato")
client_print(0, print_center, "%s 撿到一把SIG552 近狙型步槍", name)
} case 3:
{
drop_weapons(id, 1)
fm_give_item(id, "weapon_mac10")
fm_give_item(id, "ammo_45acp")
fm_give_item(id, "ammo_45acp")
fm_give_item(id, "ammo_45acp")
fm_give_item(id, "ammo_45acp")
client_print(0, print_center, "%s 撿到一把MAC10 小型衝鋒槍", name)
}
----------------------------------------------------
把紅色粗體字部份 刪除
而 編號 3 的部份 就改成 編號 2
----------------------------------------------------
case 1:
{
drop_weapons(id, 1)
fm_give_item(id, "weapon_mp5navy")
fm_give_item(id, "ammo_9mm")
fm_give_item(id, "ammo_9mm")
fm_give_item(id, "ammo_9mm")
fm_give_item(id, "ammo_9mm")
client_print(0, print_center, "%s 撿到一把MP5 衝鋒槍", name)
}
case 3:
# 3 > 2
{
drop_weapons(id, 1)
fm_give_item(id, "weapon_mac10")
fm_give_item(id, "ammo_45acp")
fm_give_item(id, "ammo_45acp")
fm_give_item(id, "ammo_45acp")
fm_give_item(id, "ammo_45acp")
client_print(0, print_center, "%s 撿到一把MAC10 小型衝鋒槍", name)
}
----------------------------------------------------
後面也是 要排序 1.2.3.4..............X
而
new num = random_num(1, 20)
部分
如果您的
case # 剩下 17 項
改成
new num = random_num(1, 17)
這樣就行了^^