Hi,
Can anyone help me find the problem with this code? I have tried and tried, I have increased the array etc... but nothing seems to work. It is the code for the gun sounds, and it is causing many MP9/10 guns to have errors.
Does anyone know how to fix it?
_gun_soundcontrol:
rem Play sound frames when object frame matches
if gun(gunid).sound.soundframes>0
for p=0 to gun(gunid).sound.soundframes-1
sndid=gunsound(gunid,gunsounditem(gunid,p).playsound).soundid
if gun(gunid).action.automatic.s>0 and p=0 then sndid=0
if sndid>0
if int(gunsounditem(gunid,p).keyframe)=int(object frame(currentgunobj))
if gunsounditem(gunid,p).lastplay=0
gunsounditem(gunid,p).lastplay=1
broadcast3dsound(camera position x(),camera position y(),camera position z(),50)
if sound exist(sndid)=1
play sound sndid
endif
endif
else
gunsounditem(gunid,p).lastplay=0
endif
endif
next p
endif
return
That is the code from the V1.15 source and even it doesnt work, im lost.
Thanks