[Tool/Web/Other] Online Map
#1

Description:
Hello everyone!
I would like to show you my new work. This is the GTA San Andreas's map, which is show you, where are the players. The build-up is very easy, it has two part: PHP page, and a .PWN, .AMX file (which is very important).

Picture about:

(as you can see it show me at the SF drive-school)

Install:
Well, the install is very easy, but you will need an Apache, PHP (but the following package is contain these: wamp, appserv, xampp). You need to copy the "map" directory files, to your webserver, then you need to rewrite your server details in the index.php (ip, port, rcon password), then copy the filterscripts directory to your server's directory, then load the filterscript, then you can use on your own page like this:
Код:
<img src="index.php" />
Download:
SolidFiles

Code (filterscript):
Код:
#include <a_samp>

public OnFilterScriptInit()
{
	print("\n--------------------------------------");
	print(" Pozнciу lekйrő PHP-hoz sikeresen beцtltve!");
	print("--------------------------------------\n");
	return 1;
}

public OnFilterScriptExit()
{
	return 1;
}

forward GetPlayerPositionEx(playerid);
public GetPlayerPositionEx(playerid)
	{GetPlayerPosition(playerid); return 1;}

stock GetPlayerPosition(playerid)
{
	new
		posiz[256] = EOS,
		Float:ppos[3];
	if(IsPlayerConnected(playerid))
	{
		GetPlayerPos(playerid, ppos[0], ppos[1], ppos[2]);
		GetPlayerName(playerid, posiz, MAX_PLAYER_NAME);
		format(posiz, sizeof(posiz), "%s|%f|%f", posiz, ppos[0], ppos[1]);
		return posiz;
	}
	return posiz;
}

public OnRconCommand(cmd[])
{
	if(strfind(cmd, "getpos", true) != -1)
	{
		new
			id[5];
		strmid(id, cmd, 7, strfind(cmd, ")", true), sizeof(id));
		printf("%s", CallLocalFunction("GetPlayerPositionEx", "d", strval(id)));
		return 1;
	}
	return 0;
}
Reply
#2

This looks great, ill get a demo up
Reply
#3

looks great
Reply
#4



No image

index.html:
Код:
<img src="index.php" />
Reply
#5

Are you kidding me ?

Do you call a php page with img src tag ?

Код:
<?php include("index.php"); ?>
^ Thats how we include a php page on other page.
Reply
#6

Fail, because the index.php is atm an jpeg image, so you can include it with img tag.
Reply
#7

Quote:
Originally Posted by Ronaldo_raul™
Посмотреть сообщение
Are you kidding me ?

Do you call a php page with img src tag ?

Код:
<?php include("index.php"); ?>
^ Thats how we include a php page on other page.
Still, no image. Autor wrote, that to include image to my website, i should put img tag....
Reply
#8

If you use the following code:
Код:
<img src="index.php" />
That mean if you create an index.html, then the index.html and the index.php file should be in the same directory.
Reply
#9

Quote:
Originally Posted by iWhite
Посмотреть сообщение
Still, no image. Autor wrote, that to include image to my website, i should put img tag....
Do you modified index.php ?
Reply
#10

Quote:
Originally Posted by Justas_B
Посмотреть сообщение
Do you modified index.php ?
Yes, i did
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)