Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local wpn = db.actor:active_item() -- get active item as gameObject
- if packet_utils.item_is_fa(wpn) then -- check if active item is a weapon
- local se_wpn = alife():object(wpn:id()) -- get server (offline instance) of active_item
- local data = packet_utils.state_read(se_wpn) -- read server items packets (like weapon_state)
- if (data.weapon_state == 5) then -- if weapon state is "firing"
- spawn_at_actor.spawn_bolts() -- do your stuff
- end
- end
- -- have fun and cheers gannebamm
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement