Dynamic Dialog
#1

Deleted. (Plz delete this thread)
Reply
#2

I might not be any help, but I like what you are doing. It seems so simple yet complicated to accomplish. If I could help at all, it would be suggesting a simpler code, but what you have is already working...I'm not an experienced scripter, but what it sounds like is an 'if/then' situation, if 'player' owns a car, then a window appears confirming it. if 'player' selects 'car1', print (or a new window confirms) 'carstats'. I haven't done any scripting this spectacular, but I've learned by doing while creating a server.
Reply
#3

Deleted
Reply
#4

Deleted
Reply
#5

pawn Код:
new vehicleDialog[150], playersName[MAX_PLAYER_NAME];
GetPlayerName(playerid, playersName, MAX_PLAYER_NAME);

for(new vehicleIndex; vehicleIndex < MAX_VEHICLES; vehicleIndex++)
{
    if(strcmp(playersName, pCar[vehicleIndex][OVowner] == false)
    {
        format(vehicleDialog, sizeof(vehicleDialog), "%s%d %s\n", vehicleDialog, vehicleIndex, USE A GET VEHICLE NAME FUNCTION HERE);
    }
}

ShowPlayerDialog(playerid, DIALOG_CARS, DIALOG_STYLE_LIST, "Title", vehicleDialog, "Button1", "Button2");
Then under OnDialogResponse, to get the vehicle ID you can use sscanf or any split function to split the inputtext with just d and then store that in a variable which will be the vehicle ID.
Reply
#6

Deleted
Reply
#7

Deleted
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)