01.05.2012, 16:19
pawn Код:
new russianbar;
new hitmanbar;
new italianbar;
new bikerbar;
new eshop;
pawn Код:
}
if(pickupid==russianpickupbar)
{
{
ShowPlayerDialog(playerid, russianbar, DIALOG_STYLE_LIST, "{07B007}Russians Menu","Sprunk ($25)\nVodka($50) \nBeer ($15)\nWine ($75) \nRedbull ($100)", "Purchase", "Cancel");
return 1;
}
}
if(pickupid==hitmanbar)
{
{
ShowPlayerDialog(playerid, hitmanbar, DIALOG_STYLE_LIST, "{FFF700}Hitmans Menu","Sprunk ($25)\nVodka($50) \nBeer ($15)\nWine ($75) \nRedbull ($100)\nSambuca ($120)", "Purchase", "Cancel");
return 1;
}
}
if(pickupid==italianbar)
{
{
ShowPlayerDialog(playerid, italianbar, DIALOG_STYLE_LIST, "{FF0000}Italians Menu","Sprunk ($25)\nVodka($50) \nBeer ($15)\nWine ($75) \nRedbull ($100)\nSambuca ($120)", "Purchase", "Cancel");
return 1;
}
}
if(pickupid==bikerbar)
{
{
ShowPlayerDialog(playerid, bikerbar, DIALOG_STYLE_LIST, "{1D3DCC}Bikers Menu","Sprunk ($25)\nVodka($50) \nBeer ($15)\nWine ($75) \nRedbull ($100)\nSambuca ($120)", "Purchase", "Cancel");
return 1;
}
pawn Код:
italianbar = CreatePickup(1239,1,1955.4452,1017.2618,992.4688);
russianpickupbar = CreatePickup(1239,1,1207.3923,-28.0524,1000.9531);
hitmanbar = CreatePickup(1239,1,1215.8810,-13.1529,1000.9219);
bikerbar = CreatePickup(1239,1,496.9604,-75.8275,998.7578);
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == russianbar)
{
if(response)
{
switch(listitem)
{
case 0:
{
if(GetPlayerMoney(playerid) < 25) return SendClientMessage(playerid, 0xFF0000FF, "You don't have enough cash.");
GivePlayerMoney(playerid, -25);
GetPlayerHealth(playerid,hp);
SetPlayerHealth(playerid,hp+15);
ApplyAnimation(playerid,"VENDING","VEND_Drink2_P",4.1,0,1,1,1,1,1);
return 1;
}
case 1:
{
if(GetPlayerMoney(playerid) < 50) return SendClientMessage(playerid, 0xFF0000FF, "You don't have enough cash.");
GivePlayerMoney(playerid, -50);
GetPlayerHealth(playerid,hp);
SetPlayerHealth(playerid,hp+25);
ApplyAnimation(playerid,"VENDING","VEND_Drink2_P",4.1,0,1,1,1,1,1);
return 1;
}
case 2:
{
if(GetPlayerMoney(playerid) < 15) return SendClientMessage(playerid, 0xFF0000FF, "You don't have enough cash.");
GivePlayerMoney(playerid, -15);
GetPlayerHealth(playerid,hp);
SetPlayerHealth(playerid,hp+35);
ApplyAnimation(playerid,"VENDING","VEND_Drink2_P",4.1,0,1,1,1,1,1);
return 1;
}
case 3:
{
if(GetPlayerMoney(playerid) < 75) return SendClientMessage(playerid, 0xFF0000FF, "You don't have enough cash.");
GivePlayerMoney(playerid, -75);
GetPlayerHealth(playerid,hp);
SetPlayerHealth(playerid,hp+40);
ApplyAnimation(playerid,"VENDING","VEND_Drink2_P",4.1,0,1,1,1,1,1);
return 1;
}
case 4:
{
if(GetPlayerMoney(playerid) < 100) return SendClientMessage(playerid, 0xFF0000FF, "You don't have enough cash.");
GivePlayerMoney(playerid, -100);
GetPlayerHealth(playerid,hp);
SetPlayerHealth(playerid,hp+50);
ApplyAnimation(playerid,"VENDING","VEND_Drink2_P",4.1,0,1,1,1,1,1);
return 1;
}
}
}
return 1;
}
if(dialogid == hitmanbar)
{
if(response)
{
switch(listitem)
{
case 0:
{
if(GetPlayerMoney(playerid) < 25) return SendClientMessage(playerid, 0xFF0000FF, "You don't have enough cash.");
GivePlayerMoney(playerid, -25);
GetPlayerHealth(playerid,hp);
SetPlayerHealth(playerid,hp+15);
ApplyAnimation(playerid,"VENDING","VEND_Drink2_P",4.1,0,1,1,1,1,1);
return 1;
}
case 1:
{
if(GetPlayerMoney(playerid) < 50) return SendClientMessage(playerid, 0xFF0000FF, "You don't have enough cash.");
GivePlayerMoney(playerid, -50);
GetPlayerHealth(playerid,hp);
SetPlayerHealth(playerid,hp+25);
ApplyAnimation(playerid,"VENDING","VEND_Drink2_P",4.1,0,1,1,1,1,1);
return 1;
}
case 2:
{
if(GetPlayerMoney(playerid) < 15) return SendClientMessage(playerid, 0xFF0000FF, "You don't have enough cash.");
GivePlayerMoney(playerid, -15);
GetPlayerHealth(playerid,hp);
SetPlayerHealth(playerid,hp+35);
ApplyAnimation(playerid,"VENDING","VEND_Drink2_P",4.1,0,1,1,1,1,1);
return 1;
}
case 3:
{
if(GetPlayerMoney(playerid) < 75) return SendClientMessage(playerid, 0xFF0000FF, "You don't have enough cash.");
GivePlayerMoney(playerid, -75);
GetPlayerHealth(playerid,hp);
SetPlayerHealth(playerid,hp+40);
ApplyAnimation(playerid,"VENDING","VEND_Drink2_P",4.1,0,1,1,1,1,1); //Okay. keep the reutrn 1
return 1;
}
case 4:
{
if(GetPlayerMoney(playerid) < 100) return SendClientMessage(playerid, 0xFF0000FF, "You don't have enough cash.");
GivePlayerMoney(playerid, -100);
GetPlayerHealth(playerid,hp);
SetPlayerHealth(playerid,hp+50);
ApplyAnimation(playerid,"VENDING","VEND_Drink2_P",4.1,0,1,1,1,1,1);
return 1;
}
case 5:
{
if(GetPlayerMoney(playerid) < 120) return SendClientMessage(playerid, 0xFF0000FF, "You don't have enough cash.");
GivePlayerMoney(playerid, -120);
GetPlayerHealth(playerid,hp);
SetPlayerHealth(playerid,hp+60);
ApplyAnimation(playerid,"VENDING","VEND_Drink2_P",4.1,0,1,1,1,1,1);
return 1;
}
}
}
return 1;
}
if(dialogid == italianbar)
{
if(response)
{
switch(listitem)
{
case 0:
{
if(GetPlayerMoney(playerid) < 25) return SendClientMessage(playerid, 0xFF0000FF, "You don't have enough cash.");
GivePlayerMoney(playerid, -25);
GetPlayerHealth(playerid,hp);
SetPlayerHealth(playerid,hp+15);
ApplyAnimation(playerid,"VENDING","VEND_Drink2_P",4.1,0,1,1,1,1,1);
return 1;
}
case 1:
{
if(GetPlayerMoney(playerid) < 50) return SendClientMessage(playerid, 0xFF0000FF, "You don't have enough cash.");
GivePlayerMoney(playerid, -50);
GetPlayerHealth(playerid,hp);
SetPlayerHealth(playerid,hp+25);
ApplyAnimation(playerid,"VENDING","VEND_Drink2_P",4.1,0,1,1,1,1,1);
return 1;
}
case 2:
{
if(GetPlayerMoney(playerid) < 15) return SendClientMessage(playerid, 0xFF0000FF, "You don't have enough cash.");
GivePlayerMoney(playerid, -15);
GetPlayerHealth(playerid,hp);
SetPlayerHealth(playerid,hp+35);
ApplyAnimation(playerid,"VENDING","VEND_Drink2_P",4.1,0,1,1,1,1,1);
return 1;
}
case 3:
{
if(GetPlayerMoney(playerid) < 75) return SendClientMessage(playerid, 0xFF0000FF, "You don't have enough cash.");
GivePlayerMoney(playerid, -75);
GetPlayerHealth(playerid,hp);
SetPlayerHealth(playerid,hp+40);
ApplyAnimation(playerid,"VENDING","VEND_Drink2_P",4.1,0,1,1,1,1,1);
return 1;
}
case 4:
{
if(GetPlayerMoney(playerid) < 100) return SendClientMessage(playerid, 0xFF0000FF, "You don't have enough cash.");
GivePlayerMoney(playerid, -100);
GetPlayerHealth(playerid,hp);
SetPlayerHealth(playerid,hp+50);
ApplyAnimation(playerid,"VENDING","VEND_Drink2_P",4.1,0,1,1,1,1,1);
return 1;
}
case 5:
{
if(GetPlayerMoney(playerid) < 120) return SendClientMessage(playerid, 0xFF0000FF, "You don't have enough cash.");
GivePlayerMoney(playerid, -120);
GetPlayerHealth(playerid,hp);
SetPlayerHealth(playerid,hp+60);
ApplyAnimation(playerid,"VENDING","VEND_Drink2_P",4.1,0,1,1,1,1,1);
return 1;
}
}
}
return 1;
}
if(dialogid == bikerbar)
{
if(response)
{
switch(listitem)
{
case 0:
{
if(GetPlayerMoney(playerid) < 25) return SendClientMessage(playerid, 0xFF0000FF, "You don't have enough cash.");
GivePlayerMoney(playerid, -25);
GetPlayerHealth(playerid,hp);
SetPlayerHealth(playerid,hp+15);
return 1;
}
case 1:
{
if(GetPlayerMoney(playerid) < 50) return SendClientMessage(playerid, 0xFF0000FF, "You don't have enough cash.");
GivePlayerMoney(playerid, -50);
GetPlayerHealth(playerid,hp);
SetPlayerHealth(playerid,hp+25);
return 1;
}
case 2:
{
if(GetPlayerMoney(playerid) < 15) return SendClientMessage(playerid, 0xFF0000FF, "You don't have enough cash.");
GivePlayerMoney(playerid, -15);
GetPlayerHealth(playerid,hp);
SetPlayerHealth(playerid,hp+35);
return 1;
}
case 3:
{
if(GetPlayerMoney(playerid) < 75) return SendClientMessage(playerid, 0xFF0000FF, "You don't have enough cash.");
GivePlayerMoney(playerid, -75);
GetPlayerHealth(playerid,hp);
SetPlayerHealth(playerid,hp+40);
return 1;
}
case 4:
{
if(GetPlayerMoney(playerid) < 100) return SendClientMessage(playerid, 0xFF0000FF, "You don't have enough cash.");
GivePlayerMoney(playerid, -100);
GetPlayerHealth(playerid,hp);
SetPlayerHealth(playerid,hp+50);
return 1;
}
case 5:
{
if(GetPlayerMoney(playerid) < 120) return SendClientMessage(playerid, 0xFF0000FF, "You don't have enough cash.");
GivePlayerMoney(playerid, -120);
GetPlayerHealth(playerid,hp);
SetPlayerHealth(playerid,hp+60);
return 1;
}
}
}
return 1;
}
if(dialogid == eshop)
{
if(response)
{
switch(listitem)
{
case 0:
{
if(GetPlayerMoney(playerid) < 1000) return SendClientMessage(playerid, 0xFF0000FF, "You don't have enough cash.");
GivePlayerMoney(playerid, -1000);
GivePlayerWeapon(playerid, 9, 1);
return 1;
}
case 1:
{
if(GetPlayerMoney(playerid) < 500) return SendClientMessage(playerid, 0xFF0000FF, "You don't have enough cash.");
GivePlayerMoney(playerid, -500);
GivePlayerWeapon(playerid, 16, 2);
return 1;
}
case 2:
{
if(GetPlayerMoney(playerid) < 500) return SendClientMessage(playerid, 0xFF0000FF, "You don't have enough cash.");
GivePlayerMoney(playerid, -500);
GivePlayerWeapon(playerid, 18, 2);
return 1;
}
case 3:
{
if(GetPlayerMoney(playerid) < 250) return SendClientMessage(playerid, 0xFF0000FF, "You don't have enough cash.");
GivePlayerMoney(playerid, -250);
GivePlayerWeapon(playerid, 22, 20);
return 1;
}
case 4:
{
if(GetPlayerMoney(playerid) < 250) return SendClientMessage(playerid, 0xFF0000FF, "You don't have enough cash.");
GivePlayerMoney(playerid, -250);
GivePlayerWeapon(playerid, 23, 20);
return 1;
}
case 5:
{
if(GetPlayerMoney(playerid) < 300) return SendClientMessage(playerid, 0xFF0000FF, "You don't have enough cash.");
GivePlayerMoney(playerid, -300);
GivePlayerWeapon(playerid, 24, 14);
return 1;
}
case 6:
{
if(GetPlayerMoney(playerid) < 300) return SendClientMessage(playerid, 0xFF0000FF, "You don't have enough cash.");
GivePlayerMoney(playerid, -300);
GivePlayerWeapon(playerid, 25, 16);
return 1;
}
case 7:
{
if(GetPlayerMoney(playerid) < 300) return SendClientMessage(playerid, 0xFF0000FF, "You don't have enough cash.");
GivePlayerMoney(playerid, -300);
GivePlayerWeapon(playerid, 26, 20);
return 1;
}
case 8:
{
if(GetPlayerMoney(playerid) < 300) return SendClientMessage(playerid, 0xFF0000FF, "You don't have enough cash.");
GivePlayerMoney(playerid, -300);
GivePlayerWeapon(playerid, 27, 16);
return 1;
}
case 9:
{
if(GetPlayerMoney(playerid) < 300) return SendClientMessage(playerid, 0xFF0000FF, "You don't have enough cash.");
GivePlayerMoney(playerid, -300);
GivePlayerWeapon(playerid, 28, 40);
return 1;
}
case 10:
{
if(GetPlayerMoney(playerid) < 300) return SendClientMessage(playerid, 0xFF0000FF, "You don't have enough cash.");
GivePlayerMoney(playerid, -300);
GivePlayerWeapon(playerid, 29, 40);
return 1;
}
}
}
}
return 0;
}
Its not working properly even if the chainsaw costs 1000$ its buying it for like 25$ ( and that 25$ is a drink from other dialogs)
DIALOGUE NAME " ESHOP "