onplayerpickuppickup
#1

Hi, i have this command done so far but i have never worked with GUI yet because i have been left and i came back. Can you help me to make if player pickup that pickup it will give him GUI to choose if he wants to move object for money or not when they open it i want it to close in 10sec.

Код:
public OnPlayerPickUpPickup(playerid, pickupid)
{
    if(pickupid == mypickup)
    {

        MoveObject(object01,72.232567, -1533.768188, 6.978306, 1.0001);
        GetPlayerMoney(playerid, 100);
    }
    return 1;
}
Thanks you!
Reply
#2

Well if you want to do a dialog when they enter the pickup then...
pawn Код:
//Top of script
new mypickup;
#define DIALOG_MOVEOBJECT
//OnPlayerPickupPickup
public OnPlayerPickUpPickup(playerid, pickupid)
{
    if(pickupid == mypickup)
    {

        ShowPlayerDialog(playerid,DIALOG_MOVEOBJECT,DIALOG_STYLE_LIST,"Move Object","Move Object\nNo Thanks","Confirm","Cancel");
    }
    return 1;
}
//public Ondialogresponse
if(dialogid == DIALOG_SHOP)
{
if(response == 1)// They pressed the first button.
{
    switch(listitem)// Checking which listitem was selected
            {
                case 0:
                {
                    MoveObject(object01,72.232567, -1533.768188, 6.978306, 1.0001);
                    GetPlayerMoney(playerid, 100);
                }
                case 1:
                {
                     //leave blank to close the dialog when chose.
                }
            }
}
}
Hope I helped!
Reply
#3

Yes thanks, but do you know how to make timer that it will close after 10sec
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)