[PHP+DJSON] DMap 0.4 - Dynamic Website Player/Car/Obj/Shop Map(******Maps based)
#1

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:
Код:
 <dmap> DMap 0.3 // © 2008 DracoBlue // http://www.dracoblue.net
 <dmap> Loading ...
 <dmap> .. done!
If it doesn't: Doublecheck your gamemode, recompile it and run again! The file dmap_feed.json should appear right after that intro.

- Draco
Reply
#2

wooooooooooooo first post and nice
Reply
#3

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
Reply
#4

Three letters: WOW
Reply
#5

nice, but whats the difference to delux live maps?
Reply
#6

Quote:
Originally Posted by [M
deLux ]
nice, but whats the difference to delux live maps?
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!
Reply
#7

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?
Reply
#8

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
Reply
#9

[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
Reply
#10

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
Reply
#11

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
Reply
#12

lol on your demo i have seen a blue guy at the casino for 2 days now, how fast does it autoupdate
Reply
#13

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
Reply
#14

Thanks Draco, using it
Reply
#15

Draco is god damn hacks scripter
Reply
#16

Excellent work Draco
Reply
#17

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
Reply
#18

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
Reply
#19

do I need to put djson_Init in my mode? or it included indo dmap_init?
Reply
#20

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)