Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * This is free and unencumbered software released into the public domain.
- *
- * Anyone is free to copy, modify, publish, use, compile, sell, or
- * distribute this software, either in source code form or as a compiled
- * binary, for any purpose, commercial or non-commercial, and by any
- * means.
- *
- * In jurisdictions that recognize copyright laws, the author or authors
- * of this software dedicate any and all copyright interest in the
- * software to the public domain. We make this dedication for the benefit
- * of the public at large and to the detriment of our heirs and
- * successors. We intend this dedication to be an overt act of
- * relinquishment in perpetuity of all present and future rights to this
- * software under copyright law.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- * OTHER DEALINGS IN THE SOFTWARE.
- *
- * For more information, please refer to <http://unlicense.org/>
- */
- /*============================================================*\
- FileName : iWeaponStore.pwn
- FilterScript/Gamemode Name : iFarbod Weapon Store
- Version : 1.0.0
- Author : iFarbod <http://ifarbod.webs.com>
- License : Unlicense <http://unlicense.org/>
- Started Coding on : 2014/03/19 23:55
- Finished Coding on : 2014/03/22 14:23
- \*============================================================*/
- /*============================================================*\
- Credits :
- Zeex for ZCMD
- Y_Less for SSCANF, YSI, Whirlpool plugin and foreach
- ITB CompuPhase for PAWN
- SA:MP Team for both SA:MP Client and server
- \*============================================================*/
- /* ========= DEFINES ========= */
- #define DIALOG_IWSTORE 90
- #define DIALOG_IWSTORE_MELEE 93
- #define DIALOG_IWSTORE_HANDGUN 94
- #define DIALOG_IWSTORE_SUBMACHINEGUN 95
- #define DIALOG_IWSTORE_ASSAULTRIFLE 96
- #define DIALOG_IWSTORE_SNIPERRIFLE 97
- #define DIALOG_IWSTORE_SHOTGUN 98
- #define DIALOG_IWSTORE_HEAVY 99
- #define DIALOG_IWSTORE_PROJECTILE 100
- // Colors
- #define COLOR_DEFAULT 0xE6E6E6FF
- #define COLOR_PRIMARY 0x3071A9FF
- #define COLOR_SUCCESS 0x449D44FF
- #define COLOR_INFO 0x31B0D5FF
- #define COLOR_WARNING 0xEC971FFF
- #define COLOR_DANGER 0xC9302CFF
- /* ========= INCLUDES ========= */
- #include <a_samp>
- #include <zcmd>
- // #include <sscanf2>
- #include <YSI\y_ini>
- /* ========= VARS ========= */
- new
- KnifePrice,
- NightstickPrice,
- PistolPrice,
- CombatPistolPrice,
- MicroSMGPrice,
- SMGPrice,
- AssaultRiflePrice,
- CarbineRiflePrice,
- SniperRiflePrice,
- AssaultShotgunPrice,
- PumpShotgunPrice,
- SawedOffShotgunPrice,
- GrenadeLauncherPrice,
- MinigunPrice,
- RPGPrice,
- GrenadePrice,
- TearGasPrice;
- /* ========= FORWARDS ========= */
- forward LoadINIData(name[], value[]); // thanks to Y_Less
- /* ========= PUBLIC FUNCS ========= */
- public LoadINIData(name[], value[])
- {
- INI_Int("KnifePrice", KnifePrice);
- INI_Int("NightstickPrice", NightstickPrice);
- INI_Int("PistolPrice", PistolPrice);
- INI_Int("CombatPistolPrice", CombatPistolPrice);
- INI_Int("MicroSMGPrice", MicroSMGPrice);
- INI_Int("SMGPrice", SMGPrice);
- INI_Int("AssaultRiflePrice", AssaultRiflePrice);
- INI_Int("CarbineRiflePrice", CarbineRiflePrice);
- INI_Int("SniperRiflePrice", SniperRiflePrice);
- INI_Int("AssaultShotgunPrice", AssaultShotgunPrice);
- INI_Int("PumpShotgunPrice", PumpShotgunPrice);
- INI_Int("SawedOffShotgunPrice", SawedOffShotgunPrice);
- INI_Int("GrenadeLauncherPrice", GrenadeLauncherPrice);
- INI_Int("MinigunPrice", MinigunPrice);
- INI_Int("RPGPrice", RPGPrice);
- INI_Int("GrenadePrice", GrenadePrice);
- // INI_Int("MolotovPrice", MolotovPrice);
- INI_Int("TearGasPrice", TearGasPrice);
- return 1;
- }
- /* ========= FS CALLBACKS ========= */
- public OnFilterScriptInit()
- {
- print("\n=============================================");
- print(" iWeaponStore Filterscript by iFarbod loaded");
- print("=============================================\n");
- INI_ParseFile("iWStore.ini", "LoadINIData"); // thanks to Y_Less
- return 1;
- }
- public OnFilterScriptExit()
- {
- return 1;
- }
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- switch(dialogid)
- {
- case DIALOG_IWSTORE:
- {
- if(response)
- {
- switch(listitem)
- {
- case 0:
- {
- if(!IsPlayerSpawned(playerid)) return SendClientMessage(playerid, COLOR_DANGER, "You must spawned to do this!");
- ShowMeleeCat(playerid);
- }
- case 1:
- {
- if(!IsPlayerSpawned(playerid)) return SendClientMessage(playerid, COLOR_DANGER, "You must spawned to do this!");
- ShowHandGunCat(playerid);
- }
- case 2:
- {
- if(!IsPlayerSpawned(playerid)) return SendClientMessage(playerid, COLOR_DANGER, "You must spawned to do this!");
- ShowSubmachineGunCat(playerid);
- }
- case 3:
- {
- if(!IsPlayerSpawned(playerid)) return SendClientMessage(playerid, COLOR_DANGER, "You must spawned to do this!");
- ShowAssaultRifleCat(playerid);
- }
- case 4:
- {
- if(!IsPlayerSpawned(playerid)) return SendClientMessage(playerid, COLOR_DANGER, "You must spawned to do this!");
- ShowSniperRifleCat(playerid);
- }
- case 5:
- {
- if(!IsPlayerSpawned(playerid)) return SendClientMessage(playerid, COLOR_DANGER, "You must spawned to do this!");
- ShowShotgunCat(playerid);
- }
- case 6:
- {
- if(!IsPlayerSpawned(playerid)) return SendClientMessage(playerid, COLOR_DANGER, "You must spawned to do this!");
- ShowHeavyCat(playerid);
- }
- case 7:
- {
- if(!IsPlayerSpawned(playerid)) return SendClientMessage(playerid, COLOR_DANGER, "You must spawned to do this!");
- ShowProjectileCat(playerid);
- }
- }
- }
- }
- case DIALOG_IWSTORE_MELEE:
- {
- if(response)
- {
- switch(listitem)
- {
- case 0: // Knife
- {
- if(GetPlayerMoney(playerid) >= KnifePrice)
- {
- if(IsPlayerSpawned(playerid))
- {
- GivePlayerMoney(playerid, -KnifePrice);
- GivePlayerWeapon(playerid, WEAPON_KNIFE, 1);
- ShowMeleeCat(playerid);
- }
- else
- {
- return SendClientMessage(playerid, COLOR_DANGER, "You must spawned to do this!");
- }
- }
- else
- {
- ShowMoneyError(playerid);
- ShowMeleeCat(playerid);
- }
- }
- case 1: // Nightstick
- {
- if(GetPlayerMoney(playerid) >= NightstickPrice)
- {
- if(IsPlayerSpawned(playerid))
- {
- GivePlayerMoney(playerid, -NightstickPrice);
- GivePlayerWeapon(playerid, WEAPON_NITESTICK, 1);
- ShowMeleeCat(playerid);
- }
- else
- {
- return SendClientMessage(playerid, COLOR_DANGER, "You must spawned to do this!");
- }
- }
- else
- {
- ShowMoneyError(playerid);
- ShowMeleeCat(playerid);
- }
- }
- }
- }
- else
- {
- if(!IsPlayerSpawned(playerid)) return SendClientMessage(playerid, COLOR_DANGER, "You must spawned to do this!");
- ShowWeaponCats(playerid);
- }
- }
- case DIALOG_IWSTORE_HANDGUN:
- {
- if(response)
- {
- switch(listitem)
- {
- case 0: // Pistol
- {
- if(GetPlayerMoney(playerid) >= PistolPrice)
- {
- if(IsPlayerSpawned(playerid))
- {
- GivePlayerMoney(playerid, -PistolPrice);
- GivePlayerWeapon(playerid, WEAPON_COLT45, 100);
- ShowHandGunCat(playerid);
- }
- else
- {
- return SendClientMessage(playerid, COLOR_DANGER, "You must spawned to do this!");
- }
- }
- else
- {
- ShowMoneyError(playerid);
- ShowHandGunCat(playerid);
- }
- }
- case 1: // Combat Pistol (Desert Eagle)
- {
- if(GetPlayerMoney(playerid) >= CombatPistolPrice)
- {
- if(IsPlayerSpawned(playerid))
- {
- GivePlayerMoney(playerid, -CombatPistolPrice);
- GivePlayerWeapon(playerid, WEAPON_DEAGLE, 100);
- ShowHandGunCat(playerid);
- }
- else
- {
- return SendClientMessage(playerid, COLOR_DANGER, "You must spawned to do this!");
- }
- }
- else
- {
- ShowMoneyError(playerid);
- ShowHandGunCat(playerid);
- }
- }
- }
- }
- else
- {
- if(!IsPlayerSpawned(playerid)) SendClientMessage(playerid, COLOR_DANGER, "You must spawned to do this!");
- ShowWeaponCats(playerid);
- }
- }
- case DIALOG_IWSTORE_SUBMACHINEGUN:
- {
- if(response)
- {
- switch(listitem)
- {
- case 0: // Micro SMG
- {
- if(GetPlayerMoney(playerid) >= MicroSMGPrice)
- {
- if(IsPlayerSpawned(playerid))
- {
- GivePlayerMoney(playerid, -MicroSMGPrice);
- GivePlayerWeapon(playerid, WEAPON_UZI, 150);
- ShowSubmachineGunCat(playerid);
- }
- else
- {
- return SendClientMessage(playerid, COLOR_DANGER, "You must spawned to do this!");
- }
- }
- else
- {
- ShowMoneyError(playerid);
- ShowSubmachineGunCat(playerid);
- }
- }
- case 1: // SMG
- {
- if(GetPlayerMoney(playerid) >= SMGPrice)
- {
- if(IsPlayerSpawned(playerid))
- {
- GivePlayerMoney(playerid, -SMGPrice);
- GivePlayerWeapon(playerid, WEAPON_MP5, 120);
- ShowSubmachineGunCat(playerid);
- }
- else
- {
- return SendClientMessage(playerid, COLOR_DANGER, "You must spawned to do this!");
- }
- }
- else
- {
- ShowMoneyError(playerid);
- ShowSubmachineGunCat(playerid);
- }
- }
- }
- }
- else
- {
- if(!IsPlayerSpawned(playerid)) SendClientMessage(playerid, COLOR_DANGER, "You must spawned to do this!");
- ShowWeaponCats(playerid);
- }
- }
- case DIALOG_IWSTORE_ASSAULTRIFLE:
- {
- if(response)
- {
- switch(listitem)
- {
- case 0: // Assault Rifle (AK-47)
- {
- if(GetPlayerMoney(playerid) >= AssaultRiflePrice)
- {
- if(IsPlayerSpawned(playerid))
- {
- GivePlayerMoney(playerid, -AssaultRiflePrice);
- GivePlayerWeapon(playerid, WEAPON_AK47, 120);
- ShowAssaultRifleCat(playerid);
- }
- else
- {
- return SendClientMessage(playerid, COLOR_DANGER, "You must spawned to do this!");
- }
- }
- else
- {
- ShowMoneyError(playerid);
- ShowAssaultRifleCat(playerid);
- }
- }
- case 1: // Carbine Rifle (M4)
- {
- if(GetPlayerMoney(playerid) >= CarbineRiflePrice)
- {
- if(IsPlayerSpawned(playerid))
- {
- GivePlayerMoney(playerid, -CarbineRiflePrice);
- GivePlayerWeapon(playerid, WEAPON_M4, 150);
- ShowAssaultRifleCat(playerid);
- }
- else
- {
- return SendClientMessage(playerid, COLOR_DANGER, "You must spawned to do this!");
- }
- }
- else
- {
- ShowMoneyError(playerid);
- ShowAssaultRifleCat(playerid);
- }
- }
- }
- }
- else
- {
- if(!IsPlayerSpawned(playerid)) SendClientMessage(playerid, COLOR_DANGER, "You must spawned to do this!");
- ShowWeaponCats(playerid);
- }
- }
- case DIALOG_IWSTORE_SNIPERRIFLE:
- {
- if(response)
- {
- switch(listitem)
- {
- case 0: // Sniper Rifle
- {
- if(GetPlayerMoney(playerid) >= SniperRiflePrice)
- {
- if(IsPlayerSpawned(playerid))
- {
- GivePlayerMoney(playerid, -SniperRiflePrice);
- GivePlayerWeapon(playerid, WEAPON_SNIPER, 21);
- ShowSniperRifleCat(playerid);
- }
- else
- {
- return SendClientMessage(playerid, COLOR_DANGER, "You must spawned to do this!");
- }
- }
- else
- {
- ShowMoneyError(playerid);
- ShowSniperRifleCat(playerid);
- }
- }
- }
- }
- else
- {
- if(!IsPlayerSpawned(playerid)) SendClientMessage(playerid, COLOR_DANGER, "You must spawned to do this!");
- ShowWeaponCats(playerid);
- }
- }
- case DIALOG_IWSTORE_SHOTGUN:
- {
- if(response)
- {
- switch(listitem)
- {
- case 0: // Assault Shotgun (SPAS-12/Combat Shotgun)
- {
- if(GetPlayerMoney(playerid) >= AssaultShotgunPrice)
- {
- if(IsPlayerSpawned(playerid))
- {
- GivePlayerMoney(playerid, -AssaultShotgunPrice);
- GivePlayerWeapon(playerid, WEAPON_SHOTGSPA, 100);
- ShowShotgunCat(playerid);
- }
- else
- {
- return SendClientMessage(playerid, COLOR_DANGER, "You must spawned to do this!");
- }
- }
- else
- {
- ShowMoneyError(playerid);
- ShowShotgunCat(playerid);
- }
- }
- case 1: // Pump Shotgun (Pump Action Shotgun/Regular Shotgun)
- {
- if(GetPlayerMoney(playerid) >= PumpShotgunPrice)
- {
- if(IsPlayerSpawned(playerid))
- {
- GivePlayerMoney(playerid, -PumpShotgunPrice);
- GivePlayerWeapon(playerid, WEAPON_SHOTGUN, 150);
- ShowShotgunCat(playerid);
- }
- else
- {
- return SendClientMessage(playerid, COLOR_DANGER, "You must spawned to do this!");
- }
- }
- else
- {
- ShowMoneyError(playerid);
- ShowShotgunCat(playerid);
- }
- }
- case 2: // Sawed Off Shotgun (Sawnoff)
- {
- if(GetPlayerMoney(playerid) >= SawedOffShotgunPrice)
- {
- if(IsPlayerSpawned(playerid))
- {
- GivePlayerMoney(playerid, -SawedOffShotgunPrice);
- GivePlayerWeapon(playerid, WEAPON_SAWEDOFF, 70);
- ShowShotgunCat(playerid);
- }
- else
- {
- return SendClientMessage(playerid, COLOR_DANGER, "You must spawned to do this!");
- }
- }
- else
- {
- ShowMoneyError(playerid);
- ShowShotgunCat(playerid);
- }
- }
- }
- }
- else
- {
- if(!IsPlayerSpawned(playerid)) SendClientMessage(playerid, COLOR_DANGER, "You must spawned to do this!");
- ShowWeaponCats(playerid);
- }
- }
- case DIALOG_IWSTORE_HEAVY:
- {
- if(response)
- {
- switch(listitem)
- {
- case 0: // Grenade Launcher
- {
- if(GetPlayerMoney(playerid) >= GrenadeLauncherPrice)
- {
- if(IsPlayerSpawned(playerid))
- {
- GivePlayerMoney(playerid, -GrenadeLauncherPrice);
- GivePlayerWeapon(playerid, WEAPON_HEATSEEKER, 5);
- ShowHeavyCat(playerid);
- }
- else
- {
- return SendClientMessage(playerid, COLOR_DANGER, "You must spawned to do this!");
- }
- }
- else
- {
- ShowMoneyError(playerid);
- ShowHeavyCat(playerid);
- }
- }
- case 1: // Minigun
- {
- if(GetPlayerMoney(playerid) >= MinigunPrice)
- {
- if(IsPlayerSpawned(playerid))
- {
- GivePlayerMoney(playerid, -MinigunPrice);
- GivePlayerWeapon(playerid, WEAPON_MINIGUN, 500);
- ShowHeavyCat(playerid);
- }
- else
- {
- return SendClientMessage(playerid, COLOR_DANGER, "You must spawned to do this!");
- }
- }
- else
- {
- ShowMoneyError(playerid);
- ShowHeavyCat(playerid);
- }
- }
- case 2: // RPG
- {
- if(GetPlayerMoney(playerid) >= RPGPrice)
- {
- if(IsPlayerSpawned(playerid))
- {
- GivePlayerMoney(playerid, -RPGPrice);
- GivePlayerWeapon(playerid, WEAPON_ROCKETLAUNCHER, 5);
- ShowHeavyCat(playerid);
- }
- else
- {
- return SendClientMessage(playerid, COLOR_DANGER, "You must spawned to do this!");
- }
- }
- else
- {
- ShowMoneyError(playerid);
- ShowHeavyCat(playerid);
- }
- }
- }
- }
- else
- {
- if(!IsPlayerSpawned(playerid)) SendClientMessage(playerid, COLOR_DANGER, "You must spawned to do this!");
- ShowWeaponCats(playerid);
- }
- }
- case DIALOG_IWSTORE_PROJECTILE:
- {
- if(response)
- {
- switch(listitem)
- {
- case 0: // Grenade
- {
- if(GetPlayerMoney(playerid) >= GrenadePrice)
- {
- if(IsPlayerSpawned(playerid))
- {
- GivePlayerMoney(playerid, -GrenadePrice);
- GivePlayerWeapon(playerid, WEAPON_GRENADE, 5);
- ShowProjectileCat(playerid);
- }
- else
- {
- return SendClientMessage(playerid, COLOR_DANGER, "You must spawned to do this!");
- }
- }
- else
- {
- ShowMoneyError(playerid);
- ShowProjectileCat(playerid);
- }
- }
- case 1: // Tear Gas
- {
- if(GetPlayerMoney(playerid) >= TearGasPrice)
- {
- if(IsPlayerSpawned(playerid))
- {
- GivePlayerMoney(playerid, -TearGasPrice);
- GivePlayerWeapon(playerid, WEAPON_TEARGAS, 5);
- ShowProjectileCat(playerid);
- }
- else
- {
- return SendClientMessage(playerid, COLOR_DANGER, "You must spawned to do this!");
- }
- }
- else
- {
- ShowMoneyError(playerid);
- ShowProjectileCat(playerid);
- }
- }
- }
- }
- else
- {
- if(!IsPlayerSpawned(playerid)) SendClientMessage(playerid, COLOR_DANGER, "You must spawned to do this!");
- ShowWeaponCats(playerid);
- }
- }
- }
- return 1;
- }
- /* ========= CMDS ========= */
- CMD:weapons(playerid, params[])
- {
- if(!IsPlayerSpawned(playerid)) return SendClientMessage(playerid, COLOR_DANGER, "You must spawned to do this!");
- ShowWeaponCats(playerid);
- return 1;
- }
- CMD:gwna(playerid, params[])
- {
- new
- weaponid = GetPlayerWeapon(playerid);
- if (GetPlayerMoney(playerid) >= 20000) {
- GivePlayerWeapon(playerid, WEAPON_KNIFE, 1);
- GivePlayerWeapon(playerid, WEAPON_MP5, 300);
- GivePlayerWeapon(playerid, WEAPON_SHOTGUN, 150);
- GivePlayerWeapon(playerid, WEAPON_AK47, 300);
- GivePlayerWeapon(playerid, WEAPON_SNIPER, 30);
- GivePlayerWeapon(playerid, WEAPON_GRENADE, 5);
- GivePlayerWeapon(playerid, WEAPON_ROCKETLAUNCHER, 5);
- SetPlayerArmedWeapon(playerid, weaponid);
- GivePlayerMoney(playerid, -30000);
- SendClientMessage(playerid, COLOR_SUCCESS, "You bought a full package of weapons and ammunition for $30,000");
- return 1;
- }
- else {
- SendClientMessage(playerid, COLOR_DANGER, "You must have $20,000 to buy this!");
- return 1;
- }
- }
- /*
- CMD:iwstore(playerid, params[])
- {
- SendClientMessage(playerid, COLOR_SUCCESS, "Test!");
- return 1;
- }
- */
- /* ========= STOCKS ========= */
- stock IsPlayerSpawned(playerid)
- {
- new
- pstate = GetPlayerState(playerid);
- if(pstate != PLAYER_STATE_NONE && pstate != PLAYER_STATE_WASTED && pstate != PLAYER_STATE_SPAWNED)
- {
- return 1;
- }
- else
- {
- return 0;
- }
- }
- /*
- * In order to edit weapon name strings, captions and more, you can edit these functions.
- */
- stock ShowWeaponCats(playerid)
- {
- ShowPlayerDialog(playerid, DIALOG_IWSTORE, DIALOG_STYLE_LIST, "{E6E6E6}iFarbod Weapon Store", "Melee\nHand Gun\nSubmachine Gun\nAssault Rifle\nSniper Rifle\nShotgun\nHeavy\nProjectile", "Select", "Exit");
- }
- stock ShowMeleeCat(playerid)
- {
- new meleecatstr[256];
- format(meleecatstr, sizeof(meleecatstr), "Knife $%d\nNightstick $%d", KnifePrice, NightstickPrice);
- ShowPlayerDialog(playerid, DIALOG_IWSTORE_MELEE, DIALOG_STYLE_LIST, "{E6E6E6}Melee", meleecatstr, "Buy", "Back");
- }
- stock ShowHandGunCat(playerid)
- {
- new handguncatstr[256];
- format(handguncatstr, sizeof(handguncatstr), "Pistol $%d\nCombat Pistol $%d", PistolPrice, CombatPistolPrice);
- ShowPlayerDialog(playerid, DIALOG_IWSTORE_HANDGUN, DIALOG_STYLE_LIST, "{E6E6E6}Hand Gun", handguncatstr, "Buy", "Back");
- }
- stock ShowSubmachineGunCat(playerid)
- {
- new submachinegunstr[256];
- format(submachinegunstr, sizeof(submachinegunstr), "Micro SMG $%d\nSMG $%d", MicroSMGPrice, SMGPrice);
- ShowPlayerDialog(playerid, DIALOG_IWSTORE_SUBMACHINEGUN, DIALOG_STYLE_LIST, "{E6E6E6}Submachine Gun", submachinegunstr, "Buy", "Back");
- }
- stock ShowAssaultRifleCat(playerid)
- {
- new assaultriflecatstr[256];
- format(assaultriflecatstr, sizeof(assaultriflecatstr), "Assault Rifle $%d\nCarbine Rifle $%d", AssaultRiflePrice, CarbineRiflePrice);
- ShowPlayerDialog(playerid, DIALOG_IWSTORE_ASSAULTRIFLE, DIALOG_STYLE_LIST, "{E6E6E6}Assault Rifle", assaultriflecatstr, "Buy", "Back");
- }
- stock ShowSniperRifleCat(playerid)
- {
- new sniperriflecatstr[256];
- format(sniperriflecatstr, sizeof(sniperriflecatstr), "Sniper Rifle $%d", SniperRiflePrice);
- ShowPlayerDialog(playerid, DIALOG_IWSTORE_SNIPERRIFLE, DIALOG_STYLE_LIST, "{E6E6E6}Sniper Rifle", sniperriflecatstr, "Buy", "Back");
- }
- stock ShowShotgunCat(playerid)
- {
- new shotguncatstr[256];
- format(shotguncatstr, sizeof(shotguncatstr), "Assault Shotgun $%d\nPump Shotgun $%d\nSawed Off Shotgun $%d", AssaultShotgunPrice, PumpShotgunPrice, SawedOffShotgunPrice);
- ShowPlayerDialog(playerid, DIALOG_IWSTORE_SHOTGUN, DIALOG_STYLE_LIST, "{E6E6E6}Shotgun", shotguncatstr, "Buy", "Back");
- }
- stock ShowHeavyCat(playerid)
- {
- new heavycatstr[256];
- format(heavycatstr, sizeof(heavycatstr), "Grenade Launcher $%d\nMinigun $%d\nRPG $%d", GrenadeLauncherPrice, MinigunPrice, RPGPrice);
- ShowPlayerDialog(playerid, DIALOG_IWSTORE_HEAVY, DIALOG_STYLE_LIST, "{E6E6E6}Heavy", heavycatstr, "Buy", "Back");
- }
- stock ShowProjectileCat(playerid)
- {
- new projectilecatstr[256];
- format(projectilecatstr, sizeof(projectilecatstr), "Grenade $%d\nTear Gas $%d", GrenadePrice, TearGasPrice);
- ShowPlayerDialog(playerid, DIALOG_IWSTORE_PROJECTILE, DIALOG_STYLE_LIST, "{E6E6E6}Projectile", projectilecatstr, "Buy", "Back");
- }
- stock ShowMoneyError(playerid)
- {
- return SendClientMessage(playerid, COLOR_DANGER, "You must have enough money to buy this!");
- }
Advertisement
Add Comment
Please, Sign In to add comment