// ===========================================================================
// ============Pawn Shop by Aerotactics======================================
// =========================================================================
//
#define FILTERSCRIPT
#include <a_samp>
#include <streamer>
//===========================================
//Too many dialogs!
#define Pawn_Open 753
#define Pawn_Menu 754
#define Pawn_Help1 755
#define Pawn_Help2 756
#define Pawn_Help3 757
#define Pawn_Help4 758
#define Pawn_Help5 759
#define Pawn_Don1 760
#define Pawn_Don2 761
#define Pawn_Buy1 762
#define Pawn_Buy2 763
#define Pawn_Buy3 764
#define Pawn_Buy4 765
#define Pawn_Buy5 767
#define Pawn_Hand 768
#define Pawn_AYS1 769
#define Pawn_AYS2 770
#define Pawn_AYS3 771
#define Pawn_AYS4 772
#define Pawn_Trd1 773
#define Pawn_Trd2 774
#define Pawn_Trd3 775
#define Pawn_Trd4 776
#define Pawn_Trd5 777
#define Pawn_Trd6 778
#define Pawn_Trd7 779
#define Pawn_Trd8 780
#define Pawn_Trd9 781
#define Pawn_IGun 782
//===========================================
new floor;
new ceil;
new wall;
new wall2;
new wall3;
new wall4;
new wall5;
new wall6;
new wall7;
new wall8;
new wall9;
new wall10;
new stor;
//===========================================
new bool:invswap=false;
//===========================================
stock RemovePlayerWeapon(playerid, weaponid)
{
new pWeaponData[13][2];
for (new i = 0; i < 13; i++)
{
GetPlayerWeaponData(playerid, i, pWeaponData[i][0], pWeaponData[i][1]);
}
ResetPlayerWeapons(playerid);
for(new i=0; i<13; i++)
{
if(pWeaponData[i][0] != 0 && pWeaponData[i][0] != weaponid)
{
GivePlayerWeapon(playerid, pWeaponData[i][0], pWeaponData[i][1]);
}
}
return 0;
}
//===========================================
public OnGameModeInit()
{
floor=CreateObject(8661,2506.8994100,-1731.2998000,2089.6001000,0.0000000,0.0000000,0.0000000); //object(gnhtelgrnd_lvs) (1)
SetObjectMaterial(floor, 0, 18049, "ammu_twofloor", "gun_floor2", 0xFFFFFFFF);
ceil=CreateObject(8661,2506.8994100,-1731.2998000,2093.5,179.9950000,0.0000000,0.0000000); //object(gnhtelgrnd_lvs) (2)
SetObjectMaterial(ceil, 0, 18049, "ammu_twofloor", "gun_ceiling3", 0xFFFFFFFF);
wall=CreateObject(8661,2506.6001000,-1732.0999800,2089.6001000,90.0000000,270.0000000,0.0000000); //object(gnhtelgrnd_lvs) (1)
SetObjectMaterial(wall, 0, 9244, "stuff2_sfn", "newall10_seamless", 0xFFFFFFFF);
wall2=CreateObject(8661,2487.0000000,-1731.8994100,2089.6001000,90.0000000,90.0000000,0.0000000); //object(gnhtelgrnd_lvs) (1)
SetObjectMaterial(wall2, 0, 9244, "stuff2_sfn", "newall10_seamless", 0xFFFFFFFF);
wall3=CreateObject(8661,2506.8999000,-1721.3000500,2089.6001000,90.0000000,0.0000000,0.0000000); //object(gnhtelgrnd_lvs) (1)
SetObjectMaterial(wall3, 0, 9244, "stuff2_sfn", "newall10_seamless", 0xFFFFFFFF);
wall4=CreateObject(8661,2506.3000500,-1729.4000200,2089.6001000,90.0000000,179.9950000,0.0000000); //object(gnhtelgrnd_lvs) (1)
SetObjectMaterial(wall4, 0, 9244, "stuff2_sfn", "newall10_seamless", 0xFFFFFFFF);
wall5=CreateObject(8661,2499.1001000,-1744.5999800,2089.6001000,90.0000000,90.0000000,0.0000000); //object(gnhtelgrnd_lvs) (1)
SetObjectMaterial(wall5, 0, 9244, "stuff2_sfn", "newall10_seamless", 0xFFFFFFFF);
wall6=CreateObject(8661,2499.1001000,-1703.0999800,2082.1501000,90.0000000,90.0000000,0.0000000); //object(gnhtelgrnd_lvs) (1)
SetObjectMaterial(wall6, 0, 9244, "stuff2_sfn", "newall10_seamless", 0xFFFFFFFF);
CreateObject(1502,2499.1001000,-1724.625,2089.6001000,0.0000000,0.0000000,90.0000000); //object(gen_doorint04) (1)
wall7=CreateObject(8661,2499.1001000,-1705,2102.1001000,90.0000000,90.0000000,180.0000000); //object(gnhtelgrnd_lvs) (1)
SetObjectMaterial(wall7, 0, 9244, "stuff2_sfn", "newall10_seamless", 0xFFFFFFFF);
wall8=CreateObject(8661,2499.0996100,-1744.5996100,2089.6001000,90.0000000,90.0000000,180.0000000); //object(gnhtelgrnd_lvs) (1)
SetObjectMaterial(wall8, 0, 9244, "stuff2_sfn", "newall10_seamless", 0xFFFFFFFF);
wall9=CreateObject(8661,2499.0996100,-1703.0996100,2082.1501000,90.0000000,90.0000000,180.0000000); //object(gnhtelgrnd_lvs) (1)
SetObjectMaterial(wall9, 0, 9244, "stuff2_sfn", "newall10_seamless", 0xFFFFFFFF);
wall10=CreateObject(8661,2499.0996100,-1705,2102.1001000,90.0000000,90.0000000,0.0000000); //object(gnhtelgrnd_lvs) (1)
SetObjectMaterial(wall10, 0, 9244, "stuff2_sfn", "newall10_seamless", 0xFFFFFFFF);
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/PAWN", cmdtext, true, 10) == 0)
{
ShowPlayerDialog(playerid, 753, DIALOG_STYLE_MSGBOX, "Pawn Shop * by Aerotactics", "Welcome to the Pawn Shop, how can I help you today?", "Continue", "Leave");
return 1;
}
if (strcmp("/PAWNS", cmdtext, true, 10) == 0)
{
SetPlayerPos(playerid, 2505,-1724,2090);
return 1;
}
return 0;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid==753 && response)
{
ShowPlayerDialog(playerid, 754, DIALOG_STYLE_LIST, "What would you like to do?","Sell this item I'm holding\nTrade this item for a new item\nPawn this item\nDonate this item\nBrowse what's for sale\nHelp and Info\nIllegal Items", "Continue", "Leave");
return 1;
}
if(dialogid==754 && response)
{
switch(listitem)
{
case 0:
{
ShowPlayerDialog(playerid, 770, DIALOG_STYLE_MSGBOX, "Selling your item...","Are you sure you want to sell this item?","Yes","No");
return 1;
}
case 1:
{
ShowPlayerDialog(playerid, 771, DIALOG_STYLE_MSGBOX, "Trading your item...","Are you sure you want to trade this item?","Yes","No");
return 1;
}
case 2:
{
ShowPlayerDialog(playerid, 772, DIALOG_STYLE_MSGBOX, "Pawning your item...","Are you sure you want to Pawn this item?","Yes","No");
return 1;
}
case 3:
{
ShowPlayerDialog(playerid, 769, DIALOG_STYLE_MSGBOX, "Donating your item...","Are you sure you want to donate this item?","Yes","No");
return 1;
}
case 4:
{
new Hour, Minute;
GetPlayerTime(playerid, Hour, Minute);
if (Hour==0 && Minute==0)
{
if (invswap==false)
{
stor=random(4);
invswap=true;
}
}
if (Hour==0 && Minute==1)
{
invswap=false;
}
if (stor==0)
{
ShowPlayerDialog(playerid, 762, DIALOG_STYLE_LIST, "What would you like to purchase?","Cane ($200)\nSawn-off Shotgun ($1850)\nSniper Rifle ($2550)\nCamera ($650)", "Continue", "Leave");
return 1;
}
else if (stor==1)
{
ShowPlayerDialog(playerid, 763, DIALOG_STYLE_LIST, "What would you like to purchase?","Night Vision Goggles ($1550)\nCountry Rifle ($950)\nSilenced 9mm ($1100)\nNightstick ($500)", "Continue", "Leave");
return 1;
}
else if (stor==2)
{
ShowPlayerDialog(playerid, 764, DIALOG_STYLE_LIST, "What would you like to purchase?","Katana ($350)\nTec-9 ($1450)\nDesert Eagle ($1350)\nM4 ($4500)", "Continue", "Leave");
return 1;
}
else if (stor==3)
{
ShowPlayerDialog(playerid, 765, DIALOG_STYLE_LIST, "What would you like to purchase?","MP5 ($1650)\n9mm ($1000)\nFlowers ($100)\nParachute ($1250)", "Continue", "Leave");
return 1;
}
else if (stor==4)
{
ShowPlayerDialog(playerid, 767, DIALOG_STYLE_MSGBOX, "Inventory is empty...","There is nothing for sale right now, please come back after 12:00.","Continue", "Leave");
return 1;
}
}
case 5:
{
ShowPlayerDialog(playerid, 755, DIALOG_STYLE_MSGBOX, "Pawn Shop * Interior * Script * by Aerotactics", "A pawn shop can be used to sell, and pawn items for money. You may also trade your item. \nYou may also browse the items for sale, or just donate your item to the store.\nIf you donate, you might recieve a small amount of cash for your generousness.\n Buying an item will replace an already owned item in that slot or of the same type, so be careful.", "Continue", "");
return 1;
}
case 6:
{
ShowPlayerDialog(playerid, 782, DIALOG_STYLE_MSGBOX,"Illegal Items","These Items are not allowed to be sold to, nor sold from the Pawn Shop:\nShovel\nAll grenades\nAll dildos\nRPG\nRocket Launcher\nFlame Thrower\nMinigun\nSatchel Charge\nSpraycan\nFire Extinguisher","Continue","");
return 1;
}
}
}
if(dialogid==755 && response)
{
ShowPlayerDialog(playerid, 756, DIALOG_STYLE_MSGBOX, "Pawn Shop * Interior * Script * by Aerotactics","{FFD700}Selling Items\n{FFFFFF}If you have an item that you just don't want anymore, \nyou can get money for it by selling it.", "Continue","");
return 1;
}
if(dialogid==756 && response)
{
ShowPlayerDialog(playerid, 757, DIALOG_STYLE_MSGBOX, "Pawn Shop * Interior * Script * by Aerotactics","{FFD700}Trading Items\n{FFFFFF}If you want to still have an item, but maybe you want a better one, \nyou can trade your item for one of the same slot type or style.\nEach trade will cost $1000 to cover the cost from\n your previous item being in 'used' condition.", "Continue","");
return 1;
}
if(dialogid==757 && response)
{
ShowPlayerDialog(playerid, 758, DIALOG_STYLE_MSGBOX, "Pawn Shop * Interior * Script * by Aerotactics","{FFD700}Pawning Items\n{FFFFFF}In this case, you have an item that want to keep, \nbut need some money to pay for something else. Consider this a loan, \nand the item is collateral. The shop gives you money, and takes your weapon.","Continue","");
return 1;
}
if(dialogid==758 && response)
{
ShowPlayerDialog(playerid, 759, DIALOG_STYLE_MSGBOX, "Pawn Shop * Interior * Script * by Aerotactics","{FFD700}Pawning Items (Continued)\n{FFFFFF}If you come back to the shop before 12 at night, you can buy back your weapon, \nbut if you don't have the money in time, you lose your weapon and can't get it back.","Continue","");
return 1;
}
if(dialogid==759 && response)
{
ShowPlayerDialog(playerid, 754, DIALOG_STYLE_LIST, "What would you like to do?","Sell this item I'm holding\nTrade this item for a new item\nPawn this item\nDonate this item\nBrowse what's for sale\nHelp and Info\nIllegal Items", "Continue", "Leave");
return 1;
}
if(dialogid==781 && response)
{
ShowPlayerDialog(playerid, 754, DIALOG_STYLE_LIST, "What would you like to do?","Sell this item I'm holding\nTrade this item for a new item\nPawn this item\nDonate this item\nBrowse what's for sale\nHelp and Info\nIllegal Items", "Continue", "Leave");
return 1;
}
if(dialogid==782 && response)
{
ShowPlayerDialog(playerid, 754, DIALOG_STYLE_LIST, "What would you like to do?","Sell this item I'm holding\nTrade this item for a new item\nPawn this item\nDonate this item\nBrowse what's for sale\nHelp and Info\nIllegal Items", "Continue", "Leave");
return 1;
}
if(dialogid==769)
{
if(response)
{
new rw;
rw=GetPlayerWeapon(playerid);
if (rw==0)
{
ShowPlayerDialog(playerid, 768, DIALOG_STYLE_MSGBOX,"Crack Addict","You can't sell your own hands.","Continue","");
return 1;
}
else
{
RemovePlayerWeapon(playerid,rw);
new rand;
rand=random(4);
if (rand==3)
{
new rand2;
rand2=random(1500);
ShowPlayerDialog(playerid, 760, DIALOG_STYLE_MSGBOX,"Thank you for donating","You have donated your weapon.\nHere's a litle cash for your generosity.","Continue","");
GivePlayerMoney(playerid,rand2);
return 1;
}
else
{
ShowPlayerDialog(playerid, 761, DIALOG_STYLE_MSGBOX,"Thank you for donating","You have donated your weapon.","Continue","");
return 1;
}
}
}
else
{
ShowPlayerDialog(playerid, 754, DIALOG_STYLE_LIST, "What would you like to do?","Sell this item I'm holding\nTrade this item for a new item\nPawn this item\nDonate this item\nBrowse what's for sale\nHelp and Info\nIllegal Items", "Continue", "Leave");
return 1;
}
}
if(dialogid==760 && response)
{
ShowPlayerDialog(playerid, 754, DIALOG_STYLE_LIST, "What would you like to do?","Sell this item I'm holding\nTrade this item for a new item\nPawn this item\nDonate this item\nBrowse what's for sale\nHelp and Info\nIllegal Items", "Continue", "Leave");
return 1;
}
if(dialogid==761 && response)
{
ShowPlayerDialog(playerid, 754, DIALOG_STYLE_LIST, "What would you like to do?","Sell this item I'm holding\nTrade this item for a new item\nPawn this item\nDonate this item\nBrowse what's for sale\nHelp and Info\nIllegal Items", "Continue", "Leave");
return 1;
}
if(dialogid==767 && response)
{
ShowPlayerDialog(playerid, 754, DIALOG_STYLE_LIST, "What would you like to do?","Sell this item I'm holding\nTrade this item for a new item\nPawn this item\nDonate this item\nBrowse what's for sale\nHelp and Info\nIllegal Items", "Continue", "Leave");
return 1;
}
if(dialogid==762 && response)
{
switch(listitem)
{
case 0:
{
if (GetPlayerMoney(playerid)<200)
{
SendClientMessage(playerid,0xFF0000FF,"You can't afford that!");
ShowPlayerDialog(playerid, 754, DIALOG_STYLE_LIST, "What would you like to do?","Sell this item I'm holding\nTrade this item for a new item\nPawn this item\nDonate this item\nBrowse what's for sale\nHelp and Info\nIllegal Items", "Continue", "Leave");
return 1;
}
else
{
GivePlayerMoney(playerid, -200);
GivePlayerWeapon(playerid, 15, 50);
return 1;
}
}
case 1:
{
if (GetPlayerMoney(playerid)<1850)
{
SendClientMessage(playerid,0xFF0000FF,"You can't afford that!");
ShowPlayerDialog(playerid, 754, DIALOG_STYLE_LIST, "What would you like to do?","Sell this item I'm holding\nTrade this item for a new item\nPawn this item\nDonate this item\nBrowse what's for sale\nHelp and Info\nIllegal Items", "Continue", "Leave");
return 1;
}
else
{
GivePlayerMoney(playerid, -1850);
GivePlayerWeapon(playerid, 26, 50);
return 1;
}
}
case 2:
{
if (GetPlayerMoney(playerid)<2550)
{
SendClientMessage(playerid,0xFF0000FF,"You can't afford that!");
ShowPlayerDialog(playerid, 754, DIALOG_STYLE_LIST, "What would you like to do?","Sell this item I'm holding\nTrade this item for a new item\nPawn this item\nDonate this item\nBrowse what's for sale\nHelp and Info\nIllegal Items", "Continue", "Leave");
return 1;
}
else
{
GivePlayerMoney(playerid, -2550);
GivePlayerWeapon(playerid, 34, 50);
return 1;
}
}
case 3:
{
if (GetPlayerMoney(playerid)<650)
{
SendClientMessage(playerid,0xFF0000FF,"You can't afford that!");
ShowPlayerDialog(playerid, 754, DIALOG_STYLE_LIST, "What would you like to do?","Sell this item I'm holding\nTrade this item for a new item\nPawn this item\nDonate this item\nBrowse what's for sale\nHelp and Info\nIllegal Items", "Continue", "Leave");
return 1;
}
else
{
GivePlayerMoney(playerid, -650);
GivePlayerWeapon(playerid, 43, 50);
return 1;
}
}
}
}
if(dialogid==763 && response)
{
switch(listitem)
{
case 0:
{
if (GetPlayerMoney(playerid)<1550)
{
SendClientMessage(playerid,0xFF0000FF,"You can't afford that!");
ShowPlayerDialog(playerid, 754, DIALOG_STYLE_LIST, "What would you like to do?","Sell this item I'm holding\nTrade this item for a new item\nPawn this item\nDonate this item\nBrowse what's for sale\nHelp and Info\nIllegal Items", "Continue", "Leave");
return 1;
}
else
{
GivePlayerMoney(playerid, -1550);
GivePlayerWeapon(playerid, 44, 50);
return 1;
}
}
case 1:
{
if (GetPlayerMoney(playerid)<950)
{
SendClientMessage(playerid,0xFF0000FF,"You can't afford that!");
ShowPlayerDialog(playerid, 754, DIALOG_STYLE_LIST, "What would you like to do?","Sell this item I'm holding\nTrade this item for a new item\nPawn this item\nDonate this item\nBrowse what's for sale\nHelp and Info\nIllegal Items", "Continue", "Leave");
return 1;
}
else
{
GivePlayerMoney(playerid, -950);
GivePlayerWeapon(playerid, 33, 50);
return 1;
}
}
case 2:
{
if (GetPlayerMoney(playerid)<1100)
{
SendClientMessage(playerid,0xFF0000FF,"You can't afford that!");
ShowPlayerDialog(playerid, 754, DIALOG_STYLE_LIST, "What would you like to do?","Sell this item I'm holding\nTrade this item for a new item\nPawn this item\nDonate this item\nBrowse what's for sale\nHelp and Info\nIllegal Items", "Continue", "Leave");
return 1;
}
else
{
GivePlayerMoney(playerid, -1100);
GivePlayerWeapon(playerid, 23, 50);
return 1;
}
}
case 3:
{
if (GetPlayerMoney(playerid)<500)
{
SendClientMessage(playerid,0xFF0000FF,"You can't afford that!");
ShowPlayerDialog(playerid, 754, DIALOG_STYLE_LIST, "What would you like to do?","Sell this item I'm holding\nTrade this item for a new item\nPawn this item\nDonate this item\nBrowse what's for sale\nHelp and Info\nIllegal Items", "Continue", "Leave");
return 1;
}
else
{
GivePlayerMoney(playerid, -500);
GivePlayerWeapon(playerid, 3, 50);
return 1;
}
}
}
}
if(dialogid==764 && response)
{
switch(listitem)
{
case 0:
{
if (GetPlayerMoney(playerid)<350)
{
SendClientMessage(playerid,0xFF0000FF,"You can't afford that!");
ShowPlayerDialog(playerid, 754, DIALOG_STYLE_LIST, "What would you like to do?","Sell this item I'm holding\nTrade this item for a new item\nPawn this item\nDonate this item\nBrowse what's for sale\nHelp and Info\nIllegal Items", "Continue", "Leave");
return 1;
}
else
{
GivePlayerMoney(playerid, -350);
GivePlayerWeapon(playerid, 8, 50);
return 1;
}
}
case 1:
{
if (GetPlayerMoney(playerid)<1450)
{
SendClientMessage(playerid,0xFF0000FF,"You can't afford that!");
ShowPlayerDialog(playerid, 754, DIALOG_STYLE_LIST, "What would you like to do?","Sell this item I'm holding\nTrade this item for a new item\nPawn this item\nDonate this item\nBrowse what's for sale\nHelp and Info\nIllegal Items", "Continue", "Leave");
return 1;
}
else
{
GivePlayerMoney(playerid, -1450);
GivePlayerWeapon(playerid, 32, 50);
return 1;
}
}
case 2:
{
if (GetPlayerMoney(playerid)<1350)
{
SendClientMessage(playerid,0xFF0000FF,"You can't afford that!");
ShowPlayerDialog(playerid, 754, DIALOG_STYLE_LIST, "What would you like to do?","Sell this item I'm holding\nTrade this item for a new item\nPawn this item\nDonate this item\nBrowse what's for sale\nHelp and Info\nIllegal Items", "Continue", "Leave");
return 1;
}
else
{
GivePlayerMoney(playerid, -1350);
GivePlayerWeapon(playerid, 24, 50);
return 1;
}
}
case 3:
{
if (GetPlayerMoney(playerid)<4500)
{
SendClientMessage(playerid,0xFF0000FF,"You can't afford that!");
ShowPlayerDialog(playerid, 754, DIALOG_STYLE_LIST, "What would you like to do?","Sell this item I'm holding\nTrade this item for a new item\nPawn this item\nDonate this item\nBrowse what's for sale\nHelp and Info\nIllegal Items", "Continue", "Leave");
return 1;
}
else
{
GivePlayerMoney(playerid, -4500);
GivePlayerWeapon(playerid, 31, 50);
return 1;
}
}
}
}
if(dialogid==765 && response)
{
switch(listitem)
{
case 0:
{
if (GetPlayerMoney(playerid)<1650)
{
SendClientMessage(playerid,0xFF0000FF,"You can't afford that!");
ShowPlayerDialog(playerid, 754, DIALOG_STYLE_LIST, "What would you like to do?","Sell this item I'm holding\nTrade this item for a new item\nPawn this item\nDonate this item\nBrowse what's for sale\nHelp and Info\nIllegal Items", "Continue", "Leave");
return 1;
}
else
{
GivePlayerMoney(playerid, -1650);
GivePlayerWeapon(playerid, 29, 50);
return 1;
}
}
case 1:
{
if (GetPlayerMoney(playerid)<1000)
{
SendClientMessage(playerid,0xFF0000FF,"You can't afford that!");
ShowPlayerDialog(playerid, 754, DIALOG_STYLE_LIST, "What would you like to do?","Sell this item I'm holding\nTrade this item for a new item\nPawn this item\nDonate this item\nBrowse what's for sale\nHelp and Info\nIllegal Items", "Continue", "Leave");
return 1;
}
else
{
GivePlayerMoney(playerid, -1000);
GivePlayerWeapon(playerid, 22, 50);
return 1;
}
}
case 2:
{
if (GetPlayerMoney(playerid)<100)
{
SendClientMessage(playerid,0xFF0000FF,"You can't afford that!");
ShowPlayerDialog(playerid, 754, DIALOG_STYLE_LIST, "What would you like to do?","Sell this item I'm holding\nTrade this item for a new item\nPawn this item\nDonate this item\nBrowse what's for sale\nHelp and Info\nIllegal Items", "Continue", "Leave");
return 1;
}
else
{
GivePlayerMoney(playerid, -100);
GivePlayerWeapon(playerid, 14, 50);
return 1;
}
}
case 3:
{
if (GetPlayerMoney(playerid)<1250)
{
SendClientMessage(playerid,0xFF0000FF,"You can't afford that!");
ShowPlayerDialog(playerid, 754, DIALOG_STYLE_LIST, "What would you like to do?","Sell this item I'm holding\nTrade this item for a new item\nPawn this item\nDonate this item\nBrowse what's for sale\nHelp and Info\nIllegal Items", "Continue", "Leave");
return 1;
}
else
{
GivePlayerMoney(playerid, -1250);
GivePlayerWeapon(playerid, 46, 50);
return 1;
}
}
}
}
if(dialogid==768 && response)
{
ShowPlayerDialog(playerid, 754, DIALOG_STYLE_LIST, "What would you like to do?","Sell this item I'm holding\nTrade this item for a new item\nPawn this item\nDonate this item\nBrowse what's for sale\nHelp and Info\nIllegal Items", "Continue", "Leave");
return 1;
}
if(dialogid==771)
{
if (response)
{
new tw;
tw=GetPlayerWeapon(playerid);
if (tw==0)
{
ShowPlayerDialog(playerid, 768, DIALOG_STYLE_MSGBOX,"Crack Addict","You can't sell your own hands.","Continue","");
return 1;
}
else if (tw==1 ||tw==4)
{
ShowPlayerDialog(playerid, 773, DIALOG_STYLE_LIST, "Trade for...","Brass Knuckles\nKnife", "Continue", "Leave");
return 1;
}
else if (tw==2 ||tw==3 ||tw==5 ||tw==7 ||tw==8 ||tw==14 ||tw==15)
{
ShowPlayerDialog(playerid, 774, DIALOG_STYLE_LIST, "Trade for...","Golf Club\nNightstick\nBaseball Bat\nPool Cue\nKatana\nFlowers\nCane", "Continue", "Leave");
return 1;
}
else if (tw==22 ||tw==23 ||tw==24)
{
ShowPlayerDialog(playerid, 775, DIALOG_STYLE_LIST, "Trade for...","9mm\nSilence 9mm\nDesert Eagle", "Continue", "Leave");
return 1;
}
else if (tw==25 ||tw==26 ||tw==27)
{
ShowPlayerDialog(playerid, 776, DIALOG_STYLE_LIST, "Trade for...","Shotgun\nSawnoff Shotgun\nCombat Shotgun", "Continue", "Leave");
return 1;
}
else if (tw==28 ||tw==29 ||tw==32)
{
ShowPlayerDialog(playerid, 777, DIALOG_STYLE_LIST, "Trade for...","Micro SMG\nMP5\nTec-9", "Continue", "Leave");
return 1;
}
else if (tw==30 ||tw==31)
{
ShowPlayerDialog(playerid, 778, DIALOG_STYLE_LIST, "Trade for...","AK-47\nM4", "Continue", "Leave");
return 1;
}
else if (tw==33 ||tw==34)
{
ShowPlayerDialog(playerid, 779, DIALOG_STYLE_LIST, "Trade for...","Country Rifle\nSniper Rifle", "Continue", "Leave");
return 1;
}
else if (tw==43 ||tw==44 ||tw==45 ||tw==46)
{
ShowPlayerDialog(playerid, 780, DIALOG_STYLE_LIST, "Trade for...","Camera\nNight Vis Goggles\nThermal Goggles\nParachute", "Continue", "Leave");
return 1;
}
else if (tw==6 ||tw==9 ||tw==10 ||tw==11 ||tw==12 ||tw==13 ||tw==16 ||tw==17 ||tw==18 ||tw==35 ||tw==36 ||tw==37 ||tw==38 ||tw==39 ||tw==40 ||tw==41 ||tw==42)
{
ShowPlayerDialog(playerid, 781, DIALOG_STYLE_MSGBOX,"Illegal Items","This item is unacceptable to sell to the shop.\nA list of illegal items can be found in the main menu.","Continue","");
return 1;
}
}
else
{
ShowPlayerDialog(playerid, 754, DIALOG_STYLE_LIST, "What would you like to do?","Sell this item I'm holding\nTrade this item for a new item\nPawn this item\nDonate this item\nBrowse what's for sale\nHelp and Info\nIllegal Items", "Continue", "Leave");
return 1;
}
}
return 0;
}
public OnPlayerPickUpPickup(playerid, pickupid)
{
return 1;
}
Suggestions? Opinions? Need some feedback from the community.
|