Firearm sound in multiplayer

Users who are viewing this thread

CBWarDog

Sergeant
I added a firearm to my mod, everything works fine but when I play with my friends, i dont hear anything from their fire, I only hear my own gun. Also, they cant hear my gun when i shoot.

This is the code of the weapon:

Code:
 ["arquebus", "Arquebus", [("arquebus",0)], itp_cant_use_on_horseback|itp_type_musket |itp_merchandise|itp_primary|itp_two_handed|itp_cant_reload_on_horseback,itcf_shoot_musket|itcf_reload_musket|itcf_carry_crossbow_back, 
  683 , weight(3.5)|difficulty(0)|spd_rtng(23) | shoot_speed(250) | thrust_damage(100 ,pierce)|max_ammo(1)|accuracy(75),imodbits_none,
  [(ti_on_weapon_attack, [(play_sound,"snd_pistol_shot"),(position_move_x, pos1,0),(position_move_y, pos1,100),(particle_system_burst, "psys_pistol_smoke", pos1, 15)])]],

how can i fix this?
 
ti_on_weapon_attack is only called server side.
Use the script game_missile_launch instead.
Code:
# script_game_missile_launch
# Input: arg1 = shooter_agent_id, arg2 = weapon_item_id, pos1 = weapon_item_position
# Output: none
("game_missile_launch",
[
    # (store_script_param, ":shooter_agent", 1),
    # (store_script_param, ":item", 2),
    # (neg|multiplayer_is_dedicated_server),#only client side
    #... add your stuf here
]),
 
Back
Top Bottom