Live-Radar to Website
#8

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:
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);
Then on the PHP side you would use a loop to get each players xyz that are set in player.php
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
  }
}

?>
And thats all there is really.

P.S i havent tested it this is just an example.
Reply


Messages In This Thread
Live-Radar to Website - by Rafioso - 08.04.2007, 22:57
Re: Live-Radar to Website - by boylett - 08.04.2007, 23:03
Re: Live-Radar to Website - by Rafioso - 08.04.2007, 23:07
Re: Live-Radar to Website - by ThePsyco - 08.04.2007, 23:29
Re: Live-Radar to Website - by Rafioso - 08.04.2007, 23:40
Re: Live-Radar to Website - by rizla - 10.04.2007, 11:24
Re: Live-Radar to Website - by Rafioso - 13.04.2007, 02:37
Re: Live-Radar to Website - by boylett - 13.04.2007, 09:22
Re: Live-Radar to Website - by DragonMasterNYC - 13.04.2007, 09:33
Re: Live-Radar to Website - by Nissandrifter - 13.04.2007, 21:25

Forum Jump:


Users browsing this thread: 1 Guest(s)