SA-MP Forums Archive
showdialog on checkpoint - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: showdialog on checkpoint (/showthread.php?tid=132470)



showdialog on checkpoint - jamesbond007 - 07.03.2010

errors:
(424) : error 017: undefined symbol "ShowPlayerDialog"
(429) : warning 235: public function lacks forward declaration (symbol "OnDialogResponse")

Код:
public OnCheckpointEnter(playerid, checkpointid)
{
	switch(checkpointid)
	{
		case AMMU_WEAPONS:
        {
  		  ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "What is it that you want?", "M4 ($12000)\nAK47 ($12000)\nDesert Eagle ($4000)", "Purchase", "Cancel");
		}
	}
	return 1;
}
Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
  if(dialogid == 1 && response) 
	{
    switch(listitem)
    {
      case 0:
      {
        if(GetPlayerMoney(playerid) < 12000) return SendClientMessage(playerid, 0xFFFFFF, "You don't have enough cash to buy a M4.");
        GivePlayerMoney(playerid, -12000);
        GivePlayerWeapon(playerid, 31, 140);
      }
      case 1:
      {
        if(GetPlayerMoney(playerid) < 12000) return SendClientMessage(playerid, 0xFFFFFF, "You don't have enough cash to buy a AK47.");
        GivePlayerMoney(playerid, -12000);
        GivePlayerWeapon(playerid, 30, 140);
      }
      case 2:
      {
        if(GetPlayerMoney(playerid) < 4000) return SendClientMessage(playerid, 0xFFFFFF, "You don't have enough cash to buy a Desert Eagle.");
        GivePlayerMoney(playerid, -4000);
        GivePlayerWeapon(playerid, 24, 60);
      }
    }
  }
  return 1;
}



Re: showdialog on checkpoint - jamesbond007 - 07.03.2010

please help me solve this problem before i go to bed


Re: showdialog on checkpoint - Correlli - 07.03.2010

Simple: update your sa:mp includes with the new ones - 0.3 include files.


Re: showdialog on checkpoint - jamesbond007 - 07.03.2010

Quote:
Originally Posted by Don Correlli
Simple: update your sa:mp includes with the new ones - 0.3 include files.
damn your magical! thanks dude