[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


Messages In This Thread
Online Map - by Drake1994 - 19.06.2012, 06:30
Re: Online Map - by Flake. - 19.06.2012, 06:37
Re: Online Map - by Niko_boy - 19.06.2012, 06:49
Re: Online Map - by iWhite - 19.06.2012, 07:34
Re: Online Map - by Ronaldo_raul™ - 19.06.2012, 07:39
Re: Online Map - by Drake1994 - 19.06.2012, 07:43
Re: Online Map - by iWhite - 19.06.2012, 07:44
Re: Online Map - by Drake1994 - 19.06.2012, 07:49
Re: Online Map - by Justas_B - 19.06.2012, 11:36
Re: Online Map - by iWhite - 19.06.2012, 12:35

Forum Jump:


Users browsing this thread: 1 Guest(s)