Unstuck by mouse aim with bind for admins only
Unstuck by mouse aim with bind for admins only
Hello,
I want plugin that i can unstuck anyone by command from it with aim
I aim on player stucked and i bind the command will you make then he get unstucked, hope you get my idea
Same as Slay Aim, Thanks a lot!
I want plugin that i can unstuck anyone by command from it with aim
I aim on player stucked and i bind the command will you make then he get unstucked, hope you get my idea
Same as Slay Aim, Thanks a lot!
- Night Fury
- Mod Developer
- Posts: 677
- Joined: 7 years ago
- Contact:
Working on it.
Edit:
Aim to anyone & say in the chat ( normal chat ) "/ze_unstuck".
It requires unstuck plugin by Raheem.
( Sorry for being late, i'd connection issues ).
Edit:
Aim to anyone & say in the chat ( normal chat ) "/ze_unstuck".
It requires unstuck plugin by Raheem.
( Sorry for being late, i'd connection issues ).
- #include <zombie_escape>
- #include <ze_unstuck>
- #define ADMIN_ACCESS ADMIN_IMMUNITY
- new g_iStuckPlayerId
- public plugin_init()
- {
- register_plugin("[ZE] Unstuck on aim", "1.0", "Jack GamePlay")
- register_event("StatusValue", "getId", "be", "1=2", "2!0")
- register_event("StatusValue", "removeId", "be", "1=1", "2=0")
- register_clcmd("say /ze_unstuck", "Cmd_Unstuck")
- }
- public getId()
- {
- g_iStuckPlayerId = read_data(2)
- }
- public removeId()
- {
- g_iStuckPlayerId = 0
- }
- public Cmd_Unstuck(id)
- {
- if (!(get_user_flags(id) && ADMIN_ACCESS))
- return PLUGIN_HANDLED
- if (is_user_alive(g_iStuckPlayerId))
- {
- if (is_user_stuck(g_iStuckPlayerId))
- {
- ze_unstuck_player(g_iStuckPlayerId)
- }
- else
- {
- new szName[32]
- get_user_name(g_iStuckPlayerId, szName, charsmax(szName))
- ze_colored_print(id, "!g%s !tis not stuck!y.", szName)
- return PLUGIN_HANDLED
- }
- }
- else if (g_iStuckPlayerId == 0)
- {
- ze_colored_print(id, "!tYou need to aim to alive player!y.")
- return PLUGIN_HANDLED
- }
- else
- {
- ze_colored_print(id, "!tPlayer must be alive.")
- return PLUGIN_HANDLED
- }
- return PLUGIN_CONTINUE
- }
- stock is_user_stuck(id)
- {
- new Float:fOrigin[3], iHull
- get_entvar(id, var_origin, fOrigin)
- iHull = (get_entvar(id, var_flags) & FL_DUCKING) ? HULL_HEAD : HULL_HUMAN
- engfunc(EngFunc_TraceHull, fOrigin, fOrigin, 0, iHull, id, 0)
- if (get_tr2(0, TR_StartSolid) || get_tr2(0, TR_AllSolid) || !get_tr2(0, TR_InOpen))
- return true
- return false
- }
OK, I am waiting you
- Night Fury
- Mod Developer
- Posts: 677
- Joined: 7 years ago
- Contact:
It's not compiling,Jack GamePlay wrote: ↑5 years ago Working on it.
Edit:
Aim to anyone & say in the chat ( normal chat ) "/ze_unstuck".
It requires unstuck plugin by Raheem.
( Sorry for being late, i'd connection issues ).
#include <zombie_escape> #include <ze_unstuck> #define ADMIN_ACCESS ADMIN_IMMUNITY new g_iStuckPlayerId public plugin_init() { register_plugin("[ZE] Unstuck on aim", "1.0", "Jack GamePlay") register_event("StatusValue", "getId", "be", "1=2", "2!0") register_event("StatusValue", "removeId", "be", "1=1", "2=0") register_clcmd("say /ze_unstuck", "Cmd_Unstuck") } public getId() { g_iStuckPlayerId = read_data(2) } public removeId() { g_iStuckPlayerId = 0 } public Cmd_Unstuck(id) { if (!(get_user_flags(id) && ADMIN_ACCESS)) return PLUGIN_HANDLED if (is_user_alive(g_iStuckPlayerId)) { if (is_user_stuck(g_iStuckPlayerId)) { ze_unstuck_player(g_iStuckPlayerId) } else { new szName[32] get_user_name(g_iStuckPlayerId, szName, charsmax(szName)) ze_colored_print(id, "!g%s !tis not stuck!y.", szName) return PLUGIN_HANDLED } } else if (g_iStuckPlayerId == 0) { ze_colored_print(id, "!tYou need to aim to alive player!y.") return PLUGIN_HANDLED } else { ze_colored_print(id, "!tPlayer must be alive.") return PLUGIN_HANDLED } return PLUGIN_CONTINUE } stock is_user_stuck(id) { new Float:fOrigin[3], iHull get_entvar(id, var_origin, fOrigin) iHull = (get_entvar(id, var_flags) & FL_DUCKING) ? HULL_HEAD : HULL_HUMAN engfunc(EngFunc_TraceHull, fOrigin, fOrigin, 0, iHull, id, 0) if (get_tr2(0, TR_StartSolid) || get_tr2(0, TR_AllSolid) || !get_tr2(0, TR_InOpen)) return true return false }
//AMXXPC compile.exe
// by the AMX Mod X Dev Team
//// Unstuck_By_Aim.sma
//
// G:\ZE Sources\scripting\Unstuck_By_Aim.sma(2) : fatal error 100: cannot read from file: "ze_unstuck"
//
// Compilation aborted.
// 1 Error.
// Could not locate output file G:\ZE Sources\scripting\compiled\Unstuck_By_Aim.amx (compile failed).
//
// Compilation Time: 0.41 sec
// ----------------------------------------
Press enter to exit ...
How to fix this? and when i type /ze_unstuck it will be hidden ? i want it to be hidden no one see it. and Thanks a lot
@Jack, I have question can you discover that player are AFK in case he is crouching? and make for all afk's crouching automatic unstucking for a period time, is it possible or not?
Won't be very accurate, but we can make something like: If player have speed <= 1.0 for X seconds then unstuck him. One more thing that we can detect the stuck of player with any enitiy but if we make auto unstuck if you have semiclip and player go inside another player he will get unstuck.
If you are not running semiclip or running fixed version so it's simple to use auto unstuck here: https://forums.alliedmods.net/showthread.php?p=441576
Jack, you can make if he pressed button like E when aiming to any player to get auto unstuck. Or admin will need to bind for example b to say /unstuck.
He who fails to plan is planning to fail
I want unstuck bind for admins only, what jack made is not compiling can you please fix itRaheem wrote: ↑5 years agoWon't be very accurate, but we can make something like: If player have speed <= 1.0 for X seconds then unstuck him. One more thing that we can detect the stuck of player with any enitiy but if we make auto unstuck if you have semiclip and player go inside another player he will get unstuck.
If you are not running semiclip or running fixed version so it's simple to use auto unstuck here: https://forums.alliedmods.net/showthread.php?p=441576
Jack, you can make if he pressed button like E when aiming to any player to get auto unstuck. Or admin will need to bind for example b to say /unstuck.
- Night Fury
- Mod Developer
- Posts: 677
- Joined: 7 years ago
- Contact:
Change "say /ze_unstuck" with any word but add before it +.
Ex: +unstuck
Ex: +unstuck
Same Problem: why you are not testing it before giving me, you just wastes the time yours and my !!!!Jack GamePlay wrote: ↑5 years ago Change "s#include <zombie_escape>
#include <ze_unstuck>
#define ADMIN_ACCESS ADMIN_IMMUNITY
new g_iStuckPlayerId
public plugin_init()
{
register_plugin("[ZE] Unstuck on aim", "1.0", "Jack GamePlay")
register_event("StatusValue", "getId", "be", "1=2", "2!0")
register_event("StatusValue", "removeId", "be", "1=1", "2=0")
register_clcmd("+Unstuck", "Cmd_Unstuck")
}
public getId()
{
g_iStuckPlayerId = read_data(2)
}
public removeId()
{
g_iStuckPlayerId = 0
}
public Cmd_Unstuck(id)
{
if (!(get_user_flags(id) && ADMIN_ACCESS))
return PLUGIN_HANDLED
if (is_user_alive(g_iStuckPlayerId))
{
if (is_user_stuck(g_iStuckPlayerId))
{
ze_unstuck_player(g_iStuckPlayerId)
}
else
{
new szName[32]
get_user_name(g_iStuckPlayerId, szName, charsmax(szName))
ze_colored_print(id, "!g%s !tis not stuck!y.", szName)
return PLUGIN_HANDLED
}
}
else if (g_iStuckPlayerId == 0)
{
ze_colored_print(id, "!tYou need to aim to alive player!y.")
return PLUGIN_HANDLED
}
else
{
ze_colored_print(id, "!tPlayer must be alive.")
return PLUGIN_HANDLED
}
return PLUGIN_CONTINUE
}
stock is_user_stuck(id)
{
new Float:fOrigin[3], iHull
get_entvar(id, var_origin, fOrigin)
iHull = (get_entvar(id, var_flags) & FL_DUCKING) ? HULL_HEAD : HULL_HUMAN
engfunc(EngFunc_TraceHull, fOrigin, fOrigin, 0, iHull, id, 0)
if (get_tr2(0, TR_StartSolid) || get_tr2(0, TR_AllSolid) || !get_tr2(0, TR_InOpen))
return true
return false
}ay /ze_unstuck" with any word but add before it +.
Ex: +unstuck
- Night Fury
- Mod Developer
- Posts: 677
- Joined: 7 years ago
- Contact:
Have you read this line?!
It requires unstuck plugin by Raheem.
SOS!!
I already have it, and using Automatic Unstuck and Manual Unstuck /Unstuck Coded by @Raheeem,
The problem that it's not compiling, help please!
- Night Fury
- Mod Developer
- Posts: 677
- Joined: 7 years ago
- Contact:
Errors?
//AMXXPC compile.exe
// by the AMX Mod X Dev Team
//// cUnstuck_By_Aim.sma
//
// G:\Zombie Escape\scripting\cUnstuck_By_Aim.sma(2) : fatal error 100: cannot read from file: "ze_unstuck"
//
// Compilation aborted.
// 1 Error.
// Could not locate output file G:\Zombie Escape\scripting\compiled\cUnstuck_By_Aim.amx (compile failed).
//
// Compilation Time: 0.55 sec
// ----------------------------------------
Press enter to exit ...
Code After Edit:
- #include <zombie_escape>
- #include <ze_unstuck>
- #define ADMIN_ACCESS ADMIN_IMMUNITY
- new g_iStuckPlayerId
- public plugin_init()
- {
- register_plugin("[ZE] Unstuck on aim", "1.0", "Jack GamePlay")
- register_event("StatusValue", "getId", "be", "1=2", "2!0")
- register_event("StatusValue", "removeId", "be", "1=1", "2=0")
- register_clcmd("+Unstuck", "Cmd_Unstuck")
- }
- public getId()
- {
- g_iStuckPlayerId = read_data(2)
- }
- public removeId()
- {
- g_iStuckPlayerId = 0
- }
- public Cmd_Unstuck(id)
- {
- if (!(get_user_flags(id) && ADMIN_ACCESS))
- return PLUGIN_HANDLED
- if (is_user_alive(g_iStuckPlayerId))
- {
- if (is_user_stuck(g_iStuckPlayerId))
- {
- ze_unstuck_player(g_iStuckPlayerId)
- }
- else
- {
- new szName[32]
- get_user_name(g_iStuckPlayerId, szName, charsmax(szName))
- ze_colored_print(id, "!g%s !tis not stuck!y.", szName)
- return PLUGIN_HANDLED
- }
- }
- else if (g_iStuckPlayerId == 0)
- {
- ze_colored_print(id, "!tYou need to aim to alive player!y.")
- return PLUGIN_HANDLED
- }
- else
- {
- ze_colored_print(id, "!tPlayer must be alive.")
- return PLUGIN_HANDLED
- }
- return PLUGIN_CONTINUE
- }
- stock is_user_stuck(id)
- {
- new Float:fOrigin[3], iHull
- get_entvar(id, var_origin, fOrigin)
- iHull = (get_entvar(id, var_flags) & FL_DUCKING) ? HULL_HEAD : HULL_HUMAN
- engfunc(EngFunc_TraceHull, fOrigin, fOrigin, 0, iHull, id, 0)
- if (get_tr2(0, TR_StartSolid) || get_tr2(0, TR_AllSolid) || !get_tr2(0, TR_InOpen))
- return true
- return false
- }
You must place ze_unstuck.inc in your includes folder, or just use this:
- #include <zombie_escape>
- #define ADMIN_ACCESS ADMIN_IMMUNITY
- native ze_unstuck_player(id)
- new g_iStuckPlayerId
- public plugin_init()
- {
- register_plugin("[ZE] Unstuck on aim", "1.0", "Jack GamePlay")
- register_event("StatusValue", "getId", "be", "1=2", "2!0")
- register_event("StatusValue", "removeId", "be", "1=1", "2=0")
- register_clcmd("+Unstuck", "Cmd_Unstuck")
- }
- public getId()
- {
- g_iStuckPlayerId = read_data(2)
- }
- public removeId()
- {
- g_iStuckPlayerId = 0
- }
- public Cmd_Unstuck(id)
- {
- if (!(get_user_flags(id) && ADMIN_ACCESS))
- return PLUGIN_HANDLED
- if (is_user_alive(g_iStuckPlayerId))
- {
- if (is_user_stuck(g_iStuckPlayerId))
- {
- ze_unstuck_player(g_iStuckPlayerId)
- }
- else
- {
- new szName[32]
- get_user_name(g_iStuckPlayerId, szName, charsmax(szName))
- ze_colored_print(id, "!g%s !tis not stuck!y.", szName)
- return PLUGIN_HANDLED
- }
- }
- else if (g_iStuckPlayerId == 0)
- {
- ze_colored_print(id, "!tYou need to aim to alive player!y.")
- return PLUGIN_HANDLED
- }
- else
- {
- ze_colored_print(id, "!tPlayer must be alive.")
- return PLUGIN_HANDLED
- }
- return PLUGIN_CONTINUE
- }
- stock is_user_stuck(id)
- {
- new Float:fOrigin[3], iHull
- get_entvar(id, var_origin, fOrigin)
- iHull = (get_entvar(id, var_flags) & FL_DUCKING) ? HULL_HEAD : HULL_HUMAN
- engfunc(EngFunc_TraceHull, fOrigin, fOrigin, 0, iHull, id, 0)
- if (get_tr2(0, TR_StartSolid) || get_tr2(0, TR_AllSolid) || !get_tr2(0, TR_InOpen))
- return true
- return false
- }
He who fails to plan is planning to fail
Hello,
The code @Raheem added is compiling now:
But the plugins is not working at all,
First of everything i try to Unstuck anyone by bind "t" "+Unstuck" and i doesn't works,
and it says something is not right, %s(Player Name) is not stuck and i did not aim on him,
Also i want to use Aim Unstuck while i am dead too, add this option!
i hope you @Jack test what you code, because due to not testing your codes will leads to wasting time, and too much talking!
Thanks anyway!
The code @Raheem added is compiling now:
- #include <zombie_escape>
- #define ADMIN_ACCESS ADMIN_IMMUNITY
- native ze_unstuck_player(id)
- new g_iStuckPlayerId
- public plugin_init()
- {
- register_plugin("[ZE] Unstuck on aim", "1.0", "Jack GamePlay")
- register_event("StatusValue", "getId", "be", "1=2", "2!0")
- register_event("StatusValue", "removeId", "be", "1=1", "2=0")
- register_clcmd("+Unstuck", "Cmd_Unstuck")
- }
- public getId()
- {
- g_iStuckPlayerId = read_data(2)
- }
- public removeId()
- {
- g_iStuckPlayerId = 0
- }
- public Cmd_Unstuck(id)
- {
- if (!(get_user_flags(id) && ADMIN_ACCESS))
- return PLUGIN_HANDLED
- if (is_user_alive(g_iStuckPlayerId))
- {
- if (is_user_stuck(g_iStuckPlayerId))
- {
- ze_unstuck_player(g_iStuckPlayerId)
- }
- else
- {
- new szName[32]
- get_user_name(g_iStuckPlayerId, szName, charsmax(szName))
- ze_colored_print(id, "!g%s !tis not stuck!y.", szName)
- return PLUGIN_HANDLED
- }
- }
- else if (g_iStuckPlayerId == 0)
- {
- ze_colored_print(id, "!tYou need to aim to alive player!y.")
- return PLUGIN_HANDLED
- }
- else
- {
- ze_colored_print(id, "!tPlayer must be alive.")
- return PLUGIN_HANDLED
- }
- return PLUGIN_CONTINUE
- }
- stock is_user_stuck(id)
- {
- new Float:fOrigin[3], iHull
- get_entvar(id, var_origin, fOrigin)
- iHull = (get_entvar(id, var_flags) & FL_DUCKING) ? HULL_HEAD : HULL_HUMAN
- engfunc(EngFunc_TraceHull, fOrigin, fOrigin, 0, iHull, id, 0)
- if (get_tr2(0, TR_StartSolid) || get_tr2(0, TR_AllSolid) || !get_tr2(0, TR_InOpen))
- return true
- return false
- }
First of everything i try to Unstuck anyone by bind "t" "+Unstuck" and i doesn't works,
and it says something is not right, %s(Player Name) is not stuck and i did not aim on him,
Also i want to use Aim Unstuck while i am dead too, add this option!
i hope you @Jack test what you code, because due to not testing your codes will leads to wasting time, and too much talking!
Thanks anyway!
Create an account or sign in to join the discussion
You need to be a member in order to post a reply
Create an account
Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute
Sign in
Who is online
Users browsing this forum: No registered users and 6 guests