[PHP+DJSON] DMap 0.4 - Dynamic Website Player/Car/Obj/Shop Map(******Maps based) -
DracoBlue - 26.08.2008
Hello,
since it's pretty difficult to get ******Maps working with flat maps and with samp, I took some time and put
djson together with ****** maps and a small php-config-file: dmap was born!
Links:
-
@requires djson >=
1.5.2
-
Download:
2,4MB (Source+Map+Icons)
-
Demo:
EveryStuff,
GTA:Tournament
-
HowTo:
Add Shop/Extra icons
Its published under
MIT-License.
Use it,
love it,
hack it,
sell it!
The architecture of dmap is made that way, that you can display anything at that page.
Just add an items element with icon!, text!, name!, id! and pos/x and pos/y in your gamemode to dmap_feed.json and you'll have a marker on the website! If you need _any_ help extending dmap, post here!
How to get it running?
1. Add dmap_GameModeInit() in your GameModeInit and dmap_GameModeExit() in your GameModeExit.
2. Recompile the GameMode!
3. Create a folder at your website.
Sign up for a ******-Api-Key for that website address.
4. Copy all files from htdocs to the new website folder you created.
5. Configure config.inc.php that way, that the api-key is yours, and the "data feed" config points directly to your scriptfiles folder.
6. Have fun!
My scriptfiles/dmap_feed.json is not created!?
If you properly added dmap to your gamemode, launching it, should result in the following text:
If it doesn't: Doublecheck your gamemode, recompile it and run again! The file dmap_feed.json should appear right after that intro.
- Draco
Re: [PHP+DJSON] DMap 0.1 - Dynamic Website Player/Car/Obj/Shop Map(******Maps based) -
|CrippinBloodDrippin| - 26.08.2008
wooooooooooooo first post and nice
Re: [PHP+DJSON] DMap 0.1 - Dynamic Website Player/Car/Obj/Shop Map(******Maps based) -
DracoBlue - 26.08.2008
Quote:
Originally Posted by MaTrIx4057
Very nice. But will you make like more info?? Armour,money, respect etc?? Im using delux's live map and its with more info and its ****** map too.
|
I will add more info. Actually dmap is more like an "engine" to use ******maps with samp. So you can set whatever text you want as description as soon as one clicks the marker.
See the line where it sets
items/%d/text and add whatever text you want to have there
. Currently it adds only
Health: %f, this is why you see just
Health: 90 for example.
- Draco
Re: [PHP+DJSON] DMap 0.1 - Dynamic Website Player/Car/Obj/Shop Map(******Maps based) -
[IB]Scorcher - 26.08.2008
Three letters: WOW
Re: [PHP+DJSON] DMap 0.1 - Dynamic Website Player/Car/Obj/Shop Map(******Maps based) -
[M]deLux - 26.08.2008
nice, but whats the difference to
delux live maps?
Re: [PHP+DJSON] DMap 0.1 - Dynamic Website Player/Car/Obj/Shop Map(******Maps based) -
BlueG - 26.08.2008
The difference is that he included the
full source code for his script.He also used a different way to read the data from a file to create the map icon's.
Btw nice work draco!
Re: [PHP+DJSON] DMap 0.1 - Dynamic Website Player/Car/Obj/Shop Map(******Maps based) -
[M]deLux - 26.08.2008
Quote:
Originally Posted by DracoBlue
Actually dmap is more like an "engine" to use ******maps with samp.
|
yeah, ok i see. so it stays alot easier to use mine
nice work btw - in which cycles is the map refreshed?
Re: [PHP+DJSON] DMap 0.1 - Dynamic Website Player/Car/Obj/Shop Map(******Maps based) -
DracoBlue - 26.08.2008
Actually this is all you need to run that script on any server of your choice completely independent from dracoblue.net
.
Data is saved as json (thatswhy using djson), so it's faster (less bandwith) and of course different to xml like in the delux one.
Actually I made dmap with the purpose to create a "display" for information: Players/Shops/Points, just be adding/removing items from the big items-array in the .json file. All updating as soon as the .json file updates! No changes to the .html-side/map-side needed!
- Draco
Re: [PHP+DJSON] DMap 0.1 - Dynamic Website Player/Car/Obj/Shop Map(******Maps based) -
DracoBlue - 26.08.2008
[edit]*cough* sorry for doublepost[/edit]
Quote:
Originally Posted by [M
deLux ]
nice work btw - in which cycles is the map refreshed?
|
5 seconds. Look at the source
.
Btw. you are not using a flat map on ******, so your calculation looks a bit confusing maybe inaccurate
. Check that flat map projection called EuclideanProjection from:
http://econym.******pages.com/example_custommapflat.htm .
Quote:
Originally Posted by [M
deLux ]
Quote:
Originally Posted by DracoBlue
Actually dmap is more like an "engine" to use ******maps with samp.
|
yeah, ok i see. so it stays alot easier to use mine
|
Easy depends on the fact what they actually want to do with it.
- Draco
Re: [PHP+DJSON] DMap 0.1 - Dynamic Website Player/Car/Obj/Shop Map(******Maps based) -
[M]deLux - 26.08.2008
yeah thanks - i noticed this afterwards but now it is working like this, so i wont change it just to have some more proper coords in the source
and i can ensure you that the positions are accurate on my map
Re: [PHP+DJSON] DMap 0.1 - Dynamic Website Player/Car/Obj/Shop Map(******Maps based) -
DracoBlue - 26.08.2008
Quote:
Originally Posted by [M
deLux ]
yeah thanks - i noticed this afterwards but now it is working like this, so i wont change it just to have some more proper coords in the source ;)
and i can ensure you that the positions are accurate on my map
|
This was no offence, just a comment to enhance your map, since I tried to keep my dmap as simple/changeable as possible, so big converting for coordinates is not really what one calls simple to understand :-P.
- Draco
Re: [PHP+DJSON] DMap 0.1 - Dynamic Website Player/Car/Obj/Shop Map(******Maps based) -
winker2k6 - 28.08.2008
lol on your demo i have seen a blue guy at the casino for 2 days now, how fast does it autoupdate
Re: [PHP+DJSON] DMap 0.1 - Dynamic Website Player/Car/Obj/Shop Map(******Maps based) -
DracoBlue - 28.08.2008
Quote:
Originally Posted by Winker2k6
lol on your demo i have seen a blue guy at the casino for 2 days now, how fast does it autoupdate
|
I currently disabled the demo. It updates every 5 seconds, while it is active.
- Draco
Re: [PHP+DJSON] DMap 0.1 - Dynamic Website Player/Car/Obj/Shop Map(******Maps based) -
sebihunter - 29.08.2008
Thanks Draco, using it
Re: [PHP+DJSON] DMap 0.1 - Dynamic Website Player/Car/Obj/Shop Map(******Maps based) -
JaTochNietDan - 29.08.2008
Draco is god damn hacks scripter
Re: [PHP+DJSON] DMap 0.1 - Dynamic Website Player/Car/Obj/Shop Map(******Maps based) -
LethaL - 29.08.2008
Excellent work Draco
Re: [PHP+DJSON] DMap 0.2 - Dynamic Website Player/Car/Obj/Shop Map(******Maps based) -
DracoBlue - 31.08.2008
Update: 0.2 released!
- fixed issue with blank files
- fixed possible memory leaks
- @requires
djson 1.3
Update your djson + dmap as soon as possible!
- Draco
Re: [PHP+DJSON] DMap 0.2 - Dynamic Website Player/Car/Obj/Shop Map(******Maps based) -
DracoBlue - 18.09.2008
Speeeeeed improvement in djson, means faster dmap!
Please update your djson to 1.4.1 as soon as possible, dmap will be way way faster and with less nerly no cpu usage then.
- Draco
Re: [PHP+DJSON] DMap 0.2 - Dynamic Website Player/Car/Obj/Shop Map(******Maps based) -
Bpb - 19.09.2008
do I need to put djson_Init in my mode? or it included indo dmap_init?
Re: [PHP+DJSON] DMap 0.2 - Dynamic Website Player/Car/Obj/Shop Map(******Maps based) -
DracoBlue - 19.09.2008
Quote:
Originally Posted by Bpb
do I need to put djson_Init in my mode? or it included indo dmap_init?
|
dmap_init already does the djson init for you.
- Draco