This post is mine at the link... I did start to write how to do it, but then my internet connection got lost
Now about the timeleft and nextmap stuff.
Only file to edit is html/html.php
What do we need to change there? Basicly, we add our own <TD></TD> and stuff like that and then get out the value of the server.
1. We need to get the ID of the cvar which is needed for us, so, for example if you use medium display style, at function (data2medium), then here is the code:
(used quote here, because of much nicer formation then code tag have)function data2medium($data)
{
return "
". print_r($data) ." // THIS LINE WILL GIVE US ALL THE ARRAY INFO IN VERY BEAUTIFUL FORMATION!
<TABLE>
<TR><TH>" . $data["info"]["name"] . "</TH></TR>
<TR>
<TD><nobr>" .
$data["html"]["gameicon"] . " " .
$data["html"]["joinlink"] . " " .
$data["html"]["anticheaticon"] . " " .
$data["html"]["passwordicon"] . "</nobr></TD>
</TR>
<TR>
<TD>" . $data["html"]["mapimage"] . "</TD>
</TR>
<TR>
<TD> Map: " . $data["info"]["map"] . "</TD>
</TR>
<TR>
<TD> Nextmap: " . $data["rules"][13]["value"] . "</TD> // ID OF NEXTMAP IN ARRAY LIST IS 13 (IT DIFFERS FROM SERVER CONFIG)
</TR>
<TR>
<TD> Timeleft: " . $data["rules"][14]["value"] . "</TD> // ID OF TIMELEFT IN ARRAY LIST IS 14 (IT DIFFERS FROM SERVER CONFIG)
</TR>
<TR>
<TD>" .
$data["html"]["playericons"] . "</TD>
</TR>
</TABLE>";
}
Okay, when the print_r($data) is written in the code, it will show us the array list in formation as:
[host] => 62.85.31.2:27015 [status] => up
Pretty suxish, but easy to understand. Because of default values as host, status and everything is already made in special variables as $data["info"]["name"], then we can ignore those lines.
We need those, which start with a number like:
[14] => Array ( [rule] => amx_timeleft [value] => 16:55 )
Here you can see, that the array ID 14 stands for amx_timeleft, and with the correct value.
Got the idea?
". $data["rules"][YOUR ARRAY ID]["value"] ."
The tutorial is written pretty bad, but I think you will understand it. Got questions, just ask! And wait for the new version of SI
I want to mention again! The nextmap and timeleft values will differ from server configuration, so don't use mine. How much plugins amxx have, how much modules and everything, it's changing those values! Just print out the $data array and check for the value ID's, then start adding them in your SI html.php script.
Good luck, and I'm waiting for questions about this one, because the tutorial is bad, and I don't know how to improve it! And some feedback.. It's working/not.
