Trying to create drink shop.
#1

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;
}
Reply
#2

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

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;
}
Reply
#4

Damn, that only gives me ERRORS
Reply
#5

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!"
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)