Holds some helpful player functions.
| Player | Holds some helpful player functions. |
| Tables | |
| slapSounds | These are the sounds used for slaps. |
| Functions | |
| slap | Slaps an entity, can be a user or any entity. |
| kick | Kicks a user. |
| invisible | Makes a user invisible |
| getSpawnInfo | Grabs and returns player information that can be used to respawn player with same health/armor as before the spawn. |
| spawn | Enhanced spawn player. |
function ULib.slap( ent, damage, power, nosound )
Slaps an entity, can be a user or any entity.
| ent | The target ent. |
| damage | (Optional, defaults to 0) The amount of damage to inflict on the entity. |
| power | (Optional, defaults to 30) The power of the slap. |
| nosound | (Optional, defaults to false) If true, no sound will be played. |
function ULib.getSpawnInfo( ply )
Grabs and returns player information that can be used to respawn player with same health/armor as before the spawn.
| ply | The player to grab information for. |
Updates player object to store health and armor. Has no effect unless ULib.Spawn is used later.
function ULib.spawn( player, bool )
Enhanced spawn player. Can spawn player and return health/armor to status before the spawn. (Only IF ULib.getSpawnInfo was used previously.) Clears previously set values that were stored from ULib.getSpawnInfo.
| ply | The player to grab information for. |
| bool | If true, spawn will set player information to values stored using ULib.SpawnInfo |
Spawns player. Sets health/armor to stored defaults if ULib.getSpawnInfo was used previously. Clears SpawnInfo table afterwards.
Slaps an entity, can be a user or any entity.
function ULib.slap( ent, damage, power, nosound )
Kicks a user.
function ULib.kick( ply, reason, calling_ply )
Makes a user invisible
function ULib.invisible( ply, bool, visibility )
Grabs and returns player information that can be used to respawn player with same health/armor as before the spawn.
function ULib.getSpawnInfo( ply )
Enhanced spawn player.
function ULib.spawn( player, bool )