SA-MP Forums Archive
Trying to create drink shop. - 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: Trying to create drink shop. (/showthread.php?tid=167399)



Trying to create drink shop. - Chrillzen - 12.08.2010

Hi everybody i'm trying to create a shop, anyway everything works except if you're not in the range, it does not deliver any text to the playerid, help!

Код:
if(!strcmp(cmdtext, "/buydrink", true))
{
    if(IsPlayerInRangeOfPoint(playerid, 2.0, 2130.0635,-1761.0878,13.5625,172.1949))
    ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "What drink do you want?", "Sprunk ($1)\nBeer ($2)\nWine ($3)", "Purchase", "Cancel");
 }
    else
{
    SendClientMessage(playerid,red,"You are not near the liquor store!");
    }
   return 1;
}



Re: Trying to create drink shop. - FireCat - 12.08.2010

O.o i dont understand what's appening, do you have a error?warning?
_______________________
[GDZ]leader



Re: Trying to create drink shop. - r0b - 12.08.2010

After the IF is a {-bracket missin.

Код:
if(!strcmp(cmdtext, "/buydrink", true))
{
    if(IsPlayerInRangeOfPoint(playerid, 2.0, 2130.0635,-1761.0878,13.5625,172.1949))
{ // this was missing...
    ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "What drink do you want?", "Sprunk ($1)\nBeer ($2)\nWine ($3)", "Purchase", "Cancel");
 }
    else
{
    SendClientMessage(playerid,red,"You are not near the liquor store!");
    }
   return 1;
}



Re: Trying to create drink shop. - Chrillzen - 12.08.2010

Damn, that only gives me ERRORS


Re: Trying to create drink shop. - Chrillzen - 12.08.2010

Quote:
Originally Posted by FireCat
Посмотреть сообщение
O.o i dont understand what's appening, do you have a error?warning?
_______________________
[GDZ]leader
Код:
    SendClientMessage(playerid,red,"You are not near the liquor store!");
That Message is not shown when writing the cmd out of range.

EDIT: Now i have another problem, when i write any non existing command like /sdjj, that message appears.."You are not near the liquor store!"