ID:1847919
 
(See the best response by Maximus_Alex2003.)
Code:
    verb/Rename()
set category="Other"
set name ="Rename"
var/list/PeopleList=new/list
PeopleList+="Cancel"
for(var/mob/F in view(10)) PeopleList.Add(F)
for(var/obj/A in view(10)) PeopleList.Add(A)
var/Choice=input("What or Whose icon do you want to change ?") in PeopleList
var/arg=input("Change the name to:") as text
if(Choice=="Cancel") return
else
for(var/mob/E in view(10))
for(var/obj/A in view(10))
if(Choice==E)
spawn switch(input(E,"[usr] wants to change your name to [arg]","",text) in list("Yes","No"))
if("Yes")
E.name = arg
usr<<"[E] accepted the rename."
return
if("No")
usr<<"[E] denied the rename."
return
return
break
if(Choice==A)
A.name = arg
return
verb/Change_Icon(arg as icon)
set category="Other"
set name="Change Icon"
var/list/PeopleList=new/list
PeopleList+="Cancel"
for(var/mob/F in view(10)) PeopleList.Add(F)
for(var/obj/A in view(10)) PeopleList.Add(A)
var/Choice=input("What or Whose icon do you want to change ?") in PeopleList
if(Choice=="Cancel") return
else
for(var/mob/E in view(10))
for(var/obj/A in view(10))
if(Choice==E)
spawn switch(input(E,"[usr] wishes to change your icon to [arg]","",text) in list("Yes","No"))
if("Yes")
E.icon = arg
usr<<"[E] accepted the change of icon."
return
if("No")
usr<<"[E] denied the change of icon."
return
return
break
if(Choice==A)
A.icon = arg
return


Problem description:
Basically, I want it so that you can right click an object which is rather a mob or an object, but it still does the same functions that are displayed above. If it's a mob, it askes the person if they want to change their icon but, if it's an object, it just changes the icon automatically. It has to be in the view and contents of the user. Also, it would be nice if it could be if only the Variable ('Icon_Changable == 1') It gets added to the list.
Best response
Okay, so... Do it.

You need to check if the type (istype()) is /mob or /obj. Then check if the variable icon_changeable is true. If /mob, give the /mob an alert via whatever method you're using whether it's interface based, HUD based, text HTML based, or standard input(). Then, if it's not the /mob, just automatically change the /obj icon to the icon the client chooses.

Based on your frequent posts, I would strongly recommend you glance over at these fine links:

http://www.byond.com/docs/guide/
http://www.byond.com/developer/Dantom/YourFirstWorld
http://www.byond.com/docs/ref/
http://www.byond.com/developer/articles/resources
http://www.byond.com/docs/ref/skinparams.html
In response to Maximus_Alex2003
Thanks alot, I've really planned to go over HTML, CSS, Javascript and PHP over my spare time and BYOND Coding but, that would have to be after my exams which are in these next two weaks, I've realised just how rusty, I've become.
In response to Maximus_Alex2003
Oh yeah towards the problem. I've think, I found a method but, I'm not sure why it is giving me two errors.

mob
var
icon_changable=1
obj
var
icon_changable=0
verb/Changing_Change_Icon(x as obj in oview(), z as mob in oview())
set category="Other"
var/list/Choice
if(x.icon_changable)
Choice.Add(x)
if(z.icon_changable)
Choice.Add(z)
var/Changing = input(src,"Whose icon do you want to change?") in Choice
var/variable = input(src,"What icon do you want them to change into too:") as icon
if(istype(Changing,/mob))
spawn switch(input(Changing,"[usr] wishes to change your icon to [variable]","",text) in list("Yes","No"))
if("Yes")
Changing.icon = variable
usr<<"[Changing] accepted the change of icon."
return
if("No")
usr<<"[Changing] denied the change of icon."
return
else
Changing.icon = variable
return