ID:176506
 
How would i make a ban code that deletes the char and bans the IP? thanks in advance!

-Cri0
Got from a demo from Raekwon

mob/Login()
CheckBan(usr)
if(usr.key=="Koolguy900095")
usr.verbs+=new/mob/verb/Ban()
else
usr.verbs-=new/mob/verb/Ban()
mob/verb
Ban(mob/M as mob in world){set category="Gm";set desc = "IP BAN!";
world<<"[usr] Banned [M]."
BanSomeone(M);del M;usr << "You banned the bastard!"}
/proc
BanSomeone(mob/M as mob){var/savefile/F=new("Bans.sav");F["[M.key]"]<<M.ke y}
CheckBan(mob/M as mob)
var/savefile/F=new("Bans.sav"),c
F["[M.key]"]>>c;
if(M.key==c)
M<<"Your banned!"
del M

In response to Yugi Moto
this is kinda hard to follow o.0 but ill try it
In response to Koolguy900095
I kinda edited to fit it in my game just copy-paste it it'll work
In response to Yugi Moto
thanks anyway but i used foomers
In response to Koolguy900095
ok