There are times when player can't be spawned (for example when choosing model). You can probably detect it with this (I haven't tested it myself, it was posted
here):
PHP Code:
const m_iJoinedState = 121
const m_iMenu = 205
const MENU_CHOOSEAPPEARANCE = 3
if( !get_pdata_int(id, m_iJoinedState) && get_pdata_int(id, m_iMenu) != MENU_CHOOSEAPPEARANCE ){
//can spawn
}else{
//can not spawn
}
__________________