SA-MP Forums Archive
[PHP+DJSON] DMap 0.4 - Dynamic Website Player/Car/Obj/Shop Map(******Maps based) - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Filterscripts (https://sampforum.blast.hk/forumdisplay.php?fid=17)
+---- Forum: Maps (https://sampforum.blast.hk/forumdisplay.php?fid=64)
+---- Thread: [PHP+DJSON] DMap 0.4 - Dynamic Website Player/Car/Obj/Shop Map(******Maps based) (/showthread.php?tid=48543)

Pages: 1 2 3 4


Re: [PHP+DJSON] DMap 0.4 - Dynamic Website Player/Car/Obj/Shop Map(******Maps based) - chaosnz - 09.06.2010

I got it working via ftp for any of those people who dont have access other than by ftp for their server.

Quote:

<?php

global $config;

$local_file = "dmap_feed.json";
$server_file = "chaosserver/0.3/scriptfiles/dmap_feed.json";

$ftp_server = "******"; // Address of FTP server.
$ftp_user_name = "chaos"; // Username
$ftp_user_pass = "*****"; // Password
#$destination_file = "chaosserver/0.3/scriptfiles";

// set up basic connection
$conn_id = ftp_connect($ftp_server);

// login with username and password
$login_result = ftp_login($conn_id, $ftp_user_name, $ftp_user_pass);

// try to download $server_file and save to $local_file
if (ftp_get($conn_id, $local_file, $server_file, FTP_BINARY)) {
"File Downloaded $local_file\n";
} else {
"There was a problem\n";
}

$config['api key']='---Removed---';
$config['default script'] = 'dmap_feed.json';
$config['allow external'] = true;

?>


Simply replace the server, user and user_pass fields with your ftp login information.
Then replace the bits in bold with the path to your scriptfiles.


Re: [PHP+DJSON] DMap 0.4 - Dynamic Website Player/Car/Obj/Shop Map(******Maps based) - Cedimedi - 11.06.2010

When i want to compile the include, it just gives me over 20 errors of djson. wtf?

Oh, and my map still repeats.. how can i block it? My online map


Re: [PHP+DJSON] DMap 0.4 - Dynamic Website Player/Car/Obj/Shop Map(******Maps based) - Scenario - 12.06.2010

Quote:
Originally Posted by (ed!med!
When i want to compile the include, it just gives me over 20 errors of djson. wtf?

Oh, and my map still repeats.. how can i block it? My online map
I am pretty sure you need to have the djson.inc include!

This is supposed to allow me to see the online players through the map, right?


Re: [PHP+DJSON] DMap 0.4 - Dynamic Website Player/Car/Obj/Shop Map(******Maps ba - Cedimedi - 12.06.2010

Quote:
Originally Posted by RealCop228™
Quote:
Originally Posted by (ed!med!
When i want to compile the include, it just gives me over 20 errors of djson. wtf?

Oh, and my map still repeats.. how can i block it? My online map
I am pretty sure you need to have the djson.inc include!

This is supposed to allow me to see the online players through the map, right?
1. No, i allready have the djson include

2. Yes.


Re: [PHP+DJSON] DMap 0.4 - Dynamic Website Player/Car/Obj/Shop Map(******Maps ba - Scenario - 12.06.2010

Quote:
Originally Posted by (ed!med!
Quote:
Originally Posted by RealCop228™
Quote:
Originally Posted by (ed!med!
When i want to compile the include, it just gives me over 20 errors of djson. wtf?

Oh, and my map still repeats.. how can i block it? My online map
I am pretty sure you need to have the djson.inc include!

This is supposed to allow me to see the online players through the map, right?
1. No, i allready have the djson include

2. Yes.
1. Okay, post the errors here.

2. Yeah, I figured it out. (forgot I has an RP server in which the player icons don't show) Thanks!


Re: [PHP+DJSON] DMap 0.4 - Dynamic Website Player/Car/Obj/Shop Map(******Maps based) - WebScript - 13.06.2010

Please can I use this in the filterscript? I have only .amx of mod , and I want to use this online map.
Please can you help me?
Thanks.
Sorry for my bad english, I am from Slovakia.


Re: [PHP+DJSON] DMap 0.4 - Dynamic Website Player/Car/Obj/Shop Map(******Maps based) - lolumadd - 13.06.2010

This isn't working for me. I have everything up correctly and everything running right. The map on my browser is blank, while it should have some icons on it. When I manually type in /fetch_data.php into my browser it shows the contents of data_feed.djson correctly. So I know my path is correct and it is getting the contents correctly.
I have tried many things and my map doesn't show with any player icons.

I have tried setting my API key to http://localhost and http://localhost/indexmap.php

Nothing seems to work. Everything is set up correctly and is working fine. Please help me!


Re: [PHP+DJSON] DMap 0.4 - Dynamic Website Player/Car/Obj/Shop Map(******Maps based) - DracoBlue - 13.06.2010

Quote:
Originally Posted by lolumadd
This isn't working for me. I have everything up correctly and everything running right. The map on my browser is blank, while it should have some icons on it. When I manually type in /fetch_data.php into my browser it shows the contents of data_feed.djson correctly. So I know my path is correct and it is getting the contents correctly.
I have tried many things and my map doesn't show with any player icons.

I have tried setting my API key to http://localhost and http://localhost/indexmap.php

Nothing seems to work. Everything is set up correctly and is working fine. Please help me!
localhost is a different thing. Try 127.0.0.1 instead.

- Draco


Re: [PHP+DJSON] DMap 0.4 - Dynamic Website Player/Car/Obj/Shop Map(******Maps based) - lolumadd - 13.06.2010

Quote:
Originally Posted by DracoBlue
Quote:
Originally Posted by lolumadd
This isn't working for me. I have everything up correctly and everything running right. The map on my browser is blank, while it should have some icons on it. When I manually type in /fetch_data.php into my browser it shows the contents of data_feed.djson correctly. So I know my path is correct and it is getting the contents correctly.
I have tried many things and my map doesn't show with any player icons.

I have tried setting my API key to http://localhost and http://localhost/indexmap.php

Nothing seems to work. Everything is set up correctly and is working fine. Please help me!
localhost is a different thing. Try 127.0.0.1 instead.

- Draco
Still doesn't work man. I don't know what im doing wrong! The server is writing the .djson file correctly and the server is reading the file correctly! Why isnt it working?


Re: [PHP+DJSON] DMap 0.4 - Dynamic Website Player/Car/Obj/Shop Map(******Maps based) - [S]trong - 15.08.2011

Hi, sorry up thread.

My fetch_data.php return:

Code:
{"items":{"p0":{"icon":"58","id":0,"name":"Player1","pos":{"x":2475,"y":-1672},"text":"Vida: 100"},"p2":{"icon":"58","id":2,"name":"Player2","pos":{"x":-1681,"y":411},"text":"Vida: 100"}}}
But it does not show the icons of the players.


Note: I have not changed that one should not change

Sinceraly, Strong.


Re: [PHP+DJSON] DMap 0.4 - Dynamic Website Player/Car/Obj/Shop Map(******Maps based) - thimo - 02.01.2012

This is still working?


Re: [PHP+DJSON] DMap 0.4 - Dynamic Website Player/Car/Obj/Shop Map(******Maps based) - royal_king - 02.01.2012

Quote:
Originally Posted by thimo
View Post
This is still working?
You mean - does it work? If yes, yeah it does..


Re: [PHP+DJSON] DMap 0.4 - Dynamic Website Player/Car/Obj/Shop Map(******Maps based) - Johndaonee - 15.01.2012

Great work Draco, I have always enjoyed your work.
Would be great if anybody could re-do the pictures in a higher resolution


Re: [PHP+DJSON] DMap 0.4 - Dynamic Website Player/Car/Obj/Shop Map(******Maps based) - Roperr - 12.03.2012

Alright fellas, I got the API working, the feed file was created in /scripfiles, so obviously this thing is ready to work.

The website also shows the map & the API functions (zoom, zoom out) work.

Now I wonder why it didn't update when a player joined, nothing changed.

I did however load this up as a Filterscript rather than using it in the gamemode, so I started the djson gamemode in OnFilterScriptInit & djson gamemodexit in OnFilterScriptExit.

I wonder if it didn't work because of that? I also used the djsInt OnPlayerConnect as provided in the stats.pwn test gamemode.


Re: [PHP+DJSON] DMap 0.4 - Dynamic Website Player/Car/Obj/Shop Map(******Maps based) - InfinityGamerX - 18.04.2012

wowww


Re: [PHP+DJSON] DMap 0.4 - Dynamic Website Player/Car/Obj/Shop Map(******Maps based) - Edu33 - 18.04.2012

Top Top.


Re: [PHP+DJSON] DMap 0.4 - Dynamic Website Player/Car/Obj/Shop Map(******Maps based) - logoster - 28.04.2012

after a few secs i get a message saying: "****** has disabled API codes for this prodect or your api key is invalid"

and i got my own api key for v2.0 so is there a way to fix this?


Re : [PHP+DJSON] DMap 0.4 - Dynamic Website Player/Car/Obj/Shop Map(******Maps based) - dydjyz - 28.04.2012

https://code.******.com/apis/console/

Here


Re: [PHP+DJSON] DMap 0.4 - Dynamic Website Player/Car/Obj/Shop Map(******Maps based) - Knight_Rider - 28.04.2012

Wonderful


Re: [PHP+DJSON] DMap 0.4 - Dynamic Website Player/Car/Obj/Shop Map(******Maps based) - Admigo - 11.09.2012

If i join server and look at the online map it doesnt show my location or anything. Only the map.