# SetPlayerViewLock

Player
View
5.1 OC
bool
int player Player whose view lock is to be turned on or off. NO_OWNER for all players.
bool locked If the view is to be locked (true) or unlocked (false).
Disabled or enabled locked view for one or all players. If the view is locked, the player cannot scroll around to explore the map.
func InitializePlayer(int plr) { SetPlayerZoomByViewRange(plr, 1000, 0, PLRZOOM_LimitMin); SetPlayerZoomByViewRange(plr, 1000, 0, PLRZOOM_LimitMax); SetPlayerViewLock(plr, true); return true; }
Code for a scenario script: Players can see exactly 1000 pixels wide around their Clonk and cannot scroll further.
SetPlrView
SetPlrViewRange
SetFoW
SetPlayerZoomByViewRange
Sven2
2010-09