Advertisement
Guest User

SHOC_FakeFireWeaponCallback

a guest
Jul 18th, 2013
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.48 KB | None | 0 0
  1.     local wpn = db.actor:active_item() -- get active item as gameObject
  2.     if packet_utils.item_is_fa(wpn) then -- check if active item is a weapon
  3.         local se_wpn = alife():object(wpn:id()) -- get server (offline instance) of active_item
  4.         local data = packet_utils.state_read(se_wpn) -- read server items packets (like weapon_state)
  5.         if (data.weapon_state == 5) then -- if weapon state is "firing"
  6.             spawn_at_actor.spawn_bolts() -- do your stuff
  7.         end
  8.     end
  9.     -- have fun and cheers gannebamm
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement