Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //============================================================================//
- // Easy Weapons //
- // Scripted By [xB] Lordz //
- // Edited by Sean //
- //============================================================================//
- //============Include===========//
- #include <a_samp>
- #include <zcmd>
- //============Define============//
- #define COLOR_GREEN 0x008000FF
- #define COLOR_RED 0xFF0000FF
- #define DIALOG_EWEAPONS 1
- #define DIALOG_EAMMO 2
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- if(dialogid == DIALOG_EWEAPONS)
- {
- if(!response)
- SendClientMessage(playerid, COLOR_RED, "You have cancelled the Easy Weapons menu!");
- }
- if(dialogid == DIALOG_EWEAPONS)
- {
- if(response)
- {
- if(listitem == 0) //AK-47//
- {
- if(GetPlayerMoney(playerid) < 1000) return SendClientMessage(playerid, COLOR_RED, "[ERROR]: You don't have enough money to buy this weapon!");
- GivePlayerWeapon(playerid, 30, 200);
- GivePlayerMoney(playerid, -1000);
- SendClientMessage(playerid, COLOR_GREEN, "You have purchased: AK-47 For $1,000!");
- }
- if(listitem == 1) //M4//
- {
- if(GetPlayerMoney(playerid) < 1000) return SendClientMessage(playerid, COLOR_RED, "[ERROR]: You don't have enough money to buy this weapon!");
- GivePlayerWeapon(playerid, 31, 200);
- GivePlayerMoney(playerid, -1000);
- SendClientMessage(playerid, 0x33CCFFAA, "You have purchased: M4 For $1,000!");
- }
- if(listitem == 2) //Country Rifle//
- {
- if(GetPlayerMoney(playerid) < 1200) return SendClientMessage(playerid, COLOR_RED, "[ERROR]: You don't have enough money to buy this weapon!");
- GivePlayerWeapon(playerid, 33, 75);
- GivePlayerMoney(playerid, -1200);
- SendClientMessage(playerid, 0x33CCFFAA, "You have purchased: Country-Rifle For $1,200!");
- }
- if(listitem == 3) //Sniper Rifle//
- {
- if(GetPlayerMoney(playerid) < 1800) return SendClientMessage(playerid, COLOR_RED, "[ERROR]: You don't have enough money to buy this weapon!");
- GivePlayerWeapon(playerid, 34, 10);
- GivePlayerMoney(playerid, -1800);
- SendClientMessage(playerid, 0x33CCFFAA, "You have purchased: Sniper-Rifle For $1,800!");
- }
- if(listitem == 4) //MP5//
- {
- if(GetPlayerMoney(playerid) < 500) return SendClientMessage(playerid, COLOR_RED, "[ERROR]: You don't have enough money to buy this weapon!");
- GivePlayerWeapon(playerid, 29, 500);
- GivePlayerMoney(playerid, -500);
- SendClientMessage(playerid, 0x33CCFFAA, "You have purchased: MP5 For $500!");
- }
- if(listitem == 5) //Tec 9//
- {
- if(GetPlayerMoney(playerid) < 500) return SendClientMessage(playerid, COLOR_RED, "[ERROR]: You don't have enough money to buy this weapon!");
- GivePlayerWeapon(playerid, 32, 200);
- GivePlayerMoney(playerid, -500);
- SendClientMessage(playerid, 0x33CCFFAA, "You have purchased: TEC-9 For $500!");
- }
- if(listitem == 6) //UZI//
- {
- if(GetPlayerMoney(playerid) < 500) return SendClientMessage(playerid, COLOR_RED, "[ERROR]: You don't have enough money to buy this weapon!");
- GivePlayerWeapon(playerid, 28, 200);
- GivePlayerMoney(playerid, -500);
- SendClientMessage(playerid, 0x33CCFFAA, "You have purchased: Uzi For $500!");
- }
- if(listitem == 7) //Pistol//
- {
- if(GetPlayerMoney(playerid) < 200) return SendClientMessage(playerid, COLOR_RED, "[ERROR]: You don't have enough money to buy this weapon!");
- GivePlayerWeapon(playerid, 22, 200);
- GivePlayerMoney(playerid, -200);
- SendClientMessage(playerid, 0x33CCFFAA, "You have purchased: Pistol For $200!");
- }
- if(listitem == 8) //Silenced Pistol//
- {
- if(GetPlayerMoney(playerid) < 200) return SendClientMessage(playerid, COLOR_RED, "[ERROR]: You don't have enough money to buy this weapon!");
- GivePlayerWeapon(playerid, 23, 200);
- GivePlayerMoney(playerid, -200);
- SendClientMessage(playerid, 0x33CCFFAA, "You have purchased: Silenced-Pistol For $200!");
- }
- if(listitem == 9) //Desert Eagle//
- {
- if(GetPlayerMoney(playerid) < 250) return SendClientMessage(playerid, COLOR_RED, "[ERROR]: You don't have enough money to buy this weapon!");
- GivePlayerWeapon(playerid, 24, 100);
- GivePlayerMoney(playerid, -250);
- SendClientMessage(playerid, 0x33CCFFAA, "You have purchased: Desert-Eagle For $250!");
- }
- if(listitem == 10) //Knife//
- {
- if(GetPlayerMoney(playerid) < 50) return SendClientMessage(playerid, COLOR_RED, "[ERROR]: You don't have enough money to buy this weapon!");
- GivePlayerWeapon(playerid, 4, 100);
- GivePlayerMoney(playerid, -50);
- SendClientMessage(playerid, 0x33CCFFAA, "You have purchased: Knife For $50!");
- }
- if(listitem == 11) //Katana//
- {
- if(GetPlayerMoney(playerid) < 100) return SendClientMessage(playerid, COLOR_RED, "[ERROR]: You don't have enough money to buy this weapon!");
- GivePlayerWeapon(playerid, 8, 100);
- GivePlayerMoney(playerid, -100);
- SendClientMessage(playerid, 0x33CCFFAA, "You have purchased: Katana For $100!");
- }
- if(listitem == 12) //Shotgun//
- {
- if(GetPlayerMoney(playerid) < 800) return SendClientMessage(playerid, COLOR_RED, "[ERROR]: You don't have enough money to buy this weapon!");
- GivePlayerWeapon(playerid, 25, 100);
- GivePlayerMoney(playerid, -800);
- SendClientMessage(playerid, 0x33CCFFAA, "You have purchased: Shotgun For $800!");
- }
- if(listitem == 13) //Combat Shotgun//
- {
- if(GetPlayerMoney(playerid) < 800) return SendClientMessage(playerid, COLOR_RED, "[ERROR]: You don't have enough money to buy this weapon!");
- GivePlayerWeapon(playerid, 27, 50);
- GivePlayerMoney(playerid, -800);
- SendClientMessage(playerid, 0x33CCFFAA, "You have purchased: Combat-ShotGun For $800!");
- }
- if(listitem == 14) //Sawnoff Shotgun//
- {
- if(GetPlayerMoney(playerid) < 800) return SendClientMessage(playerid, COLOR_RED, "[ERROR]: You don't have enough money to buy this weapon!");
- GivePlayerWeapon(playerid, 26, 100);
- GivePlayerMoney(playerid, -800);
- SendClientMessage(playerid, 0x33CCFFAA, "You have purchased: Swanoff-Sho Gun For $800!");
- }
- if(listitem == 15) //Grenade//
- {
- if(GetPlayerMoney(playerid) < 2000) return SendClientMessage(playerid, COLOR_RED, "[ERROR]: You don't have enough money to buy this weapon!");
- GivePlayerWeapon(playerid, 16 , 1);
- GivePlayerMoney(playerid, -2000);
- SendClientMessage(playerid, 0x33CCFFAA, "You have purchased: Grenade For $2,000!");
- }
- if(listitem == 16) //Molotov//
- {
- if(GetPlayerMoney(playerid) < 1500) return SendClientMessage(playerid, COLOR_RED, "[ERROR]: You don't have enough money to buy this weapon!");
- GivePlayerWeapon(playerid, 18, 1);
- GivePlayerMoney(playerid, -1500);
- SendClientMessage(playerid, 0x33CCFFAA, "You have purchased: Moltov For $1,500!");
- }
- }
- return 1;
- }
- return 0;
- }
- COMMAND:weapons(playerid, params[])
- {
- ShowPlayerDialog(playerid, DIALOG_EWEAPONS, DIALOG_STYLE_LIST, "Easy Weapons", "AK47 ($1,000)\nM4 ($1,000)\nCountry Rifle ($1,200)\nSniper Rifle ($1,800)\nMP5 ($500)\nTec 9 ($500)\nUZI ($500)\nPistol ($200)\nSilenced Pistol ($200)\nDesert Eagle ($250)\nKnife ($50)\nKatana ($100)\nShotgun ($800)\nCombat Shotgun ($800)\nSawnoff Shotgun ($800)\nGrenade ($2,000)\nMolotov ($1,500)\n", "Buy", "Cancel");
- return 1;
- }
- COMMAND:ammo(playerid, params[])
- {
- new sz_msg [ 900 ];
- strcat( sz_msg, "[Rifles]: AK-47 [$1,000] || M4 [$1,000] || Country Rifle [$1,200] || Sniper [$1,000]\r\n");
- strcat( sz_msg, "[Sub-Machines]: Tec 9 [$500] || UZI [$500] || MP5 [$500]\r\n");
- strcat( sz_msg, "[Pistols]: Pistol [$200] || Silenced Pistol [$200] || Desert Eagle [$250]\r\n");
- strcat( sz_msg, "[Misc]: Knife [$50] || Katana [$100]\r\n");
- strcat( sz_msg, "[Shotguns]: Shotgun [$800] || Combat Shotgun [$800] || Sawnoff Shotgun [$800]\r\n");
- strcat( sz_msg, "[Explosives]: Grenade [$2,000] || Moltov [$1,500]\r\n");
- ShowPlayerDialog(playerid, DIALOG_EAMMO, DIALOG_STYLE_MSGBOX, "Weapon Ammo", sz_msg, "Close", "");
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement