Započeo El Toni
•25. Maj 2011.• Zaključano[Pomoc] oko drink
640
pregleda
5
postova
Made Man
Balkan SA:MP
SA-MP Doprinos
Balkan SA:MP
SA-MP DoprinosNovi Član
90 / 100 XP
Početnik(0)
450
Postovi:
135
Teme:
Pridružio se:Jun 2010
25. Maj 2011.
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:
Neke slike/video za lakse dobivanje pomoci(neobavezno): //
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): //
Godfather
Balkan SA:MP
SA-MP Doprinos
Balkan SA:MP
SA-MP DoprinosNovi Član
240 / 250 XP
Početnik(0)
2,079
Postovi:
24
Teme:
Pridružio se:Feb. 2011
26. Maj 2011.
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;
}
}Morate biti prijavljeni da biste odgovorili na ovu temu.
Prijava