butasro 1 Posted January 26, 2016 commands to play BGM on specific map ^^ like Radio NPC commands for GM @bgm is it possible? Quote Share this post Link to post Share on other sites
0 Kubix 83 Posted January 26, 2016 (edited) Yes, but you need add music name to array (150~ names) -[tab]script[tab]BGMCOMMAND[tab]FAKE_NPC,{ OnInit: bindatcmd "bgm", strnpcinfo(0) + "::OnStartBGM", 99, 99; setarray .musicName$[0], "1", "2", "3"; //add yours end; OnStartBGM: if(.@atcmd_parameters$[0] == "") { message strcharinfo(0), "BGM failed: invalid music name"; end; } freeloop(1); for(.i = 0; .i < getarraysize(.musicName$); .i++) { if(.@atcmd_parameters$[0] == .musicName$[.i]){ playbgmall .@atcmd_parameters$[0]; message strcharinfo(0), "BGM: Played - " + .@atcmd_parameters$[0]; end; } } freeloop(0); message strcharinfo(0), "BGM failed: invalid music name"; end; } not tested Edited January 26, 2016 by Kubix Quote Share this post Link to post Share on other sites
0 butasro 1 Posted January 26, 2016 thanks ill try, how to use this? Quote Share this post Link to post Share on other sites
0 Kubix 83 Posted January 26, 2016 @bgm <name from array> @bgm 1@bgm 2and etc. Quote Share this post Link to post Share on other sites
0 butasro 1 Posted January 26, 2016 unknown command T_T- script BGMCOMMAND FAKE_NPC,{OnInit:bidnatcmd "bgm", strnpcinfo(0) + "::OnStartBGM", 99, 99;setarray .musicName$[0], "1", "2", "3"; //add yoursend;OnStartBGM: if(.@atcmd_parameters$[0] == "") { message strcharinfo(0), "BGM failed: invalid music name"; end; } freeloop(1); for(.i = 0; .i < getarraysize(.musicName$); .i++) { if(.@atcmd_parameters$[0] == .musicName$[.i]){ playbgmall .@atcmd_parameters$[0]; message strcharinfo(0), "BGM: Played - " + .@atcmd_parameters$[0]; end; } } freeloop(0); message strcharinfo(0), "BGM failed: invalid music name"; end;} Quote Share this post Link to post Share on other sites
0 Kubix 83 Posted January 26, 2016 yep, my bad. change this: bidnatcmd "bgm", strnpcinfo(0) + "::OnStartBGM", 99, 99; to this: bindatcmd "bgm", strnpcinfo(0) + "::OnStartBGM", 99, 99; Quote Share this post Link to post Share on other sites
0 butasro 1 Posted January 26, 2016 where to put mp3 files? in my BGM folder? Quote Share this post Link to post Share on other sites
0 Kubix 83 Posted January 26, 2016 where to put mp3 files? in my BGM folder? yes Quote Share this post Link to post Share on other sites
0 butasro 1 Posted January 26, 2016 yep, my bad. change this: bidnatcmd "bgm", strnpcinfo(0) + "::OnStartBGM", 99, 99; to this: bindatcmd "bgm", strnpcinfo(0) + "::OnStartBGM", 99, 99; Thanks it worked ^^ woo! yep, my bad. change this: bidnatcmd "bgm", strnpcinfo(0) + "::OnStartBGM", 99, 99; to this: bindatcmd "bgm", strnpcinfo(0) + "::OnStartBGM", 99, 99; Thanks it worked ^^ woo! Quote Share this post Link to post Share on other sites
commands to play BGM on specific map ^^ like Radio NPC
commands for GM @bgm is it possible?
Share this post
Link to post
Share on other sites