[Pomoc]Komanda drink

Započeo Kazzy10, Novembar 05, 2010, 12:37:08 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

evo komanda drink

if(strcmp(cmd, "/drink", true) == 0)
{
    if(IsPlayerConnected(playerid))
    {
if(IsPlayerInRangeOfPoint(playerid, 5, 1188.4292,-899.9197,48.0625))
{
    if(PlayerDrunk[playerid] < 10)
      {
                new Float:health;
                new x_nr[256];
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[playerid][pAge] < 1)
{
    SendClientMessage(playerid, COLOR_WHITE, "Konobar: Oprostite, morate imati najmanje 16 godina da bi pili alkoholna pica.");
    return 1;
}
    GivePlayerMoney(playerid, - 6);
    PlayerDrunk[playerid] += 1;
if(PlayerDrunk[playerid] >= 5) { GameTextForPlayer(playerid, "~w~Vi ste~n~~p~Pijani", 3500, 1); }
if(GetPlayerHealth(playerid, health) < 100)
{
    if(PlayerInfo[playerid][pAlcoholPerk] > 0) { PlayerDrunk[playerid] += 1; new hp = 2 * PlayerInfo[playerid][pAlcoholPerk]; hp += 15; SetPlayerHealth(playerid, health + hp); }
else { SetPlayerHealth(playerid, health + 15.0); }
}
}
else if(strcmp(x_nr,"vodka",true) == 0)
{
    if(PlayerInfo[playerid][pAge] < 18)
{
    SendClientMessage(playerid, COLOR_WHITE, "Konobar: Morate imati najmanje 16 godina da biste pili alkohol.");
    return 1;
}
    GivePlayerMoney(playerid, - 10);
    PlayerDrunk[playerid] += 2;
if(PlayerDrunk[playerid] >= 5) { GameTextForPlayer(playerid, "~w~Vi ste~n~~p~pijani", 3500, 1); }
if(GetPlayerHealth(playerid, health) < 100)
{
    if(PlayerInfo[playerid][pAlcoholPerk] > 0) { PlayerDrunk[playerid] += 1; new hp = 2 * PlayerInfo[playerid][pAlcoholPerk]; hp += 25; SetPlayerHealth(playerid, health + hp); }
else { SetPlayerHealth(playerid, health + 25.0); }
}
}
else if(strcmp(x_nr,"viski",true) == 0)
{
    if(PlayerInfo[playerid][pAge] < 18)
{
    SendClientMessage(playerid, COLOR_WHITE, "Konobar: Morate imati najmanje 16 godina da biste pili alkohol.");
    return 1;
}
    GivePlayerMoney(playerid, - 10);
    PlayerDrunk[playerid] += 3;
if(PlayerDrunk[playerid] >= 5) { GameTextForPlayer(playerid, "~w~Vi ste~n~~p~pijani", 3500, 1); }
if(GetPlayerHealth(playerid, health) < 100)
{
    if(PlayerInfo[playerid][pAlcoholPerk] > 0) { PlayerDrunk[playerid] += 1; new hp = 2 * PlayerInfo[playerid][pAlcoholPerk]; 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[playerid][pAlcoholPerk] > 0) { new hp = 2 * PlayerInfo[playerid][pAlcoholPerk]; 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[playerid][pAlcoholPerk] > 0) { new hp = 2 * PlayerInfo[playerid][pAlcoholPerk]; 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?

 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..

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))
{
Poslednja Izmena: Novembar 05, 2010, 20:02:52 POSLE PODNE od Kazzy10

pokusaj ovako
if(IsPlayerInRangeOfPoint(playerid, 5, 1188.4292,-899.9197,48.0625) || IsPlayerInRangeOfPoint(playerid, 5, 1203.8730,-898.2144,48.0625))
{




da ja sam zaboravio zatvorit ) zagradu :D trebalo bi ovako raditi...