SA-MP Forums Archive
Picking up pickups - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Picking up pickups (/showthread.php?tid=269680)



Picking up pickups - cloudysky - 17.07.2011

I know how to script it but there is a problem. Every two seconds the player re picks up the pickup, so the dialog resets to the original.

I hope you know what I mean, but this is really annoying. Is there anyway to stop it without making the pickup disappear?


Re: Picking up pickups - CyNiC - 17.07.2011

pawn Код:
#define GetPlayerDialog(%0) PlayerDialog[%0]

new PlayerDialog[MAX_PLAYERS];

ShowPlayerDialogEx(playerid, dialogid, style, caption[], info[], button1[], button2[])
{
    PlayerDialog[playerid] = dialogid;
    return ShowPlayerDialog(playerid, dialogid, style, caption[], info[], button1[], button2[]);
}

public OnPlayerPickUpPickup(playreid, pickupid)
{
    if(pickupid == PICKUP ID HERE && GetPlayerDialog(playerid) != DIALOG ID HERE)
    {
        ShowPlayerDialogEx(playerid, dialogid, style, caption[], info[], button1[], button2[]);
    }
}