Dynamic Dialog - 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: Dynamic Dialog (
/showthread.php?tid=446234)
Dynamic Dialog -
Rokzlive - 25.06.2013
Deleted. (Plz delete this thread)
Re: Dynamic Dialog -
Aerotactics - 25.06.2013
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.
Re: Dynamic Dialog -
Rokzlive - 25.06.2013
Deleted
Re: Dynamic Dialog -
Rokzlive - 25.06.2013
Deleted
Re: Dynamic Dialog -
SuperViper - 25.06.2013
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.
Re: Dynamic Dialog -
Rokzlive - 25.06.2013
Deleted
Re: Dynamic Dialog -
Rokzlive - 25.06.2013
Deleted