19.06.2013, 18:42
My PC is currently Destroy .... And its a no junk on the main desktop = games
soooo i was trying to develop something.... I didn't really focus on the image or the pretty pretty look my purpose was just attempting to provide a script for the community....... FEEDBACK would be appreciated
a .txt Document is going to need to be created and you have to change the .php location if you are not doing this from your home pc.........
![](/imageshack/img4/2828/z4cm.png)
Home.css
Home.php
Beta Stocks
![Tongue](images/smilies/razz.gif)
a .txt Document is going to need to be created and you have to change the .php location if you are not doing this from your home pc.........
![](/imageshack/img4/2828/z4cm.png)
Home.css
HTML Code:
body { background-color: green; background-repeat:no-repeat; background-position:center; background-size: 100% 100%; min-height: 712px; } #shader { width: 1550px; height: 500px; background-repeat:no-repeat; background-position:center; background-size: 100% 100%; background: #F0F0F0 ; opacity: 0.85; -moz-opacity: 0.85; filter:alpha(opacity=85); overflow:hidden; border: 6px solid #D8D8D8 ; } h1 { color:green; }
PHP Code:
<html>
<head>
<title> Chat Box Beta </title>
<link rel="stylesheet" type="text/css" href="CSS/Home.css">
</head>
<body>
<center>
<div id="shader">
<h1>Announcements</h1> <br><br>
<?php
header('Refresh: 1; url=Home.php');
$file = "./document.txt";
$doc = file_get_contents($file);
$splits = explode("\n", $doc);
$split = array_reverse($splits);
foreach($split as $ysplit) {
echo $ysplit. '<br>';
}
?>
</div>
</center>
</body>
</html>
pawn Code:
stock GeneralMSG(gCol, gAMSG[])
{
new File:log = fopen("/Document.txt", io_write);
if(log)
{
new gstring[256], phpstring[256];
format(gstring, 256, "Client: %s ", gAMSG);
SendClientMessageToAll(gCol, gstring);
format(phpstring, 256, "Client: %s \r\n", gAMSG):
fwrite(log, phpstring);
fclose(log);
}
return true;
}
stock PlayerMSG(playerid, gCol, gAMSG[])
{
new File:log = fopen("/Document.txt", io_write);
if(log)
{
new gstring[256], phpstring[256];
format(gstring, 256, "%s said: %s", phpName(playerid), gAMSG):
SendClientMessageToAll(gCol, gstring);
format(phpstring, 256, "%s said: %s \r\n", phpName(playerid), gAMSG):
fwrite(log, phpstring);
fclose(log);
}
return true;
}
stock phpName(playerid)
{
new pname[MAX_PLAYER_NAME+1];
GetPlayerName(playerid, pname, sizeof(pname));
return pname;
}