[Help]Dynamic Dialog
#1

Delete this topic

Cuz I can do with my self now
Reply
#2

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

Deleted
Reply
#4

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

delete
Reply
#6

Deleted
Reply
#7

Nothings Deleted
Reply
#8

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.
Reply
#9

Deleted
Reply
#10

Deleted
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)