SA-MP Forums Archive
The dialog wont appear - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: The dialog wont appear (/showthread.php?tid=482563)



The dialog wont appear - Alex_T - 21.12.2013

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 dialog at the bottom wont appear


Re: The dialog wont appear - Tayab - 21.12.2013

Try this
pawn Код:
CMD:cheats(playerid)
{
    if(PlayerInfo[playerid][pAdmin] >= 1337)
    {
        new string[256];
        new Text[7][4];
       
        if(SuperHydro[playerid] == 1)
            format(Text[0],10,"ON");
        else format(Text[0],10,"OFF");
       
        if(HPGod[playerid] == 1)
            format(Text[1],10,"ON");
        else format(Text[1],10,"OFF");
       
        if(ArmorGod[playerid] == 1)
            format(Text[2],10,"ON");
        else format(Text[2],10,"OFF");
       
        if(CarGod[playerid] == 1)
            format(Text[3],10,"ON");
        else format(Text[3],10,"OFF");
       
        if(AirBreak[playerid] == 1)
            format(Text[4],10,"ON");
        else format(Text[4],10,"OFF");
       
        if(SuperBreak[playerid] == 1)
            format(Text[5],10,"ON");
        else Text[5] = "OFF";
       
        if(InvisMode[playerid] == 1)
            format(Text[5],10,"ON");
        else format(Text[5],10,"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;
}