Balkan SA:MP

PAWN skriptanje, gamemodovi, filterskripte, include fajlovi, mape, pluginovi => Razgovor u vezi PAWN - skriptanja => Temu započeo: El Toni poslato Maj 25, 2011, 21:09:44 POSLE PODNE

Naslov: [Pomoc] oko drink
Poruka od: El Toni poslato Maj 25, 2011, 21:09:44 POSLE PODNE
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): //
Naslov: Odg: [Pomoc] oko drink
Poruka od: ‹Fox› poslato Maj 25, 2011, 21:16:54 POSLE PODNE
Koje koordinate? Jel one gdje igrac mora stajat da upise /drinks?
Naslov: Odg: [Pomoc] oko drink
Poruka od: El Toni poslato Maj 26, 2011, 16:20:38 POSLE PODNE
Citat: | Fox <3 | poslato Maj 25, 2011, 21:16:54 POSLE PODNE
Koje koordinate? Jel one gdje igrac mora stajat da upise /drinks?
da..
Naslov: Odg: [Pomoc] oko drink
Poruka od: [TG:RP]$--L84S--$ poslato Maj 26, 2011, 16:21:36 POSLE PODNE
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;
  }
}
Naslov: Odg: [Pomoc] oko drink
Poruka od: El Toni poslato Maj 27, 2011, 14:15:31 POSLE PODNE
hvala puno moze lock!