Something that confused me -
PhoenixB - 22.08.2011
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,
Re: Something that confused me -
PhoenixB - 22.08.2011
Sorry for bump - Anyone know the answer?
Re: Something that confused me -
Babul - 22.08.2011
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..
Re: Something that confused me -
PhoenixB - 22.08.2011
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.
Re: Something that confused me -
PhoenixB - 22.08.2011
Bump - Anyone?
Re: Something that confused me -
veyron - 22.08.2011
Have you tried using different
pickup types ?
Re: Something that confused me -
Tee - 22.08.2011
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.
Re: Something that confused me -
PhoenixB - 22.08.2011
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 ?
Re: Something that confused me -
Tee - 22.08.2011
And I assume you're doing it on a local server, yes? Another thing, what's the pickup's ID?
Re: Something that confused me -
PhoenixB - 22.08.2011
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
Re: Something that confused me -
Tee - 22.08.2011
Isn't that a rotating pickup? Anyway try type 2 (it won't be efficient but just for debugging purposes)
Re: Something that confused me -
PhoenixB - 22.08.2011
It respawns after some time but what is the time that is re spawns ?
Re: Something that confused me -
Tee - 22.08.2011
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.
Re: Something that confused me -
PhoenixB - 22.08.2011
Just tried MODEL 2 and it appears after a late time. I want it to be there but not show the main menu constantly..
Re: Something that confused me -
veyron - 22.08.2011
Did you test Type ID 1 ? I dont remember having any problems with any pickups with this type id.
Re: Something that confused me -
Tee - 22.08.2011
Use a checkpoint instead of the pickup.
Re: Something that confused me -
PhoenixB - 22.08.2011
Pickup looks more neat, im giving a go at MODEL 19. If not ill figure a way
Re: Something that confused me -
Tee - 22.08.2011
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).
Re: Something that confused me -
Adil - 22.08.2011
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.
Re: Something that confused me -
PhoenixB - 22.08.2011
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;
}