If you do amx_doorkey <id> "0" that wouldn't work, if you would really like, here
Code:
// add this to plugin_init()
server_cmd("item_doorkey","item_doorkey")
// add this to the code
public item_doorkey()
{
new arg[32];
read_argv(id,arg,31)
new id = str_to_num(arg)
new door, hitbox, maxplayers = get_maxplayers()
get_user_aiming(id,door,hitbox,9999) // get the aiming
if(door > get_maxplayers())
{
//entity_get_string(iIndex, iKey, szReturn[], iRetLen);
new classname[32]
entity_get_string(door,EV_SZ_classname,classname,31)
if(equali(classname,"func_door") || equali(classname,"func_door_rotating" || equali(classname,"func_button"))
{
force_use(id,door)
fake_touch(door,id)
client_print(id,print_chat,"[DOOR] You have opened/closed the door!")
}
}
}
and to use this, just make an item and have its cmd be item_doorkey <id>
__________________