Garry's Mod Wiki

GM:IsSpawnpointSuitable

  boolean GM:IsSpawnpointSuitable( Player ply, Entity spawnpoint, boolean makeSuitable )

Description

Check if a player can spawn at a certain spawnpoint.

Arguments

1 Player ply
The player who is spawned
2 Entity spawnpoint
The spawnpoint entity (on the map).
3 boolean makeSuitable
If this is true, it'll kill any players blocking the spawnpoint.

Returns

1 boolean
Return true to indicate that the spawnpoint is suitable (Allow for the player to spawn here), false to prevent spawning.