SA-MP Forums Archive
Another problem with command only in interior - 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: Another problem with command only in interior (/showthread.php?tid=79437)



Another problem with command only in interior - Jakku - 28.05.2009

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?


Re: Another problem with command only in interior - Weirdosport - 28.05.2009

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;
    }



Re: Another problem with command only in interior - Jakku - 28.05.2009

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