Bug en SetObjectMaterialText ?...
#1

Buenas a todo, estaba haciendo un script con SetObjectMaterialText mediante DIALOG_STYLE_INPUT, y encontre ke cuando escribo 15 veces en el objeto se buguea el texto y se keda el ultimo texto colocado, y ya no cambia mas.

no se si es un bug o estoy poniendo mal algo yo :S.

asi coloco:

pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) {
    switch(dialogid) {
        case id: {
            if(response) {
                        if(sscanf(inputtext[0], "s[20]", inputtext[0])) return 1;
                        if(strlen(inputtext[0]) < 1 || strlen(inputtext[0]) > 10) return 1;
                        SetObjectMaterialText(objeto, inputtext[0], 0, OBJECT_MATERIAL_SIZE_256x128,\
                            "Arial", 28, 0, 0xFFFF8200, 0xFF000000, OBJECT_MATERIAL_TEXT_ALIGN_CENTER);
                    }
                }
            }
        }
    }
    return false;
}
Desde ya muchas Gracias .
Reply
#2

Prueba asн:
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) {
    switch(dialogid) {
        case id: {
            if(response) {
                        if(sscanf(inputtext, "s[20]", inputtext)) return 1;
                        if(strlen(inputtext) < 1 || strlen(inputtext) > 10) return 1;
                        SetObjectMaterialText(objeto, inputtext, 0, OBJECT_MATERIAL_SIZE_256x128,\
                            "Arial", 28, 0, 0xFFFF8200, 0xFF000000, OBJECT_MATERIAL_TEXT_ALIGN_CENTER);
                    }
                }
            }
        }
    }
    return false;
}
Reply
#3

Quote:
Originally Posted by adri1
Посмотреть сообщение
Prueba asн:
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) {
    switch(dialogid) {
        case id: {
            if(response) {
                        if(sscanf(inputtext, "s[20]", inputtext)) return 1;
                        if(strlen(inputtext) < 1 || strlen(inputtext) > 10) return 1;
                        SetObjectMaterialText(objeto, inputtext, 0, OBJECT_MATERIAL_SIZE_256x128,\
                            "Arial", 28, 0, 0xFFFF8200, 0xFF000000, OBJECT_MATERIAL_TEXT_ALIGN_CENTER);
                    }
                }
            }
        }
    }
    return false;
}
ya lo resolvi, es un bug o no se, pero esta por defecto en samp.
para solucionarlo hay ke destruirlo y crearlo de nuevo cuando se actualiza con SetObjectMaterialText.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)