ID:262808
 
Code:
mob
proc
deathcheck(mob/M)
if(istype(M,/mob/Player/))
M<<"You have died!"
sleep(4)
M<<"You will lose half your gold if you respawn. Do you wish to respawn, or wait 3 minutes for another player to revive you?"
M<<input("Wait for another player to revive you?") in list("Yes","No")
switch(M)
if("Yes")
src<<"You have 3 minutes."
sleep(2400)
if(M.dead)
M.Move(locate(M.GX,M.GY,M.GZ))
var/nowgold = round(M.gold/2)
M.gold = nowgold
if("No")
M.Move(locate(M.GX,M.GY,M.GZ))
var/nowgold = round(M.gold/2)
M.gold = nowgold
del M


Problem description:
It always asks me if I want to respawn if I kill another /mob/Player/. Waht did I do wrong?

Uh...if(istype(M,/mob/Player/)) just asks if mob M is of the /mob/Player/ subtype watever. It doesn't ask if it is YOUR mob or THEIR mob, just asks if its a /mob/Player. What did you want to do?
A couple of problems

- You have your DeathCheck() backwards. src should be the guy who is dying, and M would be the person who killed src (the player).

- You can't use input like that, input return any text. You're also trying to compare a mob with text, which will never happen

- I also assume you want to check their health when you're doing a death check, unless you do it somewhere else that you haven't shown us

The way to do a death check would be like this:
mob/proc
DeathCheck(mob/M)
if(istype(src, /mob/Player))
src << "You have died."
sleep(4)
src << "You will lose half your gold if you respawn. Do you wish to respawn, or wait 3 minutes for another player to revive you?"
spawn()
if((input(src, "Wait for another player to revive you?","Revive") in list("Yes","No")) == "Yes")
src << "You have three minutes."
sleep(2400)
if(src.dead)
src.Move(locate(src.GX, src.GY, src.GZ))
// other stuff


~~> Unknown Person