Scripting/Server/Functions/RemoveBuildingForPlayer
Hides every default map object of model within radius of the point on that player's game. player may be a Player, a player id or null (everybody, including players who join later). Also accepts (player, model, Vector, radius). Returns true when accepted. The objects come back when the player reconnects. Covers map buildings, road pieces and dummy objects (lamp posts, signs, benches); not objects the engine creates dynamically. Hiding the whole map (0.4.6): an empty file LU/hideliberty.txt in the server folder removes the entire default Liberty City (buildings, road pieces, dummy objects and the map objects of the engine) on every player who joins, before the custom map loads: use it for a server that ships a completely new map. The server's own custom objects stay. Water, sky and radar are not part of it, and the hidden map has no collision.
Syntax
RemoveBuildingForPlayer(player, model, x, y, z, radius)Arguments
- Player player –
playermay be a Player, a player id ornull(everybody, including players who join later). - int model – Hides every default map object of
modelwithinradiusof the point on that player's game. - float x
- float y
- float z
- float radius – Hides every default map object of
modelwithinradiusof the point on that player's game.
Example
function onPlayerCommand( player, cmd, params )
{
if ( cmd == "removebuildingforplayer" )
{
local pos = player.Pos;
RemoveBuildingForPlayer( player, 95, pos.x, pos.y, pos.z, 5.0 );
}
}This sample was generated from the signature – adapt the values to your gamemode.
Related pages
- SetServerName
- SetPassword
- SetServerRule
- SyncPlayerSkins
- ReloadScripts
- LoadScript
- UnloadScript
- GetScripts
- ToggleRagdollPhysics
- ToggleVehicleDents
- LoadModule
- GetTickCount
Section: Server information and administration