Text draw wont appear
#1

pawn Код:
CMD:cheats(playerid)
{
    if(PlayerInfo[playerid][pAdmin] >= 1337)
    {
        new string[256];
        new Text[7][4];
        if(SuperHydro[playerid] == 1) Text[0] = "ON";
        else Text[0] = "OFF";
        if(HPGod[playerid] == 1) Text[1] = "ON";
        else Text[1] = "OFF";
        if(ArmorGod[playerid] == 1) Text[2] = "ON";
        else Text[2] = "OFF";
        if(CarGod[playerid] == 1) Text[3] = "ON";
        else Text[3] = "OFF";
        if(AirBreak[playerid] == 1) Text[4] = "ON";
        else Text[4] = "OFF";
        if(SuperBreak[playerid] == 1) Text[5] = "ON";
        else Text[5] = "OFF";
        if(InvisMode[playerid] == 1) Text[6] = "ON";
        else Text[6] = "OFF";
        format(string, sizeof(string), "Super Hydraulics: %s\nUnlimited HP: %s\nUnlimited Armor: %s\nVehicle God Mode: %s\nNoClip: %s\nSuper Breaks: %s\nInvisible Mode: %s", Text[0], Text[1], Text[2], Text[3], Text[4], Text[5], Text[6]);
        ShowPlayerDialog(playerid, 121, DIALOG_STYLE_LIST, "{00BFFF}Available Cheats:", string, "Toggle", "Cancel");
        return 1;
    }
    return 1;
}


The textdraw at the bottom wont appear
Reply
#2

That is not a textdraw, it is a dialog, try formatting your string like this and see.

pawn Код:
format(string, 250, "%sSuper Hydraulics:\n", Text[0]);
format(string, 250, "%sUnlimited HP:\n", Text[1]);
format(string, 250, "%sUnlimited Armor:\n", Text[2]);
format(string, 250, "%sVehicle God Mode:\n", Text[3]);
format(string, 250, "%sNoClip:\n", Text[4]
format(string, 250, "%sSuper Breaks:\n", Text[5]);
format(string, 250, "%sInvisible Mode:", Text[6]);
And also, increase the array size of your string, if the text's size is more than 250 character it won't work.
Reply
#3

Quote:
Originally Posted by iOxide
Посмотреть сообщение
That is not a textdraw, it is a dialog, try formatting your string like this and see.

pawn Код:
format(string, 250, "%sSuper Hydraulics:\n", Text[0]);
format(string, 250, "%sUnlimited HP:\n", Text[1]);
format(string, 250, "%sUnlimited Armor:\n", Text[2]);
format(string, 250, "%sVehicle God Mode:\n", Text[3]);
format(string, 250, "%sNoClip:\n", Text[4]
format(string, 250, "%sSuper Breaks:\n", Text[5]);
format(string, 250, "%sInvisible Mode:", Text[6]);
And also, increase the array size of your string, if the text's size is more than 250 character it won't work.

Doesnt work. Still wont appear
Reply
#4

Fixxed it.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)