Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
frage zur builds klasse
#6
Keine Garantie, dass es funktioniert.
PHP Code:
$datei = fopen("include/configs/buildings.php", "r"); $inhalt = ''; while($zeile = fgets($datei)) { $inhalt .= $zeile; } $haus = "main"; // Durch den Namen des Gebäudes ersetzen $haus_pos = strpos($inhalt, $haus); $time_pos = strpos($inhalt, "set_time(", $haus_pos); $end_pos = strpos($inhalt, ");", $time_pos); $time_all = substr($inhalt, $time_pos + 10, ($end_pos - $time_pos) - 10); $time_arr = explode(',', $time_all, 2); $time = $time_arr[0]; $time_factor = $time_arr[1];
$time ist die Zeit für Stufe 1 und
$time_factor ist der Faktor, um die die Zeit pro Stufe erhöht wird.

LG
Molt
Reply


Messages In This Thread
frage zur builds klasse - by faust - 14.11.2010, 14:24
RE: frage zur builds klasse - by k3v95 - 14.11.2010, 14:43
RE: frage zur builds klasse - by faust - 14.11.2010, 15:13
RE: frage zur builds klasse - by Jonsn - 14.11.2010, 15:28
RE: frage zur builds klasse - by k3v95 - 14.11.2010, 15:29
RE: frage zur builds klasse - by Molt - 14.11.2010, 15:40
RE: frage zur builds klasse - by faust - 14.11.2010, 15:54



Users browsing this thread: 1 Guest(s)