SA-MP Forums Archive
[Help]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: [Help]Dynamic Dialog (/showthread.php?tid=426569)



[Help]Dynamic Dialog - por12802 - 29.03.2013

Delete this topic

Cuz I can do with my self now


Re: [Help]Dynamic Dialog - Sandiel - 29.03.2013

I don't quite understand what you're saying, photos to clarify this self item dialog would be nice.


Re: [Help]Dynamic Dialog - por12802 - 29.03.2013

Deleted


Re: [Help]Dynamic Dialog - Sandiel - 29.03.2013

Oh, so you mean this is the dialog that shows up when you're looting a dead body or something?


Re: [Help]Dynamic Dialog - por12802 - 29.03.2013

delete


Re: [Help]Dynamic Dialog - por12802 - 29.03.2013

Deleted


Re: [Help]Dynamic Dialog - por12802 - 29.03.2013

Nothings Deleted


Re: [Help]Dynamic Dialog - Sandiel - 29.03.2013

1. on the OnPlayerDeath callback, assign the "playerid" to a variable you've created ontop of your script, example:
new SpecificPlayer; then in the callback: playerid = SpecificPlayer;
2. Find out how many guns he has, and store them into variables using the GetPlayerWeaponData function and global variables (variables on top of your script) on the same callback
3. on the /searchbody command (or whatever it is the command) use the if/else if structure (or the case structure, it's way more efficient but this one is okay too) to find out how many guns he has and what are those guns, and just simply create dialogs with the same number and type of guns you have in the variables, this is tricky indeed although it works.
small example:
pawn Код:
// the variable for number of guns will be : NumOfGuns, and the variables for gun types would be gun1, gun2.....gun13.
// this is in the search body command
if(NumOfGuns == 1)
{
      // make the dialog here with only one line of text saying "First gun"
}
else if(NumOfGuns == 2)
{
     // make the dialog here with only two lines of text saying "First gun\nSecond Gun"
}
// and so on, then give them the gun once they click on it (use the OnDialogResponse callback for that)
It is infact complicated, and I may haven't been that great in explaining it here, but it would work.
If you're new to scripting I suggest you don't get your hopes up alot, good luck.


Re: [Help]Dynamic Dialog - por12802 - 29.03.2013

Deleted


Re: [Help]Dynamic Dialog - por12802 - 29.03.2013

Deleted