Player.spawn

From Bully Multiplayer - Wiki


Player.spawn
Server-Side Method ScriptingServerSide.png

This method allows for spawn player.

Syntax

player.spawn(Number modelID, Number areaID, Vector3 position, Number Heading);
  • modelID - Model ID, what will be applied to player after spawn.
  • areaID - Area ID, where player will be spawned.
  • position - Player spawn position.
  • heading - Player rotation on Z axis.

Examples

Spawn player by "playerJoin" event.

let spawnPosition = Vector3(600, -132.58, 5.88);

bullymp.events.add(`playerJoin`, 
    function(player) {
        player.spawn(0, 0, spawnPosition 0);
    }
);

See also

property player.id
property player.name
property player.color
property player.state
property player.ping
property player.areaId
property player.dimension
property player.vehicleId
property player.modelId
property player.currentWeaponId
property player.controllable
property player.position
property player.heading
property player.moveSpeed
property player.health
property player.allowPowerSliding
property player.hasInfiniteAmmo
method player.spawn
method player.kick
method player.areaTransition
method player.giveWeapon
method player.giveAmmo
method player.setWeapon
method player.setWeaponNow
method player.clearWeapon
method player.clearAllWeapons
method player.putIntoVehicle
method player.removeFromVehicle
method player.displayGameText
method player.setRaceWaypoint
method player.disableRaceWaypoint
method player.isStreamedIn
method player.applyAnimation
method player.clearAnimation