Wha'ts wrong with dialog?
#1

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



Read some tutorials.
Reply
#3

#AmmoS
Reply
#4

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 ..
Reply
#5

Okay, thanks!..


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


Forum Jump:


Users browsing this thread: 1 Guest(s)