SA-MP Forums Archive
a problem on DIALOGS - 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: a problem on DIALOGS (/showthread.php?tid=446174)



[FIXED]a problem on DIALOGS - 5002 - 24.06.2013

i make this script
this is about show Duty menu to player when he stay at pickup at lspd
with 3 offer
lspd biker skin
lspd 2
lspd 3
script work correctly
but have a bad problem

when i choose one offer script must style on that offer
but after 1s jump to first offer

script

ShowPlayerDialog
Код:
public OnPlayerPickUpPickup(playerid, pickupid)
{
 if (pickupid == LSPDDM)
  {
   TogglePlayerControllable(playerid,0);
   ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Choose Skin","LSPD Biker Cop\n2.LSPD 2\n3.LSPD 3","Choose","exit");
  }
OnDialogResponse
Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(response)
{
switch(LSPDDMenu)
{
case 1:
{
switch(listitem)
{
case 0:
{
SetPlayerSkin(playerid,284);
TogglePlayerControllable(playerid,1);
}
case 1:
{
SetPlayerSkin(playerid,283);
TogglePlayerControllable(playerid,1);
}
case 2:
{
SetPlayerSkin(playerid,282);
TogglePlayerControllable(playerid,1);
}
}
}
}
}
}
i want script stay on offer i choose


Respuesta: a problem on DIALOGS - JustBored - 24.06.2013

pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 1)
{
if(response)
{
switch(listitem)
{
case 0:
{
SetPlayerSkin(playerid,284);
TogglePlayerControllable(playerid,1);
}
case 1:
{
SetPlayerSkin(playerid,283);
TogglePlayerControllable(playerid,1);
}
case 2:
{
SetPlayerSkin(playerid,282);
TogglePlayerControllable(playerid,1);
}
}
}
}
}
return 1;
}



Re: a problem on DIALOGS - 5002 - 24.06.2013

your offer dont work

i think need hidepickup after player stay at it and after he choose her offer pickup spawned after a few second
what code must use for hide pickup and spawn it after choose offer


Respuesta: a problem on DIALOGS - JustBored - 24.06.2013

The type of your pickup is anyone pickupable?
https://sampwiki.blast.hk/wiki/PickupTypes