a problem on DIALOGS
#1

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

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;
}
Reply
#3

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

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


Forum Jump:


Users browsing this thread: 1 Guest(s)