//give the script a brick to use
function servercmdsetmusicbrick(%client, %id)
{
if(%client.isHost)
$smmusicbrick = %id;
}
//allow someone to use it
function servercmdallowmusic(%client,%t)
{
if(!(%client.isHost || isobject(findclientbyname(%t))))
return;
announce("\c3" @ %client.name @ "\c6 allowed \c4" @ findclientbyname(%t).name @ "\c6 to set the music one time.");
findclientbyname(%t).cansetmusic = 1;
}
//push the wrench dlg
function servercmdmusic(%client)
{
if($musicrest == 0 && !%client.isHost && !%client.cansetmusic == 1)
return;
if($musicrest == 1 && !%client.isSuperAdmin && !%client.cansetmusic == 1)
return;
if(smusicrest == 2 && !%client.isAdmin && !%client.cansetmusic == 1)
return;
announce("\c3" @ %client.name @ "\c6 changes the music!");
if(%client.cansetmusic == 1)
%client.cansetmusic = 0;
%client.wrenchBrick = $smmusicbrick;
%client.wrenchBrick.sendWrenchSoundData(%client);
commandToClient(%client,'openWrenchSoundDlg',"Set Music",1);
}
Completely works
Looks eww though