[Pomoc] oko drink

Započeo El Toni, Maj 25, 2011, 21:09:44 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 3 gostiju pregledaju ovu temu.

Skripta koju koristim: DT
Detaljan opis problema: trazio samo na wiki pa sam naso kako napravit drink pa mi nie jasno de stoju kordinate za ta komanda drink?? moze mi neko pomoci?
Dio skripte:  if(!strcmp(cmdtext, "/drinks", true))
{
    ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "What is it that you want?", "Sprunk ($1)\nBeer ($2)\nWine ($3)", "Purchase", "Cancel");
    return 1;
}


public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(response)// They pressed the first button.
    {
    switch(dialogid)// If you only have one dialog, then this isn't required, but it's neater for when you implement more dialogs.
        {
case 1:// Our dialog!
        {
            switch(listitem)// Checking which listitem was selected
        {
            case 0:// The first item listed
            {
                if(GetPlayerMoney(playerid) < 1) return SendClientMessage(playerid, 0xFFFFFF, "You don't have enough cash.");
                GivePlayerMoney(playerid, -1);
                SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_SPRUNK);
            }
            case 1: // The second item listed
            {
                if(GetPlayerMoney(playerid) < 2) return SendClientMessage(playerid, 0xFFFFFF, "You don't have enough cash.");
                GivePlayerMoney(playerid, -2);
                SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_BEER);
            }
            case 2: // The third item listed
            {
                if(GetPlayerMoney(playerid) < 3) return SendClientMessage(playerid, 0xFFFFFF, "You don't have enough cash.");
                GivePlayerMoney(playerid, -3);
                SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_WINE);
            }
        }
        }
}
    }
    return 1;
}

Neke slike/video za lakse dobivanje pomoci(neobavezno): //

Koje koordinate? Jel one gdje igrac mora stajat da upise /drinks?


Nemas nigdje te kordinate stavis ovako if (IsPlayerInRangeOfPoint(playerid, 4, x,y,z)) to stavis ovdi
if(!strcmp(cmdtext, "/drinks", true))
{
if (IsPlayerInRangeOfPoint(playerid, 4, x,y,z))
{
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "What is it that you want?", "Sprunk ($1)\nBeer ($2)\nWine ($3)", "Purchase", "Cancel");
   return 1;
  }
}

hvala puno moze lock!
Poslednja Izmena: Maj 27, 2011, 14:15:59 POSLE PODNE od [DT]Gigov.so