Another problem with command only in interior
#1

I have this now:

pawn Код:
if(strcmp(cmd, "/menu", true) == 0) {
    if(GetPlayerInterior(playerid) == 4)
    SendClientMessage(playerid, COLOR_GREEN,"Restaurant Menu:");
    SendClientMessage(playerid, COLOR_YELLOW,"Two Big Stakes With Potato And Pepper Sauce (12.00$) = /bswp");
    SendClientMessage(playerid, COLOR_YELLOW,"Salmon with salad and juice (7.00$) = /swsj");
    SendClientMessage(playerid, COLOR_YELLOW,"Double Cheese Hamburger, Chips & Barbeque Sauce (13.00$) = /hcbb");
    SendClientMessage(playerid, COLOR_YELLOW,"Cup of Coffee and a cookie (2.00$) = /cac");
    SendClientMessage(playerid, COLOR_YELLOW,"Glass of cold water (1.00$) = /water");
    return 1;
  }
Why I can still do that anywhere?
Reply
#2

You need to use brackets...

pawn Код:
if(strcmp(cmd, "/menu", true) == 0)
    {
        if(GetPlayerInterior(playerid) == 4)
        {
            SendClientMessage(playerid, COLOR_GREEN,"Restaurant Menu:");
            SendClientMessage(playerid, COLOR_YELLOW,"Two Big Stakes With Potato And Pepper Sauce (12.00$) = /bswp");
            SendClientMessage(playerid, COLOR_YELLOW,"Salmon with salad and juice (7.00$) = /swsj");
            SendClientMessage(playerid, COLOR_YELLOW,"Double Cheese Hamburger, Chips & Barbeque Sauce (13.00$) = /hcbb");
            SendClientMessage(playerid, COLOR_YELLOW,"Cup of Coffee and a cookie (2.00$) = /cac");
            SendClientMessage(playerid, COLOR_YELLOW,"Glass of cold water (1.00$) = /water");
        }
    return 1;
    }
Reply
#3

Oh, I'm really stupid (Sorry of wasting your time)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)