ok i cannot seem to get this bann coding to work
Admin_Ban(mob/M in world)
set category = "Admin"
if(M == src || M == "Guitar86"|| M == "Lee Wiley")
src <<"You can't ban yourself! Or the owner!"
return
switch(input("Do you really want to ban [M.key]?","Admin")in list("Yes","No"))
if("Yes")
var/reason = input("Enter a reason if desired.","Reason?") as \
null|text
src <<"You ban [M.key] because [reason]."
M << "You were banned by [src] because [reason]."
world.log <<"[src] has banned [M.key] from world because [reason]."
del(M)
banned += M.key
M.ban = 1
if(M.client)
banned += M.client.address
del(M.client)
if("No")
src << "You decided not to ban [M.key]."
return
else
if(!M.key)
usr <<"That is not a player."
return
ID:148584
Dec 24 2002, 3:59 pm
|
|
Dec 25 2002, 11:40 am
|
|
First, a mob is not a text string, thus, it cannot be compared to a text string. Second, I don't know what's wrong, because you're not saying what's wrong.
|
The source of your problem is that you're calling del(M) before adding anything to the ban list. By deleting M.client later on you effectively do the same thing though, if the mob is deleted at logout. And if the mob stays in the game, just call del(M) instead of del(M.client).
Lummox JR |