M
MarcosP
Guest
Im trying to implement it with GM Scoreboard but something is going wrong.
I have this scoreboard:
And im using this code to get it to a ds_map:
And then this to draw it:
But what i get it this:
I have tried some things but i dont know with its not in order. Any help is appreciated.
I have this scoreboard:
And im using this code to get it to a ds_map:
Code:
var gmsb_map = json_decode(r_str);
var gmsb_status = ds_map_find_value(gmsb_map , "status");
var current_key = ds_map_find_first(gmsb_map);
var size = ds_map_size(gmsb_map);
global.names = ds_list_create();
global.points = ds_list_create();
for (var i = 0; i < size; i++){
global.names[i] = ds_map_find_value(gmsb_map,current_key);
current_key = ds_map_find_next(gmsb_map, current_key);
global.points[i] = ds_map_find_value(gmsb_map,current_key);
current_key = ds_map_find_next(gmsb_map,current_key);
}
Code:
draw_set_font(fnt_font);
draw_set_color(c_white);
for(var i=0;i<10;i++){
draw_text(room_width/5, (room_height/11)*i+50, string(i+1));
draw_text(3*room_width/5,(room_height/11)*i+50, global.names[i]);
draw_text(5*room_width/6, (room_height/11)*i+50, string(global.points[i]));
}
I have tried some things but i dont know with its not in order. Any help is appreciated.