I think the on_close just executes the command you put in(as said in manual)
it had nothing to do with removing the entity.
My failt was just that I tried the to use the code from workshop 25 on A7 (where the less of mp commands work).
I just had to rearange the command from the workshop to

function player_remove()
{
wait(1);
ent_remove(my);
}

action player_move()
{
my.emask |= ENABLE_DISCONNECT;
my.event = player_remove;
.
.
.
}

on_close is just executed if you press the x button or cancle while an error occures. If I send a request to remove the entity to the server with on_close it would work too(just not if the client crashes thats right).
That was just what I tried to figure out my fail^^

I just got confused from the manual, because if you look for EVENT_DISCONNECT you get other examples as if you look for the event thingy, and not the one nor the other works on it own.