ok we just playtested on a dedicated server and it doesn't work. Here is what I did:
;;respawn.sqs
?(local server):exit
~0.5
player addEventHandler ["killed", {_this exec "playerkilled.sqs"}]
#START
@!alive player
player removeAllEventHandlers "killed"
@alive player
player addEventHandler ["killed", {_this exec "playerkilled.sqs"}]
goto "START"
;;init.sqs
[]exec "randomtime.sqs"
[]exec "timer.sqs"
[]exec "RandomWeather.sqs"
[]exec "build.sqs"
[]exec "ratings.sqs"
[]exec "purge.sqs"
? !(local server): [] exec "respawn.sqs"
~8
#End
Exit
----part of description.ext
titleParam1 = "Score to win:";
valuesParam1[] =
{10,20,30,40,50,60,70,80,90,100};
defValueParam1 = 50;
textsParam1[] = {"10","20","30","40","50","60","70","80","90","100"};
;;playerkilled.sqs
_victim = _this select 0
_killer = _this select 1
?(_killer == _victim): exit
killer = _killer; publicvariable "killer"
_myscore = 0
_winningscore = param1
killer = objnull
#start
~0.5
? (player in crew killer): goto "next"
goto "start"
#next
_myscore = _myscore + 1
?(_myscore >= _winningscore): goto "end"
killer = objnull
goto "start"
#end
winnername = name player
iamwinner = true
{publicvariable _x;}foreach["winnername","iamwinner"]
exit
and a trigger
type end#2
condition iamwinner
on activation forceend
Seems like it should work but alas......