13.04.2007, 09:22
The pawn side really isnt all that hard. If you want to do it via PHP you can create a file that PHP can include.
Heres an example:
Then on the PHP side you would use a loop to get each players xyz that are set in player.php
And thats all there is really.
P.S i havent tested it this is just an example.
Heres an example:
pawn Code:
if(fexist("player.php")) fremove("player.php");
new File:file;
file = fopen("player.php",io_write);
new string[256];
fwrite(file,"<?php\n");
for(new i; i < MAX_PLAYERS; i++)
{
new Float:x,Float:y,Float:z;
GetPlayerPos(i,x,y,z);
format(string,sizeof(string),"$x[%d] = %f;\n", i, x);
fwrite(file,string);
}
fwrite(file, "?>");
fclose(file);
Code:
<?php include("path/to/player.php"); for($i = 0; $i < 100; $i++) { if(isset($x[$i])) { // create an image using $x[$i], $y[$i] and $z[$i] as the players positions } } ?>
P.S i havent tested it this is just an example.