var cx, by, text, color, sx, ix;
text = argument0
cx = argument1
by = argument2
color = argument3

sx = cx - string_length(text) * 7 / 2
ix = sx
for(i = 1; i <= string_length(text); i++) {
    var ch = string_char_at(text, i)
    var ind;
    if ch == "ä" ind = 132
    else if ch == "ö" ind = 148
    else if ch == "ü" ind = 129
    else if ch == "Ä" ind = 142
    else if ch == "Ö" ind = 153
    else if ch == "Ü" ind = 154
    else ind = ord(ch)
    
    draw_sprite_ext(s_font, ind, ix, by, 1, 1, 0, color, 1)
    if string_pos(ch, "MWmw") != 0
        ix += 8
    else if string_pos(ch, "-ijl.,!") != 0
        ix += 5
    else
        ix += 7
}
