diff --git a/Northstar.Custom/mod/scripts/vscripts/sh_message_utils.gnut b/Northstar.Custom/mod/scripts/vscripts/sh_message_utils.gnut index 856ce163b..3536a7594 100644 --- a/Northstar.Custom/mod/scripts/vscripts/sh_message_utils.gnut +++ b/Northstar.Custom/mod/scripts/vscripts/sh_message_utils.gnut @@ -3,6 +3,7 @@ global function MessageUtils_ServerInit global function NSCreatePollOnPlayer global function NSGetPlayerResponse +global function NSCreateChoiceOnAllPlayers global function NSCreateChoiceOnPlayer global function NSGetPlayerChoiceResponse @@ -201,6 +202,18 @@ int function NSGetPlayerResponse( entity player ) return server.playerPollResponses[ player ] - 1 } +string function NSCreateChoiceOnAllPlayers( string option1, string option2, float duration ) +{ + string key = UniqueString() + foreach( player in GetPlayerArray() ) + { + if ( !IsValid( player ) ) + continue + NSCreateChoiceOnPlayer( player, option1, option2, duration, key ) + } + return key +} + string function NSCreateChoiceOnPlayer( entity player, string option1, string option2, float duration, string key = "" ) { string id = key != "" ? key : UniqueString()