Scripting/Client/Functions/SwapBuildingModel

Replaces every map building of model1 within radius with model2 (call again with the models reversed to swap back). Returns the number swapped.

Syntax

SwapBuildingModel(x, y, z, radius, model1, model2)

Arguments

Returns

integer

Example

function onScriptLoad()
{
	local pos = player.Pos;
	local result = SwapBuildingModel( pos.x, pos.y, pos.z, 5.0, 0, 0 );
	MessagePlayer( "SwapBuildingModel returned: " + result, player );
}

This sample was generated from the signature – adapt the values to your gamemode.

Section: Screen, world and camera

Categories: Client functions | Screen, world and camera