Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Tiberian Technologies / Blackhand Studios » Other Products » FDS Status Reporter Plugin doesnt work
Re: FDS Status Reporter Plugin doesnt work [message #310130 is a reply to message #244166] Sat, 12 January 2008 04:46 Go to previous messageGo to previous message
danpaul88 is currently offline  danpaul88
Messages: 5795
Registered: June 2004
Location: England
Karma:
General (5 Stars)
The latest version of the plugin ( http://new.brenbot.com ) should work fine with 1.52, if it does not let me know and I will look into it. As for PHP side stuff, I'm afraid your just going to have to write your own PHP code for it, but this snippet should help;

// Process server data
if ( $fdsStatusTXT = file_get_contents ( "fdsstatus.txt" ) )
{
	$fdsStatusArray = explode ( "\n", $fdsStatusTXT );
	
	// Create gameData array
	$gameData = array (
		'mode' => $fdsStatusArray[0],
		'map' => $fdsStatusArray[1],
		'gdi_players' => $fdsStatusArray[2],
		'gdi_points' => $fdsStatusArray[3],
		'nod_players' => $fdsStatusArray[4],
		'nod_points' => $fdsStatusArray[5],
		'max_players' => $fdsStatusArray[6],
		'timeleft' => $fdsStatusArray[7],
		'sfps' => $fdsStatusArray[8]
	);
	
	
	// Create playerData array
	for ( $i = 0; $i < $gameData['gdi_players']+$gameData['nod_players']; $i++ )
	{
		// Explode the appropriate index of $fdsStatusArray into itself
		$fdsStatusArray[$i+9] = explode ( "\t", $fdsStatusArray[$i+9] );
		
		// Adjust time field
		$fdsStatusArray[$i+9][6] = substr ( $fdsStatusArray[$i+9][6], strpos( $fdsStatusArray[$i+9][6], "." )+1 );
	
		$playerData[$i] = array (
			'name' => trim($fdsStatusArray[$i+9][0]),
			'side' => trim($fdsStatusArray[$i+9][1]),
			'score' => trim($fdsStatusArray[$i+9][2]),
			'kills' => trim($fdsStatusArray[$i+9][3]),
			'deaths' => trim($fdsStatusArray[$i+9][4]),
			'ping' => trim($fdsStatusArray[$i+9][5]),
			'time' => trim($fdsStatusArray[$i+9][6])
		);
	}
}


(NOTE: The above PHP code is untested, but should work, or at least give you a good idea of how to make it work.)


http://steamsignature.com/card/1/76561197975867233.png

[Updated on: Sat, 12 January 2008 15:01]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: ssgm dde hook problem
Next Topic: BrenBot Script
Goto Forum:
  


Current Time: Thu Oct 17 00:13:07 MST 2024

Total time taken to generate the page: 0.00765 seconds