Something that confused me
#21

pawn Code:
if(pickupid == iSherrifsLockers)
    {
            if(JustPicked[playerid] == 0)
            {    
                if(IsASherrif(playerid))
        {
            ShowPlayerDialog(playerid, DIALOG_SHERRIFLOCKERS, DIALOG_STYLE_LIST, "Sherrifs Lockers","Sherrif Duty\nWeaponary\nChange Uniform","Select","Cancel");
        }
        else
        {
            SendClientMessage(playerid, COLOUR_YELLOW, "* You are not a GroomLake Sherrif!");
            return 1;
        }
                JustPicked[playerid] = 1;
                SetTimerEx("Pickable", 5000, 1, "d", playerid);
        }
            return 1;
    }
/////////////////////////////////////
public Pickable(playerid)
{
    if(!IsPlayerInRangeOfPoint(playerid, 3, pickupx, pickupy, pickupz))
    {
        JustPicked[playerid] = 0;
        KillTimer(Pickable);
    }
    return 1;
}
Reply
#22

But - why would i need IsPlayerInRangeOfPoint for it as the dialog displays when the player is AT the pickup therefore making IsPlayerInRangeOfPoint not needed
Reply
#23

The position checker will check if the player is near the Pickup, if he's not, it will reset the JustPicked, making the player able to pick it up again.
Reply
#24

Can this not be done via JustPicked - me and MadeMan tried to do

GetPvarInt("DialogShown", etc and

SetPvarInt"DialogShown and such but that worked only for the Cancel button but when the player did select it didnt show again until re logging.
Reply
#25

Bump - Anyone know a way via "DialogShown" - Me and MadeMan did it but it only worked for Cancel button but when Select button, the Dialog was not shown again. It fixed the Solution where the main menu wasnt shown ALL the time and you were supposed to re enter pickup to view it but for Select button you couldnt see the dialog again, only when relog/GMX
Reply
#26

Just onplayerpickup, use a if condition to check if the dialog is already open, just put a variable
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)