21.09.2008, 18:32
Quote:
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? |
Add this to your gamemode:
pawn Code:
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));
}
pawn Code:
addDmapIcon(1200,-500,10,"Burger Shop","Description text for the icon (what comes when you click it)");
[edit] Updated the code .. should be working now :)