[Ajuda] Dialog de comprar armas FS
#1

Peguei esse Fs e e liguei qdo vo no pickup pra ocmpra e clico em buy apaarece a mensagem vc ja esta logado '-' / :S

#include <a_samp>


new weapons;

public OnFilterScriptInit()

{

weapons = CreatePickup(1242,1,2176.109375,1618.991210,999.97 6562);

return 1;

}
public OnPlayerPickUpPickup(playerid, pickupid)

{

if(pickupid == weapons)

{

ShowPlayerDialog(playerid, 2, DIALOG_STYLE_LIST, "Choose a weapon", "Deagle \n MP5 \n M4 \n Shotgun ", "Buy", "Cancel");

return 1;

}
return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 5)
{
if(response)
{

if(GetPlayerMoney(playerid) >= 10000)
{

if(listitem == 0)

{

GivePlayerWeapon(playerid, 24, 9999);

}

if(listitem == 1)

{

GivePlayerWeapon(playerid, 29, 9999);

}

if(listitem == 2)

{

GivePlayerWeapon(playerid, 32, 9999);

return 1;

}

if(listitem == 3)

{

GivePlayerWeapon(playerid, 25, 9999);

return 1;

}

}





}

}

return 1;
}
Reply
#2

Mude os Dialogs ID, pois se tiver um dialog com o mesmo numero nгo vai funcionar.
Reply
#3

mudei continuo msm coisa
Reply
#4

Tenta esse :

pawn Код:
#include <a_samp>


new weapons;

 public OnFilterScriptInit()

      {
      weapons = CreatePickup(1242,1,2176.109375,1618.991210,999.976562);
      return 1;
      }

      public OnPlayerPickUpPickup(playerid, pickupid)
      {
      if(pickupid == weapons)
      {
      ShowPlayerDialog(playerid, 78657567, DIALOG_STYLE_LIST, "Choose a weapon", "Deagle\nMP5\nM4\nShotgun", "Buy", "Cancel");
      return 1;
      }
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 78657567)
{
if(response)
{
if(GetPlayerMoney(playerid) >= 10000)
{
                              if(listitem == 0)
                              {
                              GivePlayerWeapon(playerid, 24, 9999);
                              }
                              if(listitem == 1)
                              {
                              GivePlayerWeapon(playerid, 29, 9999);
                              }
                              if(listitem == 2)
                              {
                              GivePlayerWeapon(playerid, 32, 9999);
                              return 1;
                              }
                              if(listitem == 3)
                              {
                              GivePlayerWeapon(playerid, 25, 9999);
                              return 1;
                              }
                              }
}
}
return 1;
}
Reply
#5

deu 9 erros flavio
Reply
#6

Quote:
Originally Posted by brundavid
Посмотреть сообщение
deu 9 erros flavio
Meche-se no Include A_samp ? se sim pegue o original
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)