[Pomoc]Komanda drink

Započeo Kazzy10
5. Nov. 2010.
929
pregleda
6
postova
Kazzy10
4
Shot Caller
5. Nov. 2010.
evo komanda drink

if(strcmp(cmd, "/drink", true) == 0)
{
    if(IsPlayerConnected(playerid))
    {
if(IsPlayerInRangeOfPoint(playerid, 5, 1188.4292,-899.9197,48.0625))
{
  if(PlayerDrunk < 10)
      {
                new Float:health;
                new x_nr;
x_nr = strtok(cmdtext, idx);
if(!strlen(x_nr)) {
SendClientMessage(playerid, COLOR_GREEN, "_______Meni Pica_______");
SendClientMessage(playerid, COLOR_WHITE, "Komanda: /drink [ime pica]");
  SendClientMessage(playerid, COLOR_GREY, "Moguca imena: Pivo ($6), Vodka ($10), Viski ($10), Voda ($0), Pepsi ($2)");
SendClientMessage(playerid, COLOR_GREEN, "________________________");
return 1;
}
    if(strcmp(x_nr,"pivo",true) == 0)
{
if(PlayerInfo < 1)
{
    SendClientMessage(playerid, COLOR_WHITE, "Konobar: Oprostite, morate imati najmanje 16 godina da bi pili alkoholna pica.");
    return 1;
}
    GivePlayerMoney(playerid, - 6);
    PlayerDrunk += 1;
if(PlayerDrunk >= 5) { GameTextForPlayer(playerid, "~w~Vi ste~n~~p~Pijani", 3500, 1); }
if(GetPlayerHealth(playerid, health) < 100)
{
    if(PlayerInfo > 0) { PlayerDrunk += 1; new hp = 2 * PlayerInfo; hp += 15; SetPlayerHealth(playerid, health + hp); }
else { SetPlayerHealth(playerid, health + 15.0); }
}
}
else if(strcmp(x_nr,"vodka",true) == 0)
{
    if(PlayerInfo < 18)
{
    SendClientMessage(playerid, COLOR_WHITE, "Konobar: Morate imati najmanje 16 godina da biste pili alkohol.");
    return 1;
}
    GivePlayerMoney(playerid, - 10);
    PlayerDrunk += 2;
if(PlayerDrunk >= 5) { GameTextForPlayer(playerid, "~w~Vi ste~n~~p~pijani", 3500, 1); }
if(GetPlayerHealth(playerid, health) < 100)
{
    if(PlayerInfo > 0) { PlayerDrunk += 1; new hp = 2 * PlayerInfo; hp += 25; SetPlayerHealth(playerid, health + hp); }
else { SetPlayerHealth(playerid, health + 25.0); }
}
}
else if(strcmp(x_nr,"viski",true) == 0)
{
    if(PlayerInfo < 18)
{
    SendClientMessage(playerid, COLOR_WHITE, "Konobar: Morate imati najmanje 16 godina da biste pili alkohol.");
    return 1;
}
    GivePlayerMoney(playerid, - 10);
    PlayerDrunk += 3;
if(PlayerDrunk >= 5) { GameTextForPlayer(playerid, "~w~Vi ste~n~~p~pijani", 3500, 1); }
if(GetPlayerHealth(playerid, health) < 100)
{
    if(PlayerInfo > 0) { PlayerDrunk += 1; new hp = 2 * PlayerInfo; hp += 27; SetPlayerHealth(playerid, health + hp); }
else { SetPlayerHealth(playerid, health + 27.0); }
}
}
else if(strcmp(x_nr,"voda",true) == 0)
{
    GivePlayerMoney(playerid, 0);
    if(GetPlayerHealth(playerid, health) < 100)
{
    if(PlayerInfo > 0) { new hp = 2 * PlayerInfo; hp += 5; SetPlayerHealth(playerid, health + hp); }
else { SetPlayerHealth(playerid, health + 5.0); }
}
}
else if(strcmp(x_nr,"pepsi",true) == 0)
{
    GivePlayerMoney(playerid, - 2);
    if(GetPlayerHealth(playerid, health) < 100)
{
    if(PlayerInfo > 0) { new hp = 2 * PlayerInfo; hp += 5; SetPlayerHealth(playerid, health + hp); }
else { SetPlayerHealth(playerid, health + 5.0); }
}
}
else
{
    SendClientMessage(playerid, COLOR_WHITE, "Konobar: Neznam za to pice.");
    return 1;
}
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s pije %s.", sendername ,x_nr);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
            }
            else
            {
                SendClientMessage(playerid, COLOR_GREY, "  Nemozes vise piti, povratit ces !");
                return 1;
            }
        }
        else
        {
            SendClientMessage(playerid, COLOR_GREY, "  Niste u baru !");
            return 1;
        }
    }
    return 1;
}

i sada stavim

if(IsPlayerInRangeOfPoint(playerid, 5, 1188.4292,-899.9197,48.0625))||IsPlayerInRangeOfPoint(playerid, 5, 12.32.32.32.32..))

i pokaze me errore help?
fixman
5
Underboss
5. Nov. 2010.
if(IsPlayerInRangeOfPoint(playerid, 5, 1188.4292,-899.9197,48.0625))||IsPlayerInRangeOfPoint(playerid, 5, 12.32.32.32.32..))

wtf?? pa ne ide ovako -_-

if(IsPlayerInRangeOfPoint(playerid, 5, 1188.4292,-899.9197,48.0625|| IsPlayerInRangeOfPoint(playerid, 5, 12.32.32.32.32..))
ovako stavi..
Kazzy10
4
Shot Caller
5. Nov. 2010.
ERROR:
error 001: expected token: ")", but found "{"
if(IsPlayerInRangeOfPoint(playerid, 5, 1188.4292,-899.9197,48.0625|| IsPlayerInRangeOfPoint(playerid, 5, 1203.8730,-898.2144,48.0625))
{
Willy
5
Underboss
5. Nov. 2010.
pokusaj ovako
if(IsPlayerInRangeOfPoint(playerid, 5, 1188.4292,-899.9197,48.0625) || IsPlayerInRangeOfPoint(playerid, 5, 1203.8730,-898.2144,48.0625))
{
fixman
5
Underboss
5. Nov. 2010.
da ja sam zaboravio zatvorit ) zagradu 😄 trebalo bi ovako raditi...
Kazzy10
4
Shot Caller
5. Nov. 2010.
hvala momci 😄

Morate biti prijavljeni da biste odgovorili na ovu temu.

Prijava

© 2026 SmartShark. All rights reserved.

Powered by Momentum|v2026.3.001 Alpha