26.09.2015, 12:11
I think this problem is caused by the fact that you don't disable the checkpoint.
The following code should disable the checkpoint after the dialog is called.
Also, you could try to place DisablePlayerCheckpoint(playerid); under OnPlayerEnterCheckpoint as well.
The following code should disable the checkpoint after the dialog is called.
PHP код:
if(dialogid == dStore)
{
DisablePlayerCheckpoint(playerid); // This will disable the checkpoint
if(response)
{
if(listitem == 0)
{
if(GetPlayerMoney(playerid) < 3000)
{
SendClientMessage(playerid, COLOR_RED, "[ElderBot]:You Don't Have Enough Money!");
}
else if(GetPlayerMoney(playerid) >= 3000)
{
SendClientMessage(playerid, COLOR_PINK, "[ElderBot]:You Have Purchassed x2 Wallets from 24/7");
Wallets[playerid] += 2;
GivePlayerMoney(playerid, -3000);
}
}
if(listitem == 1)
{
if(GetPlayerMoney(playerid) < 2500)
{
SendClientMessage(playerid, COLOR_RED, "[ElderBot]:You Don't Have Enough Money!");
}
else if(GetPlayerMoney(playerid) >= 2500)
{
SendClientMessage(playerid, COLOR_PINK, "[ElderBot]:You Have Purchassed x2 Condoms from 24/7");
Condoms[playerid] += 2;
GivePlayerMoney(playerid, -2500);
}
}
if(listitem == 2)
{
if(GetPlayerMoney(playerid) < 2000)
{
SendClientMessage(playerid, COLOR_RED, "[ElderBot]:You Don't Have Enough Money!");
}
else if(GetPlayerMoney(playerid) >= 2000)
{
SendClientMessage(playerid, COLOR_PINK, "[ElderBot]:You Have Purchassed x1 Radio Jammer from 24/7");
RADIO[playerid] += 1;
GivePlayerMoney(playerid, -2000);
}
}
if(listitem == 3)
{
if(GetPlayerMoney(playerid) < 2500)
{
SendClientMessage(playerid, COLOR_RED, "[ElderBot]:You Don't Have Enough Money!");
}
else if(GetPlayerMoney(playerid) >= 2500)
{
SendClientMessage(playerid, COLOR_PINK, "[ElderBot]:You Have Purchassed x1 Rope from 24/7");
Ropes[playerid] += 1;
GivePlayerMoney(playerid, -2500);
}
}
}
}
return 1;

