public plugin_cfg(){
if(coordinates[COOR_TEBASE][0] == 0.0 && coordinates[COOR_TEBASE][1] == 0.0 && coordinates[COOR_TEBASE][2] == 0.0 && coordinates[COOR_CTBASE][0] == 0.0 && coordinates[COOR_CTBASE][1] == 0.0 && coordinates[COOR_CTBASE][2] == 0.0){
new iFindSpawn = find_ent_by_class(get_member_game(m_nMaxPlayers), "info_player_deathmatch")
if(iFindSpawn){
get_entvar(iFindSpawn, var_origin, coordinates[NEW_COOR_TEBASE]);
while(point_contents(coordinates[NEW_COOR_TEBASE]) == CONTENTS_EMPTY)
coordinates[NEW_COOR_TEBASE][2] -= 1.0
coordinates[NEW_COOR_TEBASE][2] += 35.0
}
else{
server_print("[ SCTF ] There is a problem about TESpawnPoints")
return;
}
iFindSpawn = find_ent_by_class(get_member_game(m_nMaxPlayers), "info_player_start")
if(iFindSpawn){
get_entvar(iFindSpawn, var_origin, coordinates[NEW_COOR_CTBASE]);
while(point_contents(coordinates[NEW_COOR_CTBASE]) == CONTENTS_EMPTY)
coordinates[NEW_COOR_CTBASE][2] -= 1.0
coordinates[NEW_COOR_CTBASE][2] += 35.0
}
else{
server_print("[ SCTF ] There is a problem about CTSpawnPoints")
return;
}
Write_new_Coordinates();
server_print("[ SCTF ] Wrote new coordinates for map. Map will restart..")
new mapname[32]
get_mapname(mapname, charsmax(mapname))
engine_changelevel(mapname)
}
}