dialog problem
#1

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;

Reply
#2

I don't understand. Explain it better
Reply
#3

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

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

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

Please help me with the first option
Reply
#7

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
Reply
#8

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


Forum Jump:


Users browsing this thread: 1 Guest(s)