Problem with dialog [ REP ++] easy but hard to me
#5

Quote:
Originally Posted by Bible
View Post
You are reformatting the same string over and over again.
Format the string and use strcat to add them up to each other.

Like this:
pawn Code:
CMD:myvehicles(playerid,params[])
{
        new sstring[/*Specify size here*/], string[/*Specify size here*/];
        format(string, sizeof(string), "%s\n", VehicleNames[playerVariables[playerid][pCarModel1] - 400]);
        strcat(sstring, string);
        format(string, sizeof(string), "%s\n", VehicleNames[playerVariables[playerid][pCarModel2] - 400]);
        strcat(sstring, string);
        format(string, sizeof(string), "%s\n", VehicleNames[playerVariables[playerid][pCarModel3] - 400]);
        strcat(sstring, string);
        format(string, sizeof(string), "%s\n", VehicleNames[playerVariables[playerid][pCarModel4] - 400]);
        strcat(sstring, string);
        ShowPlayerDialog(playerid, 5000, DIALOG_STYLE_LIST, "Your personal vehicles", sstring, "Ok", "Close");
        return 1;
}
Not working , command isn't showing up. I tried put 800 string to both but nothing happens.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)