Live-Radar to Website
#1

Hi,

how can i do a Radar to my Website?

Radar:
A San Andreas Map with points of the place from the players ingame.
If someone ingame move, the point on the Radar moves too (live).

I hope you understand me

Thanks

Rafioso
Reply
#2

I did this with a PHP script, except you had to reload the page to get where the players are again xD. If you want it live without reload you need a flash script.
Reply
#3

Thank you for answer

But what i have to write in the Serverscript?

I see here the map >>> click here
And thats great
Reply
#4

wow if enyone can get hold of one, send us a link :P looks awsome
Reply
#5

Quote:
Originally Posted by Y_Less
That's really not easy and will require alot of coding knowledge in a range of languages - PAWN to transmit the player's location, some server scripting, e.g. PHP to rebroadcast or process the data from the PAWN transmissions (probably done via files) and a web scripting language such as javascript, java, action script etc. to display it.
i only need the Pawn lines
The other are no problem
Reply
#6

Quote:
Originally Posted by Rafioso
Thank you for answer

But what i have to write in the Serverscript?

I see here the map >>> click here
And thats great
that is well cool its reloading the map by itself :O didnt even know this was possible
id like to see this for LWs server but i havent a clue about coding n stuff
Reply
#7

Can somebody MOVED that to Scripting, please
Reply
#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
#9

maybe i can try something on the php side but it will take time unless someone here knows alot about php and can help

my people and i have been trying to make something like this for a wile with no luck in flash
Reply
#10

how to make the map recognize coords easily with php script?
Reply


Forum Jump:


Users browsing this thread: