If I use
Code:
void dplay_check(var id){
  while(!dplay_id) { wait(1); }
  beep();
  while(!id){ wait(1); }
  beep();
}

void client_event(void* str, var id){
  switch(EVENT_TYPE){
    case EVENT_JOIN:

       dplay_check(id);
    break;
  }
}


There are times when the client doesn't get its dplay_id set, this can happen with only 1 client connected to the host.

There are no problems with my script setting dplay_id anywhere as it's a read-only variable.