DingDong
Master
Need help to understand the uosteam "pushlist"
how does it work?
Have startup code here, all I want it to do is to check what instrument I have in my pack and use it. I know there are other ways around this but atm i want to know how "pushlist" works.
if not listexists 'instruments'
createlist 'instruments'
pushlist 'instruments' 0xe9d //Tamburine
pushlist 'instruments' 0xeb2 //Harp
pushlist 'instruments' 0xe9c //Drum
endif
for 0 to 'instruments'
if @findtype 'instruments[]' 'any' 'backpack'
useobject 'found'
pause 3500
endif
endfor
With luck it finds the tamburine and plays it, but no other instrumens if i drop the tamb on the floor, what am I doing wrong?
Thanks
how does it work?
Have startup code here, all I want it to do is to check what instrument I have in my pack and use it. I know there are other ways around this but atm i want to know how "pushlist" works.
if not listexists 'instruments'
createlist 'instruments'
pushlist 'instruments' 0xe9d //Tamburine
pushlist 'instruments' 0xeb2 //Harp
pushlist 'instruments' 0xe9c //Drum
endif
for 0 to 'instruments'
if @findtype 'instruments[]' 'any' 'backpack'
useobject 'found'
pause 3500
endif
endfor
With luck it finds the tamburine and plays it, but no other instrumens if i drop the tamb on the floor, what am I doing wrong?
Thanks