---------------------------------------------------------
It must works on all games which run Sourcemod.
--------------------------------------------------------- Last Change (08/27/2015): Show log, Change : All files
Description
Because the world isn't perfect, sometime you can be stuck in a wall, a prop or a player. And the solution is the death...
That time is the past thanks to !stuck. Now you just have to write !stuck and you will be teleported in a better place next to you.
How does it work ?
When a player use !stuck, this plugin will check if the player is really stuck. If it's true, it will analyze all positions in the radius (def=200) with a step (def=20). If a position is found, player will be teleported, else player is too far from a valid position.
Commands:
Quote:
!stuck // No flag needed !unstuck // No flag needed
CVARs :
Code:
- stuck_limit (def = 7) //How many !stuck can a player use ? (0 = no limit)
- stuck_wait (def = 300) //Time to wait before earn new !stuck.
Only for people who know what their are doing (more information here)
- stuck_radius (def = 200) // Radius size to fix player position.
- stuck_step (def = 20) // Step between each position tested.
For Developer :
Spoiler
PHP Code:
/** **
* All listed functions, use TR_TraceHullFilter() to check if a player is stuck. *
* This check can't be sure at 100%, but there is few error. *
** **/
/**
* Check if a player is stuck.
*
* @param client Client ID.
* @return true, if player is stuck, else return false.
*/
native bool:IsPlayerStuck(client);
/**
* Try to unstuck a player.
*
* @param client Client ID.
* @return false if player isn't stuck or plugin can't find a valid position, else return true.
*/
native bool:UnStuckPlayer(client);
Installation
stuck.smx in addons\sourcemod\plugins
stuck.sp in addons\sourcemod\scripting stuck.inc in addons\sourcemod\scripting\include
Game confirmed :
TF2 - Doesn't work on server with REPLAY enabled ! (why? It's a good question!) CSS CS:GO L4D2 - by Neevar CS 1.6 - by VegetaVision
It must works on all games which run Sourcemod.
LOGS
Spoiler
Code:
v 1.3
- Add new command !unstuck same as !stuck
- Update unstuck algorithm: 24 times better than the old one!
- Update unstuck algorithm: Now players stuck in invisible wall in the sky (=clip in hammer) can be unstuck!
- If you're still stuck after run !stuck and be teleported on an other place, plugin will try to find a better place right now (7 times max)
- Remove lag caused by !stuck command.
- Remove stuck.inc
v 1.2
- Add 2 Native functions : IsPlayerStuck, UnStuckPlayer.
- Update stuck detection algorithm.
- Change plugin name : !stuck => stuck (think to delete the old version).
v 1.1
- Remove Generic Flag.
v 1.00
Initial