Something that confused me
#1

Hey guys, I've almost completed Extraterrestrial Roleplay etc factions and lockers, but ive made my lockers so the menu is shown to the faction member when the faction member has approched the pickup (dynamic so most things are done by walking to it) and such, though whilst the member flicks through other options such as the Sherrifs locker for example When choosing weapony after a few seconds it shows the main menu once again as the player is still stood at the pickup. It's the same on all locker pickups - I've tried SetPvarInt("DialogShown",1); etc on the Dialog menu and the pickup though it only worked on the Cancel button and not the select.

Any Ideas on how i can make it not show the main menu while the player is still at the pickup and must re walk to the pickup to see the menu?

Kind Regards,
Reply
#2

Sorry for bump - Anyone know the answer?
Reply
#3

if i get it correct, you dont want the main menu re-opening while youre standing on the pickup (coz it gets picked up each second).
you have set the SetPVarInt(playerid,"DialogShown",1); already, now you need to add the check if that variable is NOT set before opening the dialog:
Code:
if(GetPVarInt(playerid,"DialogShown")==0){_open_dialog_now_}
dont forget to
Code:
DeletePVar(playerid,"DialogShown");
when you closed the dialog (esc) or chosed an entry successfully, so the main menu could pop up again..
Reply
#4

I meant, the pickup constantly shows the main menu as the player is still stood at the pickup while selecting through the options.. I want to make it so that it doesnt constantly show the main menu and that it only shows the main menu when the player rewalks to the pickup. The pickup model im using is 23.
Reply
#5

Bump - Anyone?
Reply
#6

Have you tried using different pickup types ?
Reply
#7

It's not your fault it's the pickup's fault, if it's a rotating pickup (green house pickup, blue house pickup, etc) you will get the first dialog because it spins as if you just picked it up. I might sound foolish but that's the truth, It happened to me a couple times. Try using checkpoints.
Reply
#8

Hmm, not sure but i will give a go at

Code:
1
Not pickupable, exists all the time. (Suitable for completely scripted pickups using OnPlayerPickUpPickup)
Seems like the one i need huh ?
Reply
#9

And I assume you're doing it on a local server, yes? Another thing, what's the pickup's ID?
Reply
#10

Model is 1239 for the lockers and TYPE is 23, changed to 1 now and will test it now, it wont be on a local server once complete (portforwarded) once finished releasing will be hosted on Volt Host with a domain bought website and possible A Address IP also a User Control Panel developed
Reply
#11

Isn't that a rotating pickup? Anyway try type 2 (it won't be efficient but just for debugging purposes)
Reply
#12

It respawns after some time but what is the time that is re spawns ?
Reply
#13

I'm not sure, it didn't state but does it work when with type 2? If it did then it's not the type it's the pickup's model ID.
Reply
#14

Just tried MODEL 2 and it appears after a late time. I want it to be there but not show the main menu constantly..
Reply
#15

Did you test Type ID 1 ? I dont remember having any problems with any pickups with this type id.
Reply
#16

Use a checkpoint instead of the pickup.
Reply
#17

Pickup looks more neat, im giving a go at MODEL 19. If not ill figure a way
Reply
#18

I'm not forcing you to use a checkpoint and yes pickups look neater, but using a checkpoint is just for debugging, if you don't want to do that, then use a pickup that doesn't rotate (which I think all of them do).
Reply
#19

I think this might match your needs:
pawn Code:
public OnPlayerPickUpPickup(playerid, pickupid)
{
    if(pickupid == pickme)
    {
        if(JustPicked[playerid] == 0)
        {            
            //Do stuff here
            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;
}
Didn't test it.
Reply
#20

Thanks Adil though all i have already done under OnPlayerPickupPickup - ill give an example of 1 of the many lockers. and you tell me what to put above beneath it etc?

sherrif Lockers
pawn Code:
if(pickupid == iSherrifsLockers)
    {
        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;
        }
        return 1;
    }
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)