08.12.2013, 21:53
When i go to pickup it doesn't show me the dialog.
What is the problem?
What is the problem?
Код:
//Tutriol By Jimmy Made by NoFeAr /************************************ | NoFeAr | | Briefcase system | | | ************************************/ #include <a_samp> #define COLOR_WHITE 0xFFFFFFFF new mybriefcase; new Float:briefcaseX = 0.0; new Float:briefcaseY = 0.0; new Float:briefcaseZ = 0.0; public OnFilterScriptInit() { print("\n--------------------------------------"); print(" Tutriol By Jimmy Made by NoFeAr "); print("--------------------------------------\n"); mybriefcase = CreatePickup(1210, 1, briefcaseX, briefcaseY, briefcaseZ, 0); mybriefcase = CreatePickup(1210, 1, 223.9407, 1860.5116, 13.1470, 0); mybriefcase = CreatePickup(1210, 1, -233.7510, 2654.8472, 62.6379, 0); mybriefcase = CreatePickup(1210, 1, -885.9767, 2784.6777, 47.2957, 0); mybriefcase = CreatePickup(1210, 1, -2244.8130, 2305.2415, 4.9691, 0); mybriefcase = CreatePickup(1210, 1, -790.9128, 1561.4110, 27.1172, 0); mybriefcase = CreatePickup(1210, 1, 1114.6312, 1730.8717, 10.8203, 0); mybriefcase = CreatePickup(1210, 1, -359.4244, 1175.0750, 19.7422, 0); mybriefcase = CreatePickup(1210, 1, -85.5241, 743.5977, 22.8342, 0); mybriefcase = CreatePickup(1210, 1, 403.2001, 2534.9236, 16.5456, 0); return 1; } public OnPlayerPickUpPickup(playerid, pickupid) { if(pickupid == mybriefcase) { ShowPlayerDialog(playerid, 777, DIALOG_STYLE_LIST, "Briefcase", "Health - 5000$\nArmour - 5000$\n\nWeapons", "Select", "Cancel"); } return 1; } public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { if(dialogid == 777) { if(response) { if(listitem ==0) { if (GetPlayerMoney(playerid) < 5000) return SendClientMessage(playerid, 0xFF0000AA, "ERROR: You don't have enough cash.") && ShowPlayerDialog(playerid, 777, DIALOG_STYLE_LIST, "Briefcase", "Health - 5000$\nArmour - 5000$\n\nWeapons", "Select", "Cancel"); ShowPlayerDialog(playerid, 777, DIALOG_STYLE_LIST, "Briefcase", "Health - 5000$\nArmour - 5000$\n\nWeapons", "Select", "Cancel"); SetPlayerHealth(playerid, 100.0); SendClientMessage(playerid, COLOR_WHITE, "You bought Health for $5000!"); } if(listitem ==1) { if(GetPlayerMoney(playerid) < 5000) return SendClientMessage(playerid, 0xFF0000AA, "ERROR: You don't have enough cash.") && ShowPlayerDialog(playerid, 777, DIALOG_STYLE_LIST, "Briefcase", "Health - 5000$\nArmour - 5000$\n\nWeapons", "Select", "Cancel"); GivePlayerMoney(playerid, -5000); ShowPlayerDialog(playerid, 777, DIALOG_STYLE_LIST, "Briefcase", "Health - 5000$\nArmour - 5000$\n\nWeapons", "Select", "Cancel"); SetPlayerArmour(playerid, 100.0); SendClientMessage(playerid, COLOR_WHITE, "You bought Armour for $5000!"); } if(listitem ==2) { ShowPlayerDialog(playerid, 888, DIALOG_STYLE_LIST, "Weapons", "M4 - 6000$\nAK47 - 6000$\nMP5 - 5000$\nUZI - 10000$\nCombat Shotgun - 10000$\nShotgun - 5000$\nDesert Eagle - 7000$\nSilent Pistol - 3000$\nSniper-8000$\nTec 9 - 3000$\nSawn-Off Shotgun - 8000$\nRPG - 10000$", "Buy", "Exit"); } } } if(dialogid ==888) { if(response) { if(listitem==0) { if(GetPlayerMoney(playerid) < 6000) return SendClientMessage(playerid, 0xFF0000AA, "ERROR: You don't have enough cash.") && ShowPlayerDialog(playerid, 777, DIALOG_STYLE_LIST, "Briefcase", "Health - 5000$\nArmour - 5000$\n\nWeapons", "Select", "Cancel"); GivePlayerMoney(playerid, -6000); GivePlayerWeapon(playerid, 31, 300); ShowPlayerDialog(playerid, 777, DIALOG_STYLE_LIST, "Briefcase", "Health - 5000$\nArmour - 5000$\n\nWeapons", "Select", "Cancel"); SendClientMessage(playerid,COLOR_WHITE, "You bought M4 with 300 Ammo."); } if(listitem==1) { if(GetPlayerMoney(playerid) < 6000) return SendClientMessage(playerid, 0xFF0000AA, "ERROR: You don't have enough cash.") && ShowPlayerDialog(playerid, 777, DIALOG_STYLE_LIST, "Briefcase", "Health - 5000$\nArmour - 5000$\n\nWeapons", "Select", "Cancel"); GivePlayerMoney(playerid, -6000); ShowPlayerDialog(playerid, 777, DIALOG_STYLE_LIST, "Briefcase", "Health - 5000$\nArmour - 5000$\n\nWeapons", "Select", "Cancel"); GivePlayerWeapon(playerid, 30, 300); SendClientMessage(playerid, COLOR_WHITE, "You bought AK 47 with 300 Ammo."); } if(listitem==2) { if(GetPlayerMoney(playerid) < 5000) return SendClientMessage(playerid, 0xFF0000AA, "ERROR: You don't have enough cash.") && ShowPlayerDialog(playerid, 777, DIALOG_STYLE_LIST, "Briefcase", "Health - 5000$\nArmour - 5000$\n\nWeapons", "Select", "Cancel"); ShowPlayerDialog(playerid, 777, DIALOG_STYLE_LIST, "Briefcase", "Health - 5000$\nArmour - 5000$\n\nWeapons", "Select", "Cancel"); GivePlayerMoney(playerid, -5000); GivePlayerWeapon(playerid, 29, 300); SendClientMessage(playerid, COLOR_WHITE, "You bought MP5 with 300 Ammo."); } if(listitem==3) { if(GetPlayerMoney(playerid) < 10000) return SendClientMessage(playerid, 0xFF0000AA, "ERROR: You don't have enough cash.") && ShowPlayerDialog(playerid, 777, DIALOG_STYLE_LIST, "Briefcase", "Health - 5000$\nArmour - 5000$\n\nWeapons", "Select", "Cancel"); GivePlayerMoney(playerid, -10000); ShowPlayerDialog(playerid, 777, DIALOG_STYLE_LIST, "Briefcase", "Health - 5000$\nArmour - 5000$\n\nWeapons", "Select", "Cancel"); GivePlayerWeapon(playerid, 28, 500); SendClientMessage(playerid, COLOR_WHITE, "You bought UZI with 300 Ammo."); } if(listitem==4) { if(GetPlayerMoney(playerid) < 10000) return SendClientMessage(playerid, 0xFF0000AA, "ERROR: You don't have enough cash.") && ShowPlayerDialog(playerid, 777, DIALOG_STYLE_LIST, "Briefcase", "Health - 5000$\nArmour - 5000$\n\nWeapons", "Select", "Cancel"); GivePlayerMoney(playerid, -10000); ShowPlayerDialog(playerid, 777, DIALOG_STYLE_LIST, "Briefcase", "Health - 5000$\nArmour - 5000$\n\nWeapons", "Select", "Cancel"); GivePlayerWeapon(playerid, 27, 300); SendClientMessage(playerid, COLOR_WHITE, "You bought SPAZ12 with 300 Ammo."); } if(listitem==5) { if(GetPlayerMoney(playerid) < 5000) return SendClientMessage(playerid, 0xFF0000AA, "ERROR: You don't have enough cash.") && ShowPlayerDialog(playerid, 777, DIALOG_STYLE_LIST, "Briefcase", "Health - 5000$\nArmour - 5000$\n\nWeapons", "Select", "Cancel"); GivePlayerMoney(playerid, -5000); ShowPlayerDialog(playerid, 777, DIALOG_STYLE_LIST, "Briefcase", "Health - 5000$\nArmour - 5000$\n\nWeapons", "Select", "Cancel"); GivePlayerWeapon(playerid, 25, 300); SendClientMessage(playerid, COLOR_WHITE, "You bought Shotgun with 300 Ammo."); } if(listitem==6) { if(GetPlayerMoney(playerid) < 7000) return SendClientMessage(playerid, 0xFF0000AA, "ERROR: You don't have enough cash.") && ShowPlayerDialog(playerid, 777, DIALOG_STYLE_LIST, "Briefcase", "Health - 5000$\nArmour - 5000$\n\nWeapons", "Select", "Cancel"); GivePlayerMoney(playerid, -7000); ShowPlayerDialog(playerid, 777, DIALOG_STYLE_LIST, "Briefcase", "Health - 5000$\nArmour - 5000$\n\nWeapons", "Select", "Cancel"); GivePlayerWeapon(playerid, 24, 100); SendClientMessage(playerid, COLOR_WHITE, "You bought Desert Eagle with 100 Ammo."); } if(listitem==7) { if(GetPlayerMoney(playerid) < 3000) return SendClientMessage(playerid, 0xFF0000AA, "ERROR: You don't have enough cash.") && ShowPlayerDialog(playerid, 777, DIALOG_STYLE_LIST, "Briefcase", "Health - 5000$\nArmour - 5000$\n\nWeapons", "Select", "Cancel"); GivePlayerMoney(playerid, -3000); ShowPlayerDialog(playerid, 777, DIALOG_STYLE_LIST, "Briefcase", "Health - 5000$\nArmour - 5000$\n\nWeapons", "Select", "Cancel"); GivePlayerWeapon(playerid, 23, 300); SendClientMessage(playerid, COLOR_WHITE, "You bought Silencer with 300 Ammo."); } if(listitem==8) { if(GetPlayerMoney(playerid) < 8000) return SendClientMessage(playerid, 0xFF0000AA, "ERROR: You don't have enough cash.") && ShowPlayerDialog(playerid, 777, DIALOG_STYLE_LIST, "Briefcase", "Health - 5000$\nArmour - 5000$\n\nWeapons", "Select", "Cancel"); GivePlayerMoney(playerid, -8000); ShowPlayerDialog(playerid, 777, DIALOG_STYLE_LIST, "Briefcase", "Health - 5000$\nArmour - 5000$\n\nWeapons", "Select", "Cancel"); GivePlayerWeapon(playerid, 34,100); SendClientMessage(playerid, COLOR_WHITE, "You bought Sniper with 100 Ammo."); } if(listitem==9) { if(GetPlayerMoney(playerid) < 3000) return SendClientMessage(playerid, 0xFF0000AA, "ERROR: You don't have enough cash.") && ShowPlayerDialog(playerid, 777, DIALOG_STYLE_LIST, "Briefcase", "Health - 5000$\nArmour - 5000$\n\nWeapons", "Select", "Cancel"); GivePlayerMoney(playerid, -3000); ShowPlayerDialog(playerid, 777, DIALOG_STYLE_LIST, "Briefcase", "Health - 5000$\nArmour - 5000$\n\nWeapons", "Select", "Cancel"); GivePlayerWeapon(playerid, 32, 300); SendClientMessage(playerid, COLOR_WHITE, "You bought Tec 9 with 300 Ammo."); } if(listitem==10) { if(GetPlayerMoney(playerid) < 8000) return SendClientMessage(playerid, 0xFF0000AA, "ERROR: You don't have enough cash.") && ShowPlayerDialog(playerid, 777, DIALOG_STYLE_LIST, "Briefcase", "Health - 5000$\nArmour - 5000$\n\nWeapons", "Select", "Cancel"); ShowPlayerDialog(playerid, 777, DIALOG_STYLE_LIST, "Briefcase", "Health - 5000$\nArmour - 5000$\n\nWeapons", "Select", "Cancel"); GivePlayerMoney(playerid, -8000); GivePlayerWeapon(playerid, 26, 100); SendClientMessage(playerid, COLOR_WHITE, "You bought Sawn off Shotgun with 100 Ammo."); } if(listitem==11) { if(GetPlayerMoney(playerid) < 10000) return SendClientMessage(playerid, 0xFF0000AA, "ERROR: You don't have enough cash.") && ShowPlayerDialog(playerid, 777, DIALOG_STYLE_LIST, "Briefcase", "Health - 5000$\nArmour - 5000$\n\nWeapons", "Select", "Cancel"); GivePlayerMoney(playerid, -10000); ShowPlayerDialog(playerid, 777, DIALOG_STYLE_LIST, "Briefcase", "Health - 5000$\nArmour - 5000$\n\nWeapons", "Select", "Cancel"); GivePlayerWeapon(playerid, 35, 1); SendClientMessage(playerid, COLOR_WHITE, "You bought RPG with 1 Ammo."); } } } return 1; }