[Pomoc] Komanda /kupi

Započeo ceLL_, Septembar 25, 2010, 13:37:37 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Ovako: Moze mi neko napraviti komandu /kupi u dialogu sa sledecim: Pivo,Coca Cola,Vodka,Vino,Pepsi...

Molim nekog da mi napravi ovo!! PLS Vi lupite tamo neke kordinate a ja cu staviti moje korde...
â"Œâˆ©â"(â—•_â—•)â"Œâˆ©â"

Respect to: (à¥"_à¥") - ČιѕÑ,σ яÑ"кяÑ"αÑ,ινησ - (à¥"_à¥") , [Saw]BloodMaster

â"Œâˆ©â"(â—£_â—¢)â"Œâˆ©â"

black_dota

nadji tut za dialoge i onda skontaj malo kako se pravi ovo je previse lako napraviti




new kafana;

if(strcmp(cmd, "/kupi", true) == 0)
{
    if(PlayerToPoint(10.0,playerid,376.6681,-67.4362,1001.5078))
    {
            ShowPlayerDialog(playerid, kafana, DIALOG_STYLE_LIST, "Kafana", "CocaCola\nPivo\nStock ", "U redu", "Odustani");// dodaj sebi koliko hoces jos :)
        }
        return 1;
    }


pa onda ovo dodajes

if(dialogid == kafana)
{
if(response)
{
            new Float:health;
    if(listitem == 0)
{
GivePlayerMoney(playerid, - 50);

GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s pije CocaColu.", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
}
if(listitem == 1)
{
GivePlayerMoney(playerid, - 60);

GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s pije Pivo.", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
}
if(listitem == 2)
{
GivePlayerMoney(playerid, - 40);

GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s pije Stock.", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
}
}
return 1;
}

Ovo sam sad nabrzinu pisao..pa ako ima neka greska..vjerovatno je u zagradi... pogledaj samo ,da li sam sve zagrade zatvorio...

if(dialogid == kafana)
{
if(response)
{
            new Float:health;
    if(listitem == 0)
{
GivePlayerMoney(playerid, - 50);

GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s pije CocaColu.", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
}
if(listitem == 1)
{
GivePlayerMoney(playerid, - 60);

GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s pije Pivo.", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
}
if(listitem == 2)
{
GivePlayerMoney(playerid, - 40);

GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s pije Stock.", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
}
}
return 1;
}


Ovo dodam pod OnDialogResponse?

Ovako:

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == kafana)
{
if(response)
{
            new Float:health;
    if(listitem == 0)
{
GivePlayerMoney(playerid, - 50);

GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s pije CocaColu.", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
}
if(listitem == 1)
{
GivePlayerMoney(playerid, - 60);

GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s pije Pivo.", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
}
if(listitem == 2)
{
GivePlayerMoney(playerid, - 40);

GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s pije Stock.", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
}
}
return 1;
}
â"Œâˆ©â"(â—•_â—•)â"Œâˆ©â"

Respect to: (à¥"_à¥") - ČιѕÑ,σ яÑ"кяÑ"αÑ,ινησ - (à¥"_à¥") , [Saw]BloodMaster

â"Œâˆ©â"(â—£_â—¢)â"Œâˆ©â"

aha..samo pazi na zagrade..ja bas nisam pazio :D..

C:\Documents and Settings\Administrator\Desktop\GAMEMOD\Server MoD 1.1 KOJI RADI\Server MoD 1.1\gamemodes\mod.pwn(10133) : error 017: undefined symbol "Caffe"
C:\Documents and Settings\Administrator\Desktop\GAMEMOD\Server MoD 1.1 KOJI RADI\Server MoD 1.1\gamemodes\mod.pwn(10133) : error 017: undefined symbol "bar"
C:\Documents and Settings\Administrator\Desktop\GAMEMOD\Server MoD 1.1 KOJI RADI\Server MoD 1.1\gamemodes\mod.pwn(10133) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Administrator\Desktop\GAMEMOD\Server MoD 1.1 KOJI RADI\Server MoD 1.1\gamemodes\mod.pwn(10133) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.


Pomagaj... xD :P
â"Œâˆ©â"(â—•_â—•)â"Œâˆ©â"

Respect to: (à¥"_à¥") - ČιѕÑ,σ яÑ"кяÑ"αÑ,ινησ - (à¥"_à¥") , [Saw]BloodMaster

â"Œâˆ©â"(â—£_â—¢)â"Œâˆ©â"

black_dota

jel ti nista nemozes sam?

reci koji ti je koji red sta ti je u redu 10133

ajde postaj taj red gdje su ti errori..da vidim

evo ga

        if(dialogid == Caffe bar)
â"Œâˆ©â"(â—•_â—•)â"Œâˆ©â"

Respect to: (à¥"_à¥") - ČιѕÑ,σ яÑ"кяÑ"αÑ,ινησ - (à¥"_à¥") , [Saw]BloodMaster

â"Œâˆ©â"(â—£_â—¢)â"Œâˆ©â"

umjesto onog mog
new kafana; stavi ovako ----------------new CaffeBar;


i umjesto ovog if(dialogid == Caffe bar) stavi ---------if(dialogid == CaffeBar)
Poslednja Izmena: Septembar 25, 2010, 16:03:00 POSLE PODNE od CocaCola

C:\Documents and Settings\Administrator\Desktop\GAMEMOD\Server MoD 1.1 KOJI RADI\Server MoD 1.1\gamemodes\mod.pwn(10133) : error 017: undefined symbol "CaffeBar"
C:\Documents and Settings\Administrator\Desktop\GAMEMOD\Server MoD 1.1 KOJI RADI\Server MoD 1.1\gamemodes\mod.pwn(10142) : error 017: undefined symbol "sendername"
C:\Documents and Settings\Administrator\Desktop\GAMEMOD\Server MoD 1.1 KOJI RADI\Server MoD 1.1\gamemodes\mod.pwn(10142) : error 017: undefined symbol "sendername"
C:\Documents and Settings\Administrator\Desktop\GAMEMOD\Server MoD 1.1 KOJI RADI\Server MoD 1.1\gamemodes\mod.pwn(10142) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Administrator\Desktop\GAMEMOD\Server MoD 1.1 KOJI RADI\Server MoD 1.1\gamemodes\mod.pwn(10142) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


5 Errors.


Uradio sve tako kako kazes! I opet mi se pojavi ovih 5 errora!  :(
Evo linije:

10133:          if(dialogid == CaffeBar)

10142: GetPlayerName(playerid, sendername, sizeof(sendername));
â"Œâˆ©â"(â—•_â—•)â"Œâˆ©â"

Respect to: (à¥"_à¥") - ČιѕÑ,σ яÑ"кяÑ"αÑ,ινησ - (à¥"_à¥") , [Saw]BloodMaster

â"Œâˆ©â"(â—£_â—¢)â"Œâˆ©â"

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
new sendername[MAX_PLAYER_NAME];


jel imas ovo new sendername?? ako nemas to dodaj....

Ubicu se  :'(

Dodao sam  new sendername[MAX_PLAYER_NAME];

I sad mi izbacuje ovih 5errora  :o


C:\Documents and Settings\Administrator\Desktop\GAMEMOD\Server MoD 1.1 KOJI RADI\Server MoD 1.1\gamemodes\mod.pwn(10134) : error 017: undefined symbol "CaffeBar"
C:\Documents and Settings\Administrator\Desktop\GAMEMOD\Server MoD 1.1 KOJI RADI\Server MoD 1.1\gamemodes\mod.pwn(10144) : error 017: undefined symbol "string"
C:\Documents and Settings\Administrator\Desktop\GAMEMOD\Server MoD 1.1 KOJI RADI\Server MoD 1.1\gamemodes\mod.pwn(10144) : error 017: undefined symbol "string"
C:\Documents and Settings\Administrator\Desktop\GAMEMOD\Server MoD 1.1 KOJI RADI\Server MoD 1.1\gamemodes\mod.pwn(10144) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Administrator\Desktop\GAMEMOD\Server MoD 1.1 KOJI RADI\Server MoD 1.1\gamemodes\mod.pwn(10144) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


5 Errors.


Ne mogu da verujemmmmm!!!!!   :-[
â"Œâˆ©â"(â—•_â—•)â"Œâˆ©â"

Respect to: (à¥"_à¥") - ČιѕÑ,σ яÑ"кяÑ"αÑ,ινησ - (à¥"_à¥") , [Saw]BloodMaster

â"Œâˆ©â"(â—£_â—¢)â"Œâˆ©â"

cek ti drzis server a ne znas tako jednostavnje probleme resit omg

new string[128];


evo ti kod radi sta oces..mogli ste mu jednostavno poslati ovo iz .pwn jbt
if(strcmp(cmd, "/drink", true) == 0)
{
    if(IsPlayerConnected(playerid))
    {
        if(IsAtBar(playerid))
        {
            if(PlayerDrunk[playerid] < 10)
            {
                new Float:health;
                new x_nr[256];
x_nr = strtok(cmdtext, idx);
if(!strlen(x_nr)) {
SendClientMessage(playerid, COLOR_WHITE, "|__________________ Bar Drinks __________________|");
SendClientMessage(playerid, COLOR_WHITE, "USAGE: /drink [drinkname]");
  SendClientMessage(playerid, COLOR_GREY, "Available names: Pivo ($6), Votka ($10), Viski ($10), Voda ($2), Sok($2)");
SendClientMessage(playerid, COLOR_WHITE, "|________________________________________________|");
return 1;
}
    if(strcmp(x_nr,"pivo",true) == 0)
{
if(PlayerInfo[playerid][pAge] < 16)
{
    SendClientMessage(playerid, COLOR_WHITE, "KONOBAR:Nemas 16 godina.");
    return 1;
}
    GivePlayerMoney(playerid, - 6);
    PlayerDrunk[playerid] += 1;
if(PlayerDrunk[playerid] >= 5) { GameTextForPlayer(playerid, "~w~Ti si~n~~p~pijan", 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,"votka",true) == 0)
{
    if(PlayerInfo[playerid][pAge] < 18)
{
    SendClientMessage(playerid, COLOR_WHITE, "KONOBAR:Nemas 16 godina.");
    return 1;
}
    GivePlayerMoney(playerid, - 10);
    PlayerDrunk[playerid] += 2;
if(PlayerDrunk[playerid] >= 5) { GameTextForPlayer(playerid, "~w~Ti si~n~~p~pijan", 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:Nemas 16 godina.");
    return 1;
}
    GivePlayerMoney(playerid, - 10);
    PlayerDrunk[playerid] += 3;
if(PlayerDrunk[playerid] >= 5) { GameTextForPlayer(playerid, "~w~Ti si~n~~p~pijan", 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, - 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 if(strcmp(x_nr,"sok",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:Nemamo to pice.");
    return 1;
}
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s drinks a %s.", sendername ,x_nr);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
            }
            else
            {
                SendClientMessage(playerid, COLOR_GREY, "   Ne osjecas se dobro i ne mozes vise piti !");
                return 1;
            }
        }
        else
        {
            SendClientMessage(playerid, COLOR_GREY, "   Nisi kod bara !");
            return 1;
        }
    }
    return 1;
}