Dimonolog2008
Участник
- Сообщения
- 98
- Реакции
- 14
Не сбрасывает статистику по команде resetownrank, хотя переменная rankme_resetownrank стоит 1. Поможите?)
Как сделать, чтобы игроки с перм баном удалялись из статы как в hlstatsx?
sm_resetrank_allКак сбросить ранк ,через концольную команду?
= rankme_points_kill_bonus_ct -> How many points a CT got for killing additional by the diffrence of points? Default 1.
= rankme_points_kill_bonus_tr -> How many points a TR got for killing additional by the diffrence of points? Default 1.
= rankme_points_kill_bonus_dif_ct -> How many points of diffrence is needed for a CT to got the bonus? Default 100.
= rankme_points_kill_bonus_dif_tr -> How many points of diffrence is needed for a TR to got the bonus? Default 100.
DrumeN, rankme_rank_mode -> Как вести ранк? 1 = по очкам 2 = по KDR. По умолчанию 1.
<?php
include_once "config.php";
$DEBUG = false;
$conn_id = ftp_connect($ftp_server);
if(!$conn_id)
die ("Couldn't connect to the ftp server!");
if(!ftp_login($conn_id, $ftp_user_name, $ftp_user_pass))
die ("Couldn't log in to the ftp server!");
global $bd_table;
$backupFile[0]['file'] = 'up/rank.sql';
$backupFile[0]['table'] = $bd_table;
$filename = "rank.sql";
if (ftp_get($conn_id, "up/rank.sql", $ftpDIR . "/rank.sql", FTP_BINARY)) {
if(isset($_GET['echo']) || $DEBUG)
echo "Successfully received file<BR>";
ftp_close($conn_id);
} else {
if(isset($_GET['echo']) || $DEBUG){
echo "There was a problem reading from the ftp or writing into the up folder. Testing if FTP file exist.<BR>";
$contents = ftp_nlist($conn_id, $ftpDIR . "/.");
$found = false;
foreach($contents as $file){
if($file == "rank.sql"){
echo "rank.sql found. The problem is writing into the up folder.";
$found = true;
break;
}
}
if(!$found){
echo "rank.sql not found. The problem is reading from the FTP. Files:<BR>";
var_dump($contents);
}
}
ftp_close($conn_id);
die("");
}
foreach ($backupFile as $table){
$sql = "DROP TABLE `" . $table['table'] . "`;";
try {
mysql_query($sql);
} catch (Exception $e) {}
$current = file_get_contents($table['file']);
$query = explode("\n", $current);
foreach($query as $sql){
try {
mysql_query($sql);
} catch (Exception $e) {}
}
}
?>