I know, I'm pretty much rewriting the entire thing. I've learned a lot since I started writing it more than a year ago.
Normal minigames have an owner (the creator). The minigame uses their bricks and stuff so that when it resets it only respawns their vehicles, etc. But Slayer minigames don't have an owner because then it wouldn't work properly when they leave the server. So I need to figure out which bricks belong to which minigame. Or I could just have all bricks belong to every minigame and then only reset vehicles without passengers in them or something like that.
Ok, I'm not fully understanding, is this something like what you mean?
Bob has 3 vehicle spawns down, and creates a slayer minigame. He then leaves the slayer minigame and creates a new slayer minigame.
If this is what you mean, when someone creates a slayer minigame, loop through all of the players bricks and maybe do something like:
function whensomeonecreatesaslayermini game(%client)
{
//these functions with brickgroup things are probably wrong, but you get the point
%bg = %client.getBrickGroup(); //lol
for(%i=0;%i<%bg.getCount(); %i++)
{
%b = %bg.getObject(%i);
if(%b.minigame $= "")
{
%b.minigame = %client.minigame;
}
else
{
%b.minigame = %b.minigame SPC %client.minigame;
}
}
}So bob created 2 slayer minigames, if you
echo(%somebrickthatbelongstobob.minigame); it'll probably look like
2323 3232 (2 minigames for the 3 vehicle spawns)
You are probably going to have to package a few functions like
getminigamefromobject(); (i think that's what it is)
and possibly rewrite them. This is all off the top of my head, if someone has a better idea, I'm sure they'll let you know and if I come up with something better, i'll let you know lol.