lol, tryed 2-3 ways but i cant get it to work
this way i cant even go in-game
Code:
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <amxmisc>
#include <fun>
#include <engine>
#define PLUGIN "plugin name"
#define VERSION "0.1"
#define AUTHOR "R14170"
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_clcmd("say /noclip", "nocliptest");
register_clcmd("say /nc", "nocliptest");
// Add your code here...
}
public client_PreThink(id)
{
if (get_user_noclip(id))
{
new ent = find_ent_by_class(id, "player");
entity_set_int(ent, EV_INT_movetype, 1) == MOVETYPE_FLY
}
}
public nocliptest(id)
{
if(get_user_noclip(id) == 1)
{
set_user_noclip(id, 1)
}
if(is_user_alive(id) && !is_user_bot(id))
{
set_user_noclip(id, 1)
}
else
{
client_print(id, print_chat, "You cant use no clip when you are dead")
}
}
help someone?