Hello,
Im at the moment using the HookGrabRope plugin on one of my servers, but im having a little trouble with the plugins rope feature. When grapped onto a wall or such, and getting teleported back to spawn, the rope still holds on to the wall, exceeding the cfg's maximum distance(hgrmm.cfg). What i really want is to "break" the rope(stopping the action) when exceeding the maximum distance.
I've found the code that checks if the rope exceeds the limit of the set distance, when using the rope(+rope), but not a code-block that checks if the clients distance exceeds the maximum distance while using the rope.
If anyone could help me make a loop that check the clients distance > maximum distance it would be great <3
I've tried to make a video showing the issue(hopefully), with a maximum set distance of 2000.
Code block from plugin:
Code:
new Float:g_cvarMin[3];
new Float:g_cvarMax[3];
public Action:HGR_OnClientRope(client)
{
new Float:distance = HGR_GetRopeDistance(client);
if(g_cvarMin[2] < g_cvarMax[2] && (distance < g_cvarMin[2] || distance > g_cvarMax[2]))
return Plugin_Handled;
return Plugin_Continue;
}
Link to video:
https://www.gifyourgame.com/WagelessTandemNerrick
Link to original post:
https://forums.alliedmods.net/showthread.php?p=1839628
Disclamer; I do not own this plugin!