OnPlayerPickup
#1

hello I need help .. players that have id 0 are getting spammed with dialog..


PHP код:
public OnPlayerPickUpPickup(playeridpickupid)
                    {
                        if(
pickupid == Burger)
                        {
                               
ShowPlayerDialog(playerid,DIALOG_Burger,DIALOG_STYLE_LIST,..);
                        }
                        return 
1;
                    } 
Reply
#2

That would be because it sees that they are on the pickup so it will resent that dialog. Try run a timer or something to check if that dialog is open, if its not then show them the dialog
Reply
#3

You have to make this:

Quote:

new ShowDIalog[MAX_PLAYERS]; // add this somewhere in GameMode

public OnPlayerPickUpPickup(playerid, pickupid)
{
if(pickupid == Burger && ShowDialog[playerid] == 0)
{
ShowDialog[playerid] = 1;
ShowPlayerDialog(playerid,DIALOG_Burger,DIALOG_STY LE_LIST,..);
}
return 1;
}

and after when he close the dialog make it ShowDialog[playerid] = 0; again...
if you dont know how to do this, send me the code in pm if you want to help you to make..(remember i want the code that you have add on OnPlayerDialogResponse..)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)