On this script ,do not at any dialog appears.
Код:
public OnPlayerPickUpPickup(playerid, pickupid)
{
if(PlayerToPoint(1.0,playerid,314.2588,-133.3436,999.6016) || PlayerToPoint(1.0,playerid,312.1760,-166.1416,999.6010))
{
ShowPlayerDialog(playerid, 9191, DIALOG_STYLE_LIST, "Gun Shop", "Flowers\nSilenced 9mm\nDesert Eagle\nShotgun\nMP5\nM4", "Ok", "Iesire");
return 1;
}
if(PlayerToPoint(1.0,playerid,369.3535,-6.0220,1001.8516) || PlayerToPoint(1.0,playerid,373.6409,-118.8025,1001.4922) || PlayerToPoint(1.0,playerid,375.6083,-67.4368,1001.5078))
{
ShowPlayerDialog(playerid, 9090, DIALOG_STYLE_LIST, "Burger Shop", "Pepsi - {00FF00}5$\n{FFFFFF}Fanta - {00FF00}5$\n{FFFFFF}Cola - {00FF00}5$\n{FFFFFF}Cartofi prajiti - {00FF00}15$\n{FFFFFF}Hamburger - {00FF00}25$\n{FFFFFF}Dublu-Hamburger - {00FF00}30$", "Ok", "Iesire");
return 1;
}
return 1;
}
Код:
if(dialogid == 9191)
{
if(response)
{
if(listitem == 0)
{
GivePlayerMoney(playerid, -500);
GivePlayerWeapon(playerid, 14, 1);
SendClientMessage(playerid, 0xFFFFFFC8, "{FFFFFF}Ai primit o floare pentru {00FF40}500${FFFFFF}.");
}
if(listitem == 1)
{
GivePlayerMoney(playerid, -1500);
GivePlayerWeapon(playerid, 23, 50);
SendClientMessage(playerid, 0xFFFFFFC8, "{FFFFFF}Ai primit un SILENCED 9MM cu 50 gloante pentru {00FF40}1.500${FFFFFF}.");
}
if(listitem == 2)
{
GivePlayerMoney(playerid, -2500);
GivePlayerWeapon(playerid, 24, 60);//deagle
SendClientMessage(playerid, 0xFFFFFFC8, "{FFFFFF}Ai primit un DEAGLE cu 60 gloante pentru {00FF40}2.500${FFFFFF}.");
}
if(listitem == 3)
{
GivePlayerMoney(playerid, -3500);
GivePlayerWeapon(playerid, 25, 25);
SendClientMessage(playerid, 0xFFFFFFC8, "{FFFFFF}Ai primit un Shotgun cu 25 gloante pentru {00FF40}3.500${FFFFFF}.");
}
if(listitem == 4)
{
GivePlayerMoney(playerid, -4500);
GivePlayerWeapon(playerid, 29, 50);
SendClientMessage(playerid, 0xFFFFFFC8, "{FFFFFF}Ai primit un MP5 cu 50 gloante pentru {00FF40}4.500${FFFFFF}.");
}
if(listitem == 5)
{
GivePlayerMoney(playerid, -5500);
GivePlayerWeapon(playerid, 31, 100);
SendClientMessage(playerid, 0xFFFFFFC8, "{FFFFFF}Ai primit un M4 cu 100 gloante pentru {00FF40}5.500${FFFFFF}.");
}
else // Pressed ESC or clicked cancel
{
SendClientMessage(playerid, COLOR_GREY, "* Ai decis sa nu cumperi arme *");
}
}
return 1;
}
if(dialogid == 9090)
{
if(response)
{
if(listitem == 0)
{
GivePlayerMoney(playerid, -5);
SetPlayerHealth(playerid, 90.0);
SendClientMessage(playerid, 0xFFFFFFC8, "{FFFFFF}Ai cumparat un PEPSI({00FF40}5$){FFFFFF}. Viata ta este acum {FF0000}90%{FFFFFF}.");
ApplyAnimation(playerid,"FOOD","EAT_Burger",4.1,1,1,1,1,1,1);
}
if(listitem == 1)
{
GivePlayerMoney(playerid, -5);
SetPlayerHealth(playerid, 90.0);
SendClientMessage(playerid, 0xFFFFFFC8, "{FFFFFF}Ai cumparat o FANTA({00FF40}5$){FFFFFF}. Viata ta este acum {FF0000}90%{FFFFFF}.");
ApplyAnimation(playerid,"FOOD","EAT_Burger",4.1,1,1,1,1,1,1);
}
if(listitem == 2)
{
GivePlayerMoney(playerid, -5);
SetPlayerHealth(playerid, 90.0);
SendClientMessage(playerid, 0xFFFFFFC8, "{FFFFFF}Ai cumparat o COLA({00FF40}5$){FFFFFF}. Viata ta este acum {FF0000}90%{FFFFFF}.");
ApplyAnimation(playerid,"FOOD","EAT_Burger",4.1,1,1,1,1,1,1);
}
if(listitem == 3)
{
GivePlayerMoney(playerid, -15);
SetPlayerHealth(playerid, 90.0);
SendClientMessage(playerid, 0xFFFFFFC8, "{FFFFFF}Ai cumparat cartofi prajiti({00FF40}15$){FFFFFF}. Viata ta este acum {FF0000}90%{FFFFFF}.");
ApplyAnimation(playerid,"FOOD","EAT_Burger",4.1,1,1,1,1,1,1);
}
if(listitem == 4)
{
GivePlayerMoney(playerid, -25);
SetPlayerHealth(playerid, 90.0);
SendClientMessage(playerid, 0xFFFFFFC8, "{FFFFFF}Ai cumparat un HAMBURGER({00FF40}25$){FFFFFF}. Viata ta este acum {FF0000}90%{FFFFFF}.");
ApplyAnimation(playerid,"FOOD","EAT_Burger",4.1,1,1,1,1,1,1);
}
if(listitem == 5)
{
GivePlayerMoney(playerid, -30);
SetPlayerHealth(playerid, 100.0);
SendClientMessage(playerid, 0xFFFFFFC8, "{FFFFFF}Ai cumparat un DUBLU-HAMBURGER({00FF40}30$){FFFFFF}. Viata ta este acum {FF0000}100%{FFFFFF}.");
ApplyAnimation(playerid,"FOOD","EAT_Burger",4.1,1,1,1,1,1,1);
}
else // Pressed ESC or clicked cancel
{
SendClientMessage(playerid, COLOR_GREY, "* Ai decis sa nu mananci nimic *");
}
}
return 1;
}
return 1;
}