Moin!
Kuschel19 hat geschrieben:Hallo, mal ne Frage. Ich habe noch das Tippspiel für das phpBB2. Kann mir einer sagen wie und wo ich die Punkteregelung ändern kann?
Das Interessiert auch mich.
Da ab diese Saison die Punkte anders verteilt werden, wäre nett wenn sich jemand melden würden
Ähm, ist mir da was entgangen? In den
2009 FORMULA ONE SPORTING REGULATIONS steht nämlich unter Punkt 6.4:
6.4 Points for both titles will be awarded at each Event according to the following scale :
1st : 10 points
2nd : 8 points
3rd : 6 points
4th : 5 points
5th : 4 points
6th : 3 points
7th : 2 points
8th : 1 point
Es ist zwar ein Vorschlag der FOTA ab 2009 ein neues Punktesystem einzuführen, aber dies wurde für 2009 nicht umgesetzt. Es wird also frühestens 2010 soweit sein.
Aber wenn ich das ganze richtig verstanden habe, dann dürfte dies der passende Code Block in der
formel_addresult.php sein:
Code: Alles auswählen
// Calc wm points
// Get drivers data
$sql = "SELECT * FROM " . FORMEL_DRIVERS_TABLE;
if (!$result = $db->sql_query($sql))
{
message_die(GENERAL_ERROR, 'Could not get driver information', '', __LINE__, __FILE__, $sql);
}
while ( $row = $db->sql_fetchrow($result) )
{
$teams[$row['driver_id']] = $row['driver_team'];
}
$db->sql_freeresult($result);
$wm = array();
$wm[0] = 10;
$wm[1] = 8;
for ( $i=2; $i < 8; $i++ )
{
$wm[$i] = ( 8 - $i );
}
for ( $i=0; $i < count($result_array)-2; $i++ )
{
$current_driver = $result_array[$i];
if ( $current_driver != '0' )
{
$current_team = $teams[$current_driver];
$wm_points = $wm[$i];
$sql = "INSERT INTO " . FORMEL_WM_TABLE . " (wm_id,wm_race,wm_driver,wm_team,wm_points) VALUES ('',$race_id,$current_driver,$current_team,$wm_points)";
if (!$update = $db->sql_query($sql))
{
message_die(GENERAL_ERROR, 'Could not update database', '', __LINE__, __FILE__, $sql);
}
}
}
// END points calc
Darin wäre dann dieser Bereich:
Code: Alles auswählen
$wm = array();
$wm[0] = 10;
$wm[1] = 8;
for ( $i=2; $i < 8; $i++ )
{
$wm[$i] = ( 8 - $i );
}
for ( $i=0; $i < count($result_array)-2; $i++ )
{
vermutlich so zu ändern:
Code: Alles auswählen
$wm = array();
$wm[0] = 12;
$wm[1] = 9;
$wm[2] = 7;
for ( $i=3; $i < 8; $i++ )
{
$wm[$i] = ( 8 - $i );
}
for ( $i=0; $i < count($result_array)-3; $i++ )
{
Das ist aber ungetestet.
Bye