Probably because parm.other was populated on spawn event when you joined the local server, and it's a global variable that doesn't get cleared, just overwritten. Like you say, with multiple players spawning or trigger threads starting, it could be anyone at that point in time.
I wouldn't put them before the braces of each if, because that will prevent the code block under it from being conditional.
It would be like doing:
if (self.dmteam == "allies") waitframe
self take models/weapons/colt45.tik
self take models/weapons/m2frag_grenade.tik
self take models/weapons/springfield.tik
self take models/weapons/thompsonsmg.tik
self take models/weapons/bar.tik
self take models/weapons/bazooka.tik
self take models/weapons/shotgun.tik
self take models/items/binoculars.tik
self take models/weapons/m1_garand.tik
Without braces, the first instruction after the if statement will be executed. Since you have an instruction (waitframe) before the first brace, it will perform the wait and the braces are functionally ignored.
The reason it works is because all the take commands are running, which is fine, and arguably more sensible (if I understand the requirements right).
So you could just do:
main:
if (!self || self.dmteam == "spectator" || self.mef_spectator == 1) { //self will never be NIL in any situation, it's a redundant check. It may be the case self will never be NULL in THIS situation, but you can keep it for sanity. !self is shorthand as NULL (and NILL, empty string, or 0) will evaluate to false.
end
}
if (self.raising == 1) { //put this after the first if statement because if self ever is NULL, then this will error when checking the raising property of a NULL object
end
}
self.raising = 1 //semicolon is not needed, only if you have several instructions on one line (e.g. "self.raising; waitframe")
waitframe
self take models/weapons/colt45.tik
self take models/weapons/m2frag_grenade.tik
self take models/weapons/springfield.tik
self take models/weapons/thompsonsmg.tik
self take models/weapons/bar.tik
self take models/weapons/bazooka.tik
self take models/weapons/shotgun.tik
self take models/weapons/m1_garand.tik
self take models/weapons/p38.tik
self take models/weapons/steilhandgranate.tik
self take models/weapons/kar98sniper.tik
self take models/weapons/mp40.tik
self take models/weapons/mp44.tik
self take models/weapons/panzerschreck.tik
self take models/weapons/shotgun.tik
self take models/items/binoculars.tik
waitframe
self give models/weapons/kar98.tik
self useweaponclass rifle
self.raising = 0
end
As you're introducing waits inside a script with moving (and sometimes disappearing) parts (i.e. players), then it may be prudent to add extra checks after them, as it's not impossible they could have disconnected or changed team within those few frames, even if it's very unlikely.