Code:
#include <amxmodx>
#include <amxmisc>
#include <fun>
#include <cstrike>
#include <colorchat>
#define PLUGIN "ADMIN FUN PLUGIN"
#define VERSION "1.0"
#define AUTHOR "InteX"
public plugin_init() {
register_clcmd("say /noclipon", "NoClipON")
register_clcmd("say /noclipoff", "NoClipOFF")
}
public NoClipON(id)
{
if(get_user_flags(id) & ADMIN_RCON)
{
set_user_noclip (id, 1)
ColorChat(id, GREEN, "[AdminFun] ^3You turned on noclip.")
}
else
{
{
if(get_user_flags(id) & ADMIN_USER)
{
ColorChat(id, GREEN, "[AMXX] ^3You dont have access to this command.")
}
}
}
return PLUGIN_HANDLED;
}
public NoClipOFF(id)
{
if(get_user_flags(id) & ADMIN_RCON)
{
set_user_noclip (id, 0)
ColorChat(id, GREEN, "[AdminFun] ^3You turned off noclip.")
}
else
{
{
if(get_user_flags(id) & ADMIN_USER)
{
ColorChat(id, GREEN, "[AMXX] ^3You dont have access to this command.")
}
}
}
return PLUGIN_HANDLED;
}
This is only part of plugin.
Im begginer at scripting and my question is:
Can i somehow make both like switching ON/OFF with one command /noclip but to keep this "You dont have access...."
So i dont need to use /noclipon and /noclipoff
And yeah if u can give me some advices if i done something wrong or.....
Thanks.