24.10.2017, 00:11
PHP код:
if(dialogid == DIALOG_MACONHA)
{
if(response)
{
if(listitem == 0)
{
if(GetPlayerMoney(playerid) >= 10)
{
Player[playerid][pMaconha] += 10;
GivePlayerMoney(playerid, -10);
SendClientMessage(playerid, 0x33AAFFFF, "Vocк comprou pacote de 10 de maconha!");
}
}
if(listitem == 1)
{
if(GetPlayerMoney(playerid) >= 20)
{
Player[playerid][pMaconha] += 20;
GivePlayerMoney(playerid, -20);
SendClientMessage(playerid, 0x33AAFFFF, "Vocк comprou pacote de 20 de maconha!");
}
}
if(listitem == 2)
{
if(GetPlayerMoney(playerid) >= 30)
{
Player[playerid][pMaconha] += 30;
GivePlayerMoney(playerid, -30);
SendClientMessage(playerid, 0x33AAFFFF, "Vocк comprou pacote de 30 de maconha!");
}
}
if(listitem == 3)
{
if(GetPlayerMoney(playerid) >= 40)
{
Player[playerid][pMaconha] += 40;
GivePlayerMoney(playerid, -40);
SendClientMessage(playerid, 0x33AAFFFF, "Vocк comprou pacote de 40 de maconha!");
}
}
if(listitem == 4)
{
if(GetPlayerMoney(playerid) >= 50)
{
Player[playerid][pMaconha] += 50;
GivePlayerMoney(playerid, -50);
SendClientMessage(playerid, 0x33AAFFFF, "Vocк comprou pacote de 50 de maconha!");
}
}
if(listitem == 5)
{
if(GetPlayerMoney(playerid) >= 60)
{
Player[playerid][pMaconha] += 60;
GivePlayerMoney(playerid, -60);
SendClientMessage(playerid, 0x33AAFFFF, "Vocк comprou pacote de 60 de maconha!");
}
}
if(listitem == 6)
{
if(GetPlayerMoney(playerid) >= 70)
{
Player[playerid][pMaconha] += 70;
GivePlayerMoney(playerid, -70);
SendClientMessage(playerid, 0x33AAFFFF, "Vocк comprou pacote de 70 de maconha!");
}
}
if(listitem == 7)
{
if(GetPlayerMoney(playerid) >= 80)
{
Player[playerid][pMaconha] += 80;
GivePlayerMoney(playerid, -80);
SendClientMessage(playerid, 0x33AAFFFF, "Vocк comprou pacote de 80 de maconha!");
}
}
if(listitem == 8)
{
if(GetPlayerMoney(playerid) >= 90)
{
Player[playerid][pMaconha] += 90;
GivePlayerMoney(playerid, -90);
SendClientMessage(playerid, 0x33AAFFFF, "Vocк comprou pacote de 90 de maconha!");
}
}
if(listitem == 9)
{
if(GetPlayerMoney(playerid) >= 90)
{
Player[playerid][pMaconha] += 100;
GivePlayerMoney(playerid, -100);
SendClientMessage(playerid, 0x33AAFFFF, "Vocк comprou pacote de 100 de maconha!");
}
}
}
}
if(dialogid == DIALOG_COCAINA)
{
if(response)
{
if(listitem == 0)
{
if(GetPlayerMoney(playerid) >= 20)
{
Player[playerid][pCocaina] += 10;
GivePlayerMoney(playerid, -20);
SendClientMessage(playerid, 0x33AAFFFF, "Vocк comprou 10 de pу!");
}
}
if(listitem == 1)
{
if(GetPlayerMoney(playerid) >= 40)
{
Player[playerid][pCocaina] += 20;
GivePlayerMoney(playerid, -40);
SendClientMessage(playerid, 0x33AAFFFF, "Vocк comprou 20 de pу!");
}
}
if(listitem == 2)
{
if(GetPlayerMoney(playerid) >= 60)
{
Player[playerid][pCocaina] += 30;
GivePlayerMoney(playerid, -60);
SendClientMessage(playerid, 0x33AAFFFF, "Vocк comprou 30 de pу!");
}
}
if(listitem == 3)
{
if(GetPlayerMoney(playerid) >= 80)
{
Player[playerid][pCocaina] += 40;
GivePlayerMoney(playerid, -80);
SendClientMessage(playerid, 0x33AAFFFF, "Vocк comprou 40 de pу!");
}
}
if(listitem == 4)
{
if(GetPlayerMoney(playerid) >= 100)
{
Player[playerid][pCocaina] += 50;
GivePlayerMoney(playerid, -100);
SendClientMessage(playerid, 0x33AAFFFF, "Vocк comprou 50 de pу!");
}
}
if(listitem == 5)
{
if(GetPlayerMoney(playerid) >= 120)
{
Player[playerid][pCocaina] += 60;
GivePlayerMoney(playerid, -120);
SendClientMessage(playerid, 0x33AAFFFF, "Vocк comprou 60 de pу!");
}
}
if(listitem == 6)
{
if(GetPlayerMoney(playerid) >= 140)
{
Player[playerid][pCocaina] += 70;
GivePlayerMoney(playerid, -140);
SendClientMessage(playerid, 0x33AAFFFF, "Vocк comprou 70 de pу!");
}
}
if(listitem == 7)
{
if(GetPlayerMoney(playerid) >= 160)
{
Player[playerid][pCocaina] += 80;
GivePlayerMoney(playerid, -160);
SendClientMessage(playerid, 0x33AAFFFF, "Vocк comprou 80 de pу!");
}
}
if(listitem == 8)
{
if(GetPlayerMoney(playerid) >= 180)
{
Player[playerid][pCocaina] += 90;
GivePlayerMoney(playerid, -180);
SendClientMessage(playerid, 0x33AAFFFF, "Vocк comprou 90 de pу!");
}
}
if(listitem == 9)
{
if(GetPlayerMoney(playerid) >= 200)
{
Player[playerid][pCocaina] += 100;
GivePlayerMoney(playerid, -200);
SendClientMessage(playerid, 0x33AAFFFF, "Vocк comprou 100 de pу!");
}
}
}
}
if(dialogid == DIALOG_LANCA)
{
if(response)
{
if(listitem == 0)
{
if(GetPlayerMoney(playerid) >= 10)
{
Player[playerid][pLanca] += 10;
GivePlayerMoney(playerid, -10);
SendClientMessage(playerid, 0x33AAFFFF, "Vocк comprou pacote de 10 de Lanзa!");
}
}
if(listitem == 1)
{
if(GetPlayerMoney(playerid) >= 20)
{
Player[playerid][pLanca] += 20;
GivePlayerMoney(playerid, -20);
SendClientMessage(playerid, 0x33AAFFFF, "Vocк comprou pacote de 20 de Lanзa!");
}
}
if(listitem == 2)
{
if(GetPlayerMoney(playerid) >= 30)
{
Player[playerid][pLanca] += 30;
GivePlayerMoney(playerid, -30);
SendClientMessage(playerid, 0x33AAFFFF, "Vocк comprou pacote de 30 de Lanзa!");
}
}
if(listitem == 3)
{
if(GetPlayerMoney(playerid) >= 40)
{
Player[playerid][pLanca] += 40;
GivePlayerMoney(playerid, -40);
SendClientMessage(playerid, 0x33AAFFFF, "Vocк comprou pacote de 40 de Lanзa!");
}
}
if(listitem == 4)
{
if(GetPlayerMoney(playerid) >= 50)
{
Player[playerid][pLanca] += 50;
GivePlayerMoney(playerid, -50);
SendClientMessage(playerid, 0x33AAFFFF, "Vocк comprou pacote de 50 de Lanзa!");
}
}
if(listitem == 5)
{
if(GetPlayerMoney(playerid) >= 60)
{
Player[playerid][pLanca] += 60;
GivePlayerMoney(playerid, -60);
SendClientMessage(playerid, 0x33AAFFFF, "Vocк comprou pacote de 60 de Lanзa!");
}
}
if(listitem == 6)
{
if(GetPlayerMoney(playerid) >= 70)
{
Player[playerid][pLanca] += 70;
GivePlayerMoney(playerid, -70);
SendClientMessage(playerid, 0x33AAFFFF, "Vocк comprou pacote de 70 de Lanзa!");
}
}
if(listitem == 7)
{
if(GetPlayerMoney(playerid) >= 80)
{
Player[playerid][pLanca] += 80;
GivePlayerMoney(playerid, -80);
SendClientMessage(playerid, 0x33AAFFFF, "Vocк comprou pacote de 80 de Lanзa!");
}
}
if(listitem == 8)
{
if(GetPlayerMoney(playerid) >= 90)
{
Player[playerid][pLanca] += 90;
GivePlayerMoney(playerid, -90);
SendClientMessage(playerid, 0x33AAFFFF, "Vocк comprou pacote de 90 de Lanзa!");
}
}
if(listitem == 9)
{
if(GetPlayerMoney(playerid) >= 90)
{
Player[playerid][pLanca] += 100;
GivePlayerMoney(playerid, -100);
SendClientMessage(playerid, 0x33AAFFFF, "Vocк comprou pacote de 100 de Lanзa!");
}
}
}
}
if(dialogid == DIALOG_LANCA)
{
if(response)
{
if(listitem == 0)
{
if(GetPlayerMoney(playerid) >= 10)
{
Player[playerid][pLanca] += 10;
GivePlayerMoney(playerid, -10);
SendClientMessage(playerid, 0x33AAFFFF, "Vocк comprou 10 Caixas de Lanзa!");
}
}
if(listitem == 1)
{
if(GetPlayerMoney(playerid) >= 20)
{
Player[playerid][pLanca] += 20;
GivePlayerMoney(playerid, -20);
SendClientMessage(playerid, 0x33AAFFFF, "Vocк comprou 20 Caixas de Lanзa!");
}
}
if(listitem == 2)
{
if(GetPlayerMoney(playerid) >= 30)
{
Player[playerid][pLanca] += 30;
GivePlayerMoney(playerid, -30);
SendClientMessage(playerid, 0x33AAFFFF, "Vocк comprou 30 Caixas de Lanзa!");
}
}
if(listitem == 3)
{
if(GetPlayerMoney(playerid) >= 40)
{
Player[playerid][pLanca] += 40;
GivePlayerMoney(playerid, -40);
SendClientMessage(playerid, 0x33AAFFFF, "Vocк comprou 40 Caixas de Lanзa!");
}
}
if(listitem == 4)
{
if(GetPlayerMoney(playerid) >= 50)
{
Player[playerid][pLanca] += 50;
GivePlayerMoney(playerid, -50);
SendClientMessage(playerid, 0x33AAFFFF, "Vocк comprou 50 Caixas de Lanзa!");
}
}
if(listitem == 5)
{
if(GetPlayerMoney(playerid) >= 60)
{
Player[playerid][pLanca] += 60;
GivePlayerMoney(playerid, -60);
SendClientMessage(playerid, 0x33AAFFFF, "Vocк comprou 60 Caixas de Lanзa!");
}
}
if(listitem == 6)
{
if(GetPlayerMoney(playerid) >= 70)
{
Player[playerid][pLanca] += 70;
GivePlayerMoney(playerid, -70);
SendClientMessage(playerid, 0x33AAFFFF, "Vocк comprou 70 Caixas de Lanзa!");
}
}
if(listitem == 7)
{
if(GetPlayerMoney(playerid) >= 80)
{
Player[playerid][pLanca] += 80;
GivePlayerMoney(playerid, -80);
SendClientMessage(playerid, 0x33AAFFFF, "Vocк comprou 80 Caixas de Lanзa!");
}
}
if(listitem == 8)
{
if(GetPlayerMoney(playerid) >= 90)
{
Player[playerid][pLanca] += 90;
GivePlayerMoney(playerid, -90);
SendClientMessage(playerid, 0x33AAFFFF, "Vocк comprou 90 Caixas de Lanзa!");
}
}
if(listitem == 9)
{
if(GetPlayerMoney(playerid) >= 90)
{
Player[playerid][pLanca] += 100;
GivePlayerMoney(playerid, -100);
SendClientMessage(playerid, 0x33AAFFFF, "Vocк comprou 100 Caixas de Lanзa!");
}
}
}
}
if(dialogid == DIALOG_FOGOS)
{
if(response)
{
if(listitem == 0)
{
if(GetPlayerMoney(playerid) >= 20)
{
Player[playerid][pFogos] += 10;
GivePlayerMoney(playerid, -20);
SendClientMessage(playerid, 0x33AAFFFF, "Vocк comprou 10 de Fogos!");
}
}
if(listitem == 1)
{
if(GetPlayerMoney(playerid) >= 40)
{
Player[playerid][pFogos] += 20;
GivePlayerMoney(playerid, -40);
SendClientMessage(playerid, 0x33AAFFFF, "Vocк comprou 20 de Fogos!");
}
}
if(listitem == 2)
{
if(GetPlayerMoney(playerid) >= 60)
{
Player[playerid][pFogos] += 30;
GivePlayerMoney(playerid, -60);
SendClientMessage(playerid, 0x33AAFFFF, "Vocк comprou 30 de Fogos!");
}
}
if(listitem == 3)
{
if(GetPlayerMoney(playerid) >= 80)
{
Player[playerid][pFogos] += 40;
GivePlayerMoney(playerid, -80);
SendClientMessage(playerid, 0x33AAFFFF, "Vocк comprou 40 de Fogos!");
}
}
if(listitem == 4)
{
if(GetPlayerMoney(playerid) >= 100)
{
Player[playerid][pFogos] += 50;
GivePlayerMoney(playerid, -100);
SendClientMessage(playerid, 0x33AAFFFF, "Vocк comprou 50 de Fogos!");
}
}
if(listitem == 5)
{
if(GetPlayerMoney(playerid) >= 120)
{
Player[playerid][pFogos] += 60;
GivePlayerMoney(playerid, -120);
SendClientMessage(playerid, 0x33AAFFFF, "Vocк comprou 60 de Fogos!");
}
}
if(listitem == 6)
{
if(GetPlayerMoney(playerid) >= 140)
{
Player[playerid][pFogos] += 70;
GivePlayerMoney(playerid, -140);
SendClientMessage(playerid, 0x33AAFFFF, "Vocк comprou 70 de Fogos!");
}
}
if(listitem == 7)
{
if(GetPlayerMoney(playerid) >= 160)
{
Player[playerid][pFogos] += 80;
GivePlayerMoney(playerid, -160);
SendClientMessage(playerid, 0x33AAFFFF, "Vocк comprou 80 de Fogos!");
}
}
if(listitem == 8)
{
if(GetPlayerMoney(playerid) >= 180)
{
Player[playerid][pFogos] += 90;
GivePlayerMoney(playerid, -180);
SendClientMessage(playerid, 0x33AAFFFF, "Vocк comprou 90 de Fogos!");
}
}
if(listitem == 9)
{
if(GetPlayerMoney(playerid) >= 200)
{
Player[playerid][pFogos] += 100;
GivePlayerMoney(playerid, -200);
SendClientMessage(playerid, 0x33AAFFFF, "Vocк comprou 100 de Fogos!");
}
}
}
}
if(dialogid == DIALOG_VENDERFOGOS)
{
if(response)
{
if(listitem == 0)
{
if(Player[playerid][pFogueteiro] == 1)
{
{
ShowPlayerDialog(playerid, DIALOG_FOGOS, DIALOG_STYLE_LIST, "{FFFFFF}Pacotes de Fogos", "Fogos de 10 - R$ 20\nFogos de 20 - R$ 40\nFogos de 30 - R$ 60\nFogos de 40 - R$ 80\nFogos de 50 - R$ 100\nFogos de 60 - R$ 120\nFogos de 70 - R$ 140\nFogos de 80 - R$ 160\nFogos de 90 - R$ 180\nFogos de 100 - R$ 200", "Comprar", "Cancelar");
}
}
else
{
SendClientMessage(playerid, CorErro, "[ERRO] Vocк nгo й Fogueteiro!");
return 1;
}
}
}
}
if(dialogid == DIALOG_DROGAS)
{
if(response)
{
if(listitem == 0)
{
if(Player[playerid][pVapor] == 1)
{
if(Player[playerid][pMaconha] >= 0)
{
ShowPlayerDialog(playerid, DIALOG_MACONHA, DIALOG_STYLE_LIST, "{FFFFFF}Pacotes de Maconha", "Pacote de 10 - R$ 10\nPacote de 20 - R$ 20\nPacote de 30 - R$ 30\nPacote de 40 - R$ 40\nPacote de 50 - R$ 50\nPacote de 60 - R$ 60\nPacote de 70 - R$ 70\nPacote de 80 - R$ 80\nPacote de 90 - R$ 90\nPacote de 100 - R$ 100", "Comprar", "Cancelar");
}
}
else
{
SendClientMessage(playerid, CorErro, "[ERRO] Vocк nгo й VAPOR!");
return 1;
}
}
if(listitem == 1)
{
if(Player[playerid][pVapor] == 1)
{
if(Player[playerid][pCocaina] >= 0)
{
ShowPlayerDialog(playerid, DIALOG_COCAINA, DIALOG_STYLE_LIST, "{FFFFFF}Pacotes de Cocaina", "Pу de 10 - R$ 20\nPу de 20 - R$ 40\nPу de 30 - R$ 60\nPу de 40 - R$ 80\nPу de 50 - R$ 100\nPу de 60 - R$ 120\nPу de 70 - R$ 140\nPу de 80 - R$ 160\nPу de 90 - R$ 180\nPу de 100 - R$ 200", "Comprar", "Cancelar");
}
}
else
{
SendClientMessage(playerid, CorErro, "[ERRO] Vocк nгo й VAPOR!");
return 1;
}
}
if(listitem == 2)
{
if(Player[playerid][pVapor] == 1)
{
if(Player[playerid][pLanca] >= 0)
{
ShowPlayerDialog(playerid, DIALOG_LANCA, DIALOG_STYLE_LIST, "{FFFFFF}Pacуtes Lanзa", "Lanзa de 10 - R$ 20\nLanзa de 20 - R$ 40\nLanзa de 30 - R$ 60\nLanзa de 40 - R$ 80\nLanзa de 50 - R$ 100\nLanзa de 60 - R$ 120\nLanзa de 70 - R$ 140\nLanзa de 80 - R$ 160\nLanзa de 90 - R$ 180\nLanзa de 100 - R$ 200", "Comprar", "Cancelar");
}
}
else
{
SendClientMessage(playerid, CorErro, "[ERRO] Vocк nгo й VAPOR!");
return 1;
}
}
if(listitem == 3)
{
if(Player[playerid][pVapor] == 1)
{
if(Player[playerid][pLanca] >= 0)
{
ShowPlayerDialog(playerid, DIALOG_LANCA, DIALOG_STYLE_LIST, "{FFFFFF}Caixas Lanзa", "Lanзa de 10 - R$ 20\nLanзa de 20 - R$ 40\nLanзa de 30 - R$ 60\nLanзa de 40 - R$ 80\nLanзa de 50 - R$ 100\nLanзa de 60 - R$ 120\nLanзa de 70 - R$ 140\nLanзa de 80 - R$ 160\nLanзa de 90 - R$ 180\nLanзa de 100 - R$ 200", "Comprar", "Cancelar");
}
}
else
{
SendClientMessage(playerid, CorErro, "[ERRO] Vocк nгo й VAPOR!");
return 1;
}
}
if(listitem == 4)
{
if(Player[playerid][pFogueteiro] == 1)
{
{
ShowPlayerDialog(playerid, DIALOG_FOGOS, DIALOG_STYLE_LIST, "{FFFFFF}Pacotes de Fogos", "Fogos de 10 - R$ 20\nFogos de 20 - R$ 40\nFogos de 30 - R$ 60\nFogos de 40 - R$ 80\nFogos de 50 - R$ 100\nFogos de 60 - R$ 120\nFogos de 70 - R$ 140\nFogos de 80 - R$ 160\nFogos de 90 - R$ 180\nFogos de 100 - R$ 200", "Comprar", "Cancelar");
}
}
else
{
SendClientMessage(playerid, CorErro, "[ERRO] Vocк nгo й Fogueteiro!");
return 1;
}
}
}
}