Why bother print_origin when spec_pos works fine? Trigger_push might be worth your time experimenting with.
The way it was written non-admins can exploit the noclip. Also shows as Unknown command.
Unknown command: print_origin
Unknown command: give_noclip] print_origin
Code:
#include <amxmodx>
#include <fakemeta>
#include <fun>
public plugin_init()
{
register_plugin("test-only plugin", "0.0.2", "Author")
register_clcmd("give_noclip", "Cmd__Noclip", ADMIN_RCON, "NOCLIP", 1)
}
public Cmd__Noclip(id)
{
if(is_user_connected(id))
{
set_user_noclip(id, !get_user_noclip(id))
return PLUGIN_HANDLED
}
return PLUGIN_CONTINUE
}
There is some sort of bug with printing to console. It can overflow. Print_chat is safer. Looking at Amxx with the new C standards it won't compile finding memory leaks by the hundreds, this comes as no surprise. Be sure to check if user is connected on the main plugin also please before issuing commands or doing anything with client especially with a touch.
__________________