static int JPLua_Player_GetLocation( lua_State *L ) { jplua_player_t *player = JPLua_CheckPlayer( L, 1 ); lua_pushstring( L, CG_GetLocationString( CG_ConfigString( CS_LOCATIONS+cgs.clientinfo[player->clientNum].location ) ) ); return 1; }
static int Player_GetLocation( lua_State *L, jpluaEntity_t *ent ) { #if defined(PROJECT_GAME) char location[64]; if ( Team_GetLocationMsg( ent, location, sizeof(location) ) ) { lua_pushstring( L, location ); } else { lua_pushnil( L ); } #elif defined(PROJECT_CGAME) lua_pushstring( L, CG_GetLocationString( CG_ConfigString( CS_LOCATIONS + cgs.clientinfo[(int)(ent - ents)].location ) ) ); #endif return 1; }