Requesting for @BGM

butasro

New member
Messages
33
Points
0
Github
ButasRO
commands to play BGM on specific map ^^ like Radio NPC

commands for GM @bgm is it possible?

 
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

 
Last edited by a moderator:
unknown command T_T

-    script    BGMCOMMAND    FAKE_NPC,{
OnInit:
bidnatcmd "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;
}

 
yep, my bad.

change this:

bidnatcmd "bgm", strnpcinfo(0) + "::OnStartBGM", 99, 99;
 

to this:

Code:
bindatcmd "bgm", strnpcinfo(0) + "::OnStartBGM", 99, 99;
 
 
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!

 
Back
Top