SA-MP Forums Archive
dialog problem - 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: dialog problem (/showthread.php?tid=606096)



dialog problem - Fantje - 29.04.2016

I have a little problem.

My dialog keeps opening if I am in the pickup CP.

So I can't select something because it keeps taking me to the "home pace" of that dialog.

CODE:

PHP код:
public OnPlayerPickUpPickup(playeridpickupid)
{
    if(
pickupid == mybriefcase)
    {
        
ShowPlayerDialog(playerid777DIALOG_STYLE_LIST"Briefcase""Health - 5000$\nArmour - 5000$\n\nWeapons""Select""Cancel");
    }
    return 
1;




Re: dialog problem - Micko123 - 29.04.2016

I don't understand. Explain it better


Re: dialog problem - Fantje - 29.04.2016

I created a pick up. If you stand in that pick up it will show me a dialog. But the dialog shows up every 2 seconds or so ( dont know the exact time ). I if I select an item in the dialog it will return me back after 2 seconds like to the begin of the dialog.


Re: dialog problem - Micko123 - 29.04.2016

Код:
public OnPlayerPickUpPickup(playerid, pickupid) 
{ 
    if(pickupid == mybriefcase) 
    { 
        ShowPlayerDialog(playerid, 777, DIALOG_STYLE_LIST, "Briefcase", "Health - 5000$\nArmour - 5000$\n\nWeapons", "Select", "Cancel"); 
return 1; 
    } 
}



Re: dialog problem - Konstantinos - 29.04.2016

There are a couple of things you can do to prevent this.

- Using a type that disappears the pickup on pickup and respawns it after some time.
- Setting player's position few meters behind.


Re: dialog problem - Fantje - 29.04.2016

Please help me with the first option


Re: dialog problem - Darkwood17 - 29.04.2016

Quote:
Originally Posted by Fantje
Посмотреть сообщение
Please help me with the first option
Try using pickup-type 2 for this.
Код:
Disappears after pickup, respawns after 30 seconds if the player is at a distance of at least 15 meters.
CreatePickup(model, type, Float:X, Float:Y, Float:Z, virtualworld)
Change the value on the "type" parameter to 2.

You can also check out other pickup-types here: https://sampwiki.blast.hk/wiki/PickupTypes


Re: dialog problem - iKevin - 30.04.2016

Firstly get a player's position, then set it a little away from the pickup so it prevents to show up again.