object.set_spawn_location_permissions

This function allows you to control which players are allowed to spawn at the context object. This applies to players that have been set to use co-op spawning.

Arguments

who

A group of players.

Example

alias current_checkpoint = global.object[0]
alias next_checkpoint    = global.object[1]
--
-- Let's pretend that this is Race, and a player just reached next_checkpoint. 
-- We want the player to be able to respawn at the last checkpoint they've 
-- reached.
--
current_checkpoint.set_spawn_location_permissions(mod_player, current_player, 0)
next_checkpoint.set_spawn_location_permissions(mod_player, current_player, 1)

See also