Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- do
- local dontUse = {'weapons.bombs.RN-24', 'weapons.bombs.RN-28'}
- local function shot(event)
- if event.id == world.event.S_EVENT_SHOT and event.initiator then and Unit.getPlayerName(event.initiator) then -- if player
- if event.weapon then
- for i = 1, #dontUse do
- if event.weapon then
- if dontUse[i] == Object.getTypeName(event.weapon) then
- local name = Weapon.getDesc(event.weapon).displayName
- Object.destroy(event.weapon)
- trigger.action.outText(tostring(Unit.getPlayerName(event.initiator)) .. ' has launched a ' .. name .. '. This weapon is not allowed in this mission.', 10)
- break
- end
- end
- end
- end
- end
- end
- world.addEventHandler({id = 1337, f = shot, onEvent = function(self, event) self.f(event)end})
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement