Originally Posted by Reamis
it's not good working.
then server has ~10 players, it's good. then ~30 it's not working. http://gta-mp.xz.lt/fr_map.php -Map http://gta-mp.xz.lt/fr_on.php -Players |
Originally Posted by DracoBlue
Dmap 0.3 release
Changes: - less cpu usage -> faster - now pretty reliable, even with more players online Important: Use the new djson 1.5.1, to have full speed features of dmap! - Draco |
Originally Posted by Reamis
ok,
it's working now with +30 players. but how to show in map 'map icons'? |
Originally Posted by DracoBlue
Quote:
- Draco PS: Can I add your site as demo page, too? |
Originally Posted by Reamis
ok,
it's working now with +30 players. but how to show in map 'map icons'? .. this : possible to show in web map? |
new DMAP_last_icon = 0;
stock addDmapIcon(Float:x,Float:y,icon_id,name[],text[]) {
new tmp[DJSON_MAX_STRING];
DMAP_last_icon++;
format(tmp,DJSON_MAX_STRING,"items/i%d/id",DMAP_last_icon);
djSetInt("dmap_feed.json",tmp,DMAP_last_icon);
format(tmp,DJSON_MAX_STRING,"items/i%d/name",DMAP_last_icon);
djSet("dmap_feed.json",tmp,name);
format(tmp,DJSON_MAX_STRING,"items/i%d/icon",DMAP_last_icon);
djSetFloat("dmap_feed.json",tmp,icon_id);
format(tmp,DJSON_MAX_STRING,"items/i%d/pos/x",DMAP_last_icon);
djSetInt("dmap_feed.json",tmp,floatround(x));
format(tmp,DJSON_MAX_STRING,"items/i%d/pos/y",DMAP_last_icon);
djSetInt("dmap_feed.json",tmp,floatround(y));
}
addDmapIcon(1200,-500,10,"Burger Shop","Description text for the icon (what comes when you click it)");
{"items":{"i1":{"icon":31,"id":1,"name":"Haus frei","pos":{"x":2499,"y":-1646},"text":"Haus mit 543333334$ und<br>354 Score gehцrt niemandem!"},"p0":{"icon":"58","id":0,"name":"[HC]E4sTsId3 (0)","pos":{"x":2025,"y":-1135},"text":"Health: 100 Armour: 0 Score: 44<br><img src=\\"https://sampwiki.blast.hk/w/images/a/ab/Skin_105.png\\"> <img src=\\"https://sampwiki.blast.hk/w/images/f/fe/Vehicle_458.jpg\\">"}}}
format(skincar,255,"<img src=\\\"https://sampwiki.blast.hk/w/images/a/ab/Skin_105.png\\\"> <img src=\\\"https://sampwiki.blast.hk/w/images/f/fe/..._458.jpg\\\">");
Originally Posted by papagei9
ok. in the dmap_feed.json it looks so:
Code:
{"items":{"i1":{"icon":31,"id":1,"name":"Haus frei","pos":{"x":2499,"y":-1646},"text":"Haus mit 543333334$ und<br>354 Score gehцrt niemandem!"},"p0":{"icon":"58","id":0,"name":"[HC]E4sTsId3 (0)","pos":{"x":2025,"y":-1135},"text":"Health: 100 Armour: 0 Score: 44<br><img src=\\"https://sampwiki.blast.hk/w/images/a/ab/Skin_105.png\\"> <img src=\\"https://sampwiki.blast.hk/w/images/f/fe/Vehicle_458.jpg\\">"}}} Code:
format(skincar,255,"<img src=\\\"https://sampwiki.blast.hk/w/images/a/ab/Skin_105.png\\\"> <img src=\\\"https://sampwiki.blast.hk/w/images/f/fe/..._458.jpg\\\">"); |
format(skincar,255,"<img src=\\\"https://sampwiki.blast.hk/w/images/a/ab/Skin_105.png\\\"> <img src=\\\"https://sampwiki.blast.hk/w/images/f/fe/..._458.jpg\\\">");Code:Here i must set one \ before the " cause i use format() and then if i set again a \ before the " the rest of the line gets green. and the i set again a \ before the ". Then are 3 \ in front of the ". But it still doesn't work... --sry for my bad english.--
format(skincar,255,"<img src='https://sampwiki.blast.hk/w/images/a/ab/Skin_105.png'> <img src='https://sampwiki.blast.hk/w/images/f/fe/Vehicle_458.jpg'>");
Originally Posted by papagei9
Ok thx!
Now another problem : I add in OnGameModeInit 30 MapIcons to Dmap. The Icons are visible on the map. If i connect with the playerid 0 a new playericon appears. But if another player connect with the playerid 1-200 (not 0) the player's icon is one of the map-Icons i've added. Also a player have a mapicon on the online-map like a 'house'. Can you fix that ? Or can u give me an advice to fix that ? - Andi |
if(dini_Int(HouseFile(i), "Kaufbar") == 1) { //ChangeMapIconInfo(playerid,H_Icon[playerid][i], dini_Int(HouseFile(i), "x"),dini_Int(HouseFile(i),"y"),dini_Int(HouseFile(i), "z"), 31, 800); nIconDestroyForAll(H_Icon[i]); H_Icon[i] = nIconAddForAll(HausInfos[i][Hx],HausInfos[i][Hy],HausInfos[i][Hz],31); format(hinfo,255,"<font color=BLUE>%s</font> <font color=GREEN>steht zum Verkauf!</font><br><font color=BLUE>Preis:</font> <font color=RED>%d$</font> <font color=BLUE>Score:</font> <font color=RED>%d</font>",dini_Get(HouseFile(i), "Name"),dini_Int(HouseFile(i), "Preis"),dini_Int(HouseFile(i), "Score")); format(h2info,64,"%s ist frei",dini_Get(HouseFile(i), "Name")); addDmapIcon(HausInfos[i][Hx],HausInfos[i][Hy],31,h2info,hinfo); } else if(dini_Int(HouseFile(i), "Kaufbar") == 0) { //ChangeMapIconInfo(playerid,H_Icon[playerid][i], dini_Int(HouseFile(i), "x"),dini_Int(HouseFile(i),"y"),dini_Int(HouseFile(i), "z"), 32, 800); nIconDestroyForAll(H_Icon[i]); H_Icon[i] = nIconAddForAll(HausInfos[i][Hx],HausInfos[i][Hy],HausInfos[i][Hz],32); format(hinfo,255,"<font color=BLUE>%s</font> <font color=GREEN>gehört</font> <font color=RED>%s</font>",dini_Get(HouseFile(i), "Name"),dini_Get(HouseFile(i), "Besitzer")); format(h2info,64,"%s ist besetzt",dini_Get(HouseFile(i), "Name")); H_DIcon[i] = addDmapIcon(HausInfos[i][Hx],HausInfos[i][Hy],32,h2info,hinfo); }
new DMAP_last_icon = 0; stock addDmapIcon(Float:x,Float:y,icon_id,name[],text[]) { new tmp[DJSON_MAX_STRING]; DMAP_last_icon++; format(tmp,DJSON_MAX_STRING,"items/i%d/id",DMAP_last_icon); djSetInt("dmap_feed.json",tmp,DMAP_last_icon); format(tmp,DJSON_MAX_STRING,"items/i%d/name",DMAP_last_icon); djSet("dmap_feed.json",tmp,name); format(tmp,DJSON_MAX_STRING,"items/i%d/text",DMAP_last_icon); djSet("dmap_feed.json",tmp,text); format(tmp,DJSON_MAX_STRING,"items/i%d/icon",DMAP_last_icon); djSetInt("dmap_feed.json",tmp,icon_id); //SetFloat format(tmp,DJSON_MAX_STRING,"items/i%d/pos/x",DMAP_last_icon); djSetInt("dmap_feed.json",tmp,floatround(x)); format(tmp,DJSON_MAX_STRING,"items/i%d/pos/y",DMAP_last_icon); djSetInt("dmap_feed.json",tmp,floatround(y)); return DMAP_last_icon; }
Originally Posted by stansan
look at the link one post above yours.. there is my map running..
stansan |