You are on a good way, but you have one Problem. You can shoot yourself without bullets in your gun
You could combine the two shoot-commands something like
if (object="me" or object="self" or object="myself") {
... code of shot self command
} else {
... code of shoot comand
}
if (not GetBoolean(player, "warn")) {
SetObjectFlagOn (player, "warn")
msg ("You don't really want to shoot yourself do you?")
}
else {
if (GetBoolean(player, "warn")) { <------you dont need this if
msg ("You shot yourself and are dead")
Pause (10)
msg ("Lucky you! You came back to life")
}
}
Gun.bullets = Gun.bullets - 1
You are often using something like
else {
if
if within an else. Why not using "else if" ? With it you dont need so much layers.