SA-MP Forums Archive
Wha'ts wrong with dialog? - 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: Wha'ts wrong with dialog? (/showthread.php?tid=361000)



Wha'ts wrong with dialog? - davve95 - 19.07.2012

Hi!


I made my first dialog I haven't script for a while, so maybe the error can come
from that..

pawn Код:
//#define FILTERSCRIPT

#include <a_samp>
#AmmoS
#if defined FILTERSCRIPT

public OnFilterScriptInit()
{
    AmmoS=CreatePickup(1247,1,-2628.5171,1402.0135,7.0938,0); //pickup
}
    OnPlayerPickupPickup(0,0)if(pickup==AmmoS)showPlayerDialog(0,0_weapons,DIALOG_STYLE_LIST, "Weapons","AK47\n Sniper", "buy", "channel");
{
 public onDialogResponse(playerid,dialog,response,listitem
}
public OnFilterScriptExit()
{
    return 1;
}

#else
#endif

Код:
C:\Users\Davve\Desktop\Ammo Shop.pwn(6) : error 031: unknown directive
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
Hmmm maybe I know the problem but not sure!...


Re: Wha'ts wrong with dialog? - Vince - 19.07.2012



Read some tutorials.


Re: Wha'ts wrong with dialog? - ViniBorn - 19.07.2012

#AmmoS


Re: Wha'ts wrong with dialog? - XStormiest - 19.07.2012

pawn Код:
//#define FILTERSCRIPT

#include <a_samp>
new AmmoS;
#if defined FILTERSCRIPT
#define 0_weapons 60

public OnFilterScriptInit()
{
    AmmoS=CreatePickup(1247,1,-2628.5171,1402.0135,7.0938,0); //pickup
}

public OnPlayerPickUpPickup(playerid, pickupid)
{
      if(pickupid == AmmoS)
        {
               ShowPlayerDialog(playerid,0_weapons,DIALOG_STYLE_LIST, "Weapons","AK47\n Sniper", "buy", "Cancel");
         }
    return 1;
}

public OnDialogResponse(playerid,dialogid,respose,listitem,inputtext[])
{
      if(dialogid == 0_weapons)
     {
             if(!response) return 1;
                if(response)
                  {
                             if(listitem == 0)
                               {
                                          if(GetPlayerMoney(playerid)  >= 4500)
                                            {
                                            }
                                           else SendClientMessage(playerid,-1,"You don't have enough money!");
                               }
                  }
      }
  return 1;
}

public OnFilterScriptExit()
{
    return 1;
}

#else
#endif
this was all I don't making all your script, try learning ..


Re: Wha'ts wrong with dialog? - davve95 - 19.07.2012

Okay, thanks!..


Edit: I will re-make whole script, I just made it very fast and teird a thing..