I'm a first timer, and after studying up on the small language, I decided to write my first plugin in order to become better and gain more experience.
My first Plugin is desiged to stack a User upon the admin that sent the command. I haven't been able to test my plugin yet because of a compling error.
(Line 38 ) Compiling Error 017 : Undefined Symbol "set_user_origin"
I've read up on the error, and I have been unable to understand the problem. I've looked at other "Stack" Plugins and they haven't help much either.
If someone could help me with this problem it would be very much appriciated.
I apologize if my code is completely falty in the long run, I'm trying.
Code:
#include <amxmodx>
#define PLUGIN_NAME "Stack X"
#define PLUGIN_VERSION "1.0"
#define PLUGIN_AUTHOR "eXist`"
public plugin_init()
{
register_plugin(PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR)
register_concmd("amx_stackx", "stack_x", ADMIN_KICK, "user Define a Player to be stacked upon yourself.")
}
public stack_x(id)
{
if (get_user_flags(id) != ADMIN_KICK)
{
console_print(id, "[AMXX] You have no access to that command!")
return PLUGIN_HANDLED
}
if (read_argc() == 0)
{
console_print(id, "[AMXX] Please Specify a User")
return PLUGIN_HANDLED
}
new user[32], uid
read_argv(1,user,32)
uid = find_player("bh",user)
if (uid == 0)
{
console_print(id,"[AMXX] Invalid User Id")
return PLUGIN_HANDLED
}
new origin[3]
if (uid == 1)
{
get_user_origin(id, origin, 0)
origin[2] = origin[2] + 50
set_user_origin(uid, origin)
return PLUGIN_HANDLED
}
}