Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- FileScript name: Weapon name.
- Аuthor: proSeryoga
- Date: 17.03.2013
- */
- #include <a_samp>
- #include <Selection>
- #define PREV_BG_COLOR2 0xFFFF00AA
- #define DIALOG_BG_COLOR 0x4A5A6BBB
- #define PREV_BG_COLOR 0x88888899
- new gun = mS_INVALID_LISTID;
- public OnFilterScriptInit()
- {
- print("Loading....");
- gun = LoadModelSelectionMenu("gunmenu.txt");
- print("Weapon Menu loaded!");
- return 1;
- }
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- if(strcmp(cmdtext, "/gun", true) == 0)
- {
- ShowModelSelectionMenu(playerid, gun, "Weapons menu", DIALOG_BG_COLOR, PREV_BG_COLOR, PREV_BG_COLOR2);
- return 1;
- }
- return 0;
- }
- public OnPlayerModelSelection(playerid, response, listid, modelid)
- {
- if(listid == gun)
- {
- if(response)
- {
- switch(modelid)
- {
- case 346:
- {
- if(GetPlayerMoney(playerid) <200) return GameTextForPlayer(playerid, "~r~ No Money", 200, 1);
- GivePlayerMoney(playerid, -200), GivePlayerWeapon(playerid, 22, 30);
- GameTextForPlayer(playerid, "~r~9 mm", 200, 1);
- ShowModelSelectionMenu(playerid, gun, "Weapons menu", DIALOG_BG_COLOR, PREV_BG_COLOR, PREV_BG_COLOR2);
- }
- case 347:
- {
- if(GetPlayerMoney(playerid) <600) return GameTextForPlayer(playerid, "~r~ No Money", 200, 1);
- GivePlayerMoney(playerid, -600), GivePlayerWeapon(playerid, 23, 30), GameTextForPlayer(playerid, "~r~Silinced 9mm", 200, 1);
- ShowModelSelectionMenu(playerid, gun, "Weapons menu", DIALOG_BG_COLOR, PREV_BG_COLOR, PREV_BG_COLOR2);
- }
- case 348:
- {
- if(GetPlayerMoney(playerid) <1200) return GameTextForPlayer(playerid, "~r~ No Money", 200, 1);
- GivePlayerMoney(playerid, -1200), GivePlayerWeapon(playerid, 24, 30), GameTextForPlayer(playerid, "~r~Desert Eagle", 200, 1);
- ShowModelSelectionMenu(playerid, gun, "Weapons menu", DIALOG_BG_COLOR, PREV_BG_COLOR, PREV_BG_COLOR2);
- }
- case 372:
- {
- if(GetPlayerMoney(playerid) <300) return GameTextForPlayer(playerid, "~r~ No Money", 200, 1);
- GivePlayerMoney(playerid, -300), GivePlayerWeapon(playerid, 32, 30), GameTextForPlayer(playerid, "~r~TEC-9", 200, 1);
- ShowModelSelectionMenu(playerid, gun, "Weapons menu", DIALOG_BG_COLOR, PREV_BG_COLOR, PREV_BG_COLOR2);
- }
- case 352:
- {
- if(GetPlayerMoney(playerid) <500) return GameTextForPlayer(playerid, "~r~ No Money", 200, 1);
- GivePlayerMoney(playerid, -500), GivePlayerWeapon(playerid, 28, 30), GameTextForPlayer(playerid, "~r~Uzi", 200, 1);
- ShowModelSelectionMenu(playerid, gun, "Weapons menu", DIALOG_BG_COLOR, PREV_BG_COLOR, PREV_BG_COLOR2);
- }
- case 349:
- {
- if(GetPlayerMoney(playerid) <600) return GameTextForPlayer(playerid, "~r~No Money", 200, 1);
- GivePlayerMoney(playerid, -600), GivePlayerWeapon(playerid, 25, 15), GameTextForPlayer(playerid, "~r~Shotgun", 200, 1);
- ShowModelSelectionMenu(playerid, gun, "Weapons menu", DIALOG_BG_COLOR, PREV_BG_COLOR, PREV_BG_COLOR2);
- }
- case 350:
- {
- if(GetPlayerMoney(playerid) <800) return GameTextForPlayer(playerid, "~r~No Money", 200, 1);
- GivePlayerMoney(playerid, -800), GivePlayerWeapon(playerid, 26, 15), GameTextForPlayer(playerid, "~r~Sawnoff Shotgun", 200, 1);
- ShowModelSelectionMenu(playerid, gun, "Weapons menu", DIALOG_BG_COLOR, PREV_BG_COLOR, PREV_BG_COLOR2);
- }
- case 351:
- {
- if(GetPlayerMoney(playerid) <1000) return GameTextForPlayer(playerid, "~r~No Money", 200, 1);
- GivePlayerMoney(playerid, -1000), GivePlayerWeapon(playerid, 27, 15), GameTextForPlayer(playerid, "~r~Combat Shotgun", 200, 1);
- ShowModelSelectionMenu(playerid, gun, "Weapons menu", DIALOG_BG_COLOR, PREV_BG_COLOR, PREV_BG_COLOR2);
- }
- case 353:
- {
- if(GetPlayerMoney(playerid) <2000) return GameTextForPlayer(playerid, "~r~No Money", 200, 1);
- GivePlayerMoney(playerid, -2000), GivePlayerWeapon(playerid, 29, 30), GameTextForPlayer(playerid, "~r~MP5", 200, 1);
- ShowModelSelectionMenu(playerid, gun, "Weapons menu", DIALOG_BG_COLOR, PREV_BG_COLOR, PREV_BG_COLOR2);
- }
- case 355:
- {
- if(GetPlayerMoney(playerid) <3500) return GameTextForPlayer(playerid, "~r~No Money", 200, 1);
- GivePlayerMoney(playerid, -3500), GivePlayerWeapon(playerid, 30, 120), GameTextForPlayer(playerid, "~r~AK-47", 200, 1);
- ShowModelSelectionMenu(playerid, gun, "Weapons menu", DIALOG_BG_COLOR, PREV_BG_COLOR, PREV_BG_COLOR2);
- }
- case 356:
- {
- if(GetPlayerMoney(playerid) <4500) return GameTextForPlayer(playerid, "~r~No Money", 200, 1);
- GivePlayerMoney(playerid, -4500), GivePlayerWeapon(playerid, 31, 120), GameTextForPlayer(playerid, "~r~M4", 200, 1);
- ShowModelSelectionMenu(playerid, gun, "Weapons menu", DIALOG_BG_COLOR, PREV_BG_COLOR, PREV_BG_COLOR2);
- }
- case 357:
- {
- if(GetPlayerMoney(playerid) <1000) return GameTextForPlayer(playerid, "~r~No Money", 200, 1);
- GivePlayerMoney(playerid, -1000), GivePlayerWeapon(playerid, 33, 20), GameTextForPlayer(playerid, "~r~Country Rifle", 200, 1);
- ShowModelSelectionMenu(playerid, gun, "Weapons menu", DIALOG_BG_COLOR, PREV_BG_COLOR, PREV_BG_COLOR2);
- }
- case 358:
- {
- if(GetPlayerMoney(playerid) <5000) return GameTextForPlayer(playerid, "~r~No Money", 200, 1);
- GivePlayerMoney(playerid, -5000), GivePlayerWeapon(playerid, 34, 10), GameTextForPlayer(playerid, "~r~Sniper Rifle", 200, 1);
- ShowModelSelectionMenu(playerid, gun, "Weapons menu", DIALOG_BG_COLOR, PREV_BG_COLOR, PREV_BG_COLOR2);
- }
- }
- }
- return 1;
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement