here is my code
turf
paulie
verb
Sell()
set category="Gun shop"
set src in oview(2)
var/list/A=new()
var/obj/B
for(var/obj/O in usr.contents)
A+=O
A+="Cancel"
B=input(" What do you wish to sell?","Paulie's Gun Shop","Cancel") in A
if(B=="Cancel")
return 0
else
switch(alert(" Are you sure you wish to sell the [B] for [B.sellprice] dollars?","Paulie's Gun Shop","Yes","No"))
if("Yes")
usr.money+=B.sellprice
del(B)
usr<<"Transaction completed!"
usr<<"Thank you, come again!"
return 0
obj/var/sellprice
obj/Magnum
sellprice=50
obj/Sawedoff_Shotgun
sellprice=250
obj/Pump_Shotgun
sellprice=750
obj/Tommy_Gun
sellprice=5000
my question is how do i make it so that you can sell a equiped weapon?
i tryed one ver for all weapons but that made it so i could not sell any weapons at all.
ID:147434
![]() May 31 2004, 8:55 am
|
|
SSJ4_Gohan_Majin wrote:
Coolz wrote: > obj Untested though. Don't you mean "c.equipped" instead of "!c". And then another "else if(!c) return" ~Ease~ |
Ease wrote:
SSJ4_Gohan_Majin wrote: > > obj Untested though. Oh, sorry! Thanks for pointing that out! ~Ease~ |
Oh, my! I just realised how offensive my last reply sounded! Sorry about that, I was just trying to be factual. Sorry!
~Ease~ |
Garthor wrote:
Stop providin bad advice. Maybe you can stop providing commentary without constructive feedback or corrections to the problem in the first place? People learn a lot better when you can back up your babble with something useful. |
SSJ4_Gohan_Majin wrote:
obj No no no NO. That is the wrong way to do an equipment system. This is the right way: mob
if(item == usr.weapon) item.Unequip() Lummox JR |
digitalmouse wrote:
Garthor wrote: That seems like a great amount of effort to cover up someone else's mistake of not using the search button. |
Untested though.