Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- ||||______________________
- ||||||||||||||||||||||||||| **+*++))))) v1.0
- |||||||||||||||||||||||||
- |||||| || ||
- ||||||||||||
- |||||||
- |||||||
- |||||||
- |||||| Simple Weapon System by Vega
- */
- #include <a_samp>
- #define WEAP 9339
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- if (strcmp("/wmenu", cmdtext, true, 10) == 0)
- {
- ShowPlayerDialog(playerid, WEAP, DIALOG_STYLE_LIST, "Weapon Generator", "Melee\nPistols\nSub-Machine Guns\nRifle's\nAssault\nShotgun's\nHeavy Weapons\nThrown\nOther", "Select", "Cancel");
- return 1;
- }
- return 0;
- }
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- if(dialogid == WEAP)
- {
- if(response)
- {
- if(listitem == 0) // Meele
- {
- ShowPlayerDialog(playerid, WEAP+1, DIALOG_STYLE_LIST, "Pick a Weapon", "Knuckle Dusters\nGolf Club\nNite Stick\nKnife\nBat\nShovel\nPool Cue\nKatana\nDildo\nSpray Can\nCane", "Select", "Cancel");
- }
- if(listitem == 1) // Pistols
- {
- ShowPlayerDialog(playerid, WEAP+2, DIALOG_STYLE_LIST, "Pick a Weapon", "9mm\nSilenced 9mm\nDesert Eagle", "Select", "Cancel");
- }
- if(listitem == 2) // Sub-Machine Guns
- {
- ShowPlayerDialog(playerid, WEAP+3, DIALOG_STYLE_LIST, "Pick a Weapon", "Uzi\nSMG\nTec9", "Select", "Cancel");
- }
- if(listitem == 3) // Rifles
- {
- ShowPlayerDialog(playerid, WEAP+4, DIALOG_STYLE_LIST, "Pick a Weapon", "Country Rifle\nSniper Rifle", "Select", "Cancel");
- }
- if(listitem == 4) // Assault
- {
- ShowPlayerDialog(playerid, WEAP+5, DIALOG_STYLE_LIST, "Pick a Weapon", "AK-47\nM4", "Select", "Cancel");
- }
- if(listitem == 5) // Shotguns
- {
- ShowPlayerDialog(playerid, WEAP+6, DIALOG_STYLE_LIST, "Pick a Weapon", "Standard Shotgun\nSawnoff Shotgun\nCombat Shotgun", "Select", "Cancel");
- }
- if(listitem == 6) // Heavy Weaponry
- {
- ShowPlayerDialog(playerid, WEAP+7, DIALOG_STYLE_LIST, "Pick a Weapon", "Rocket Laucher\nHeat Seaker\nMinigun\nChain Saw", "Select", "Cancel");
- }
- if(listitem == 7) // Thrown
- {
- ShowPlayerDialog(playerid, WEAP+8, DIALOG_STYLE_LIST, "Pick a Weapon", "Granade\nTear Gas", "Select", "Cancel");
- }
- if(listitem == 8) // Other
- {
- ShowPlayerDialog(playerid, WEAP+9, DIALOG_STYLE_LIST, "Pick a Weapon", "Fire Extinguisher\nSatchel Charge\nParachute\nNightvision Goggles\nFlowers", "Select", "Cancel");
- }
- }
- return 1;
- }
- if(dialogid == WEAP+1) // Meele
- {
- if(response)
- {
- if(listitem == 0)
- {
- GivePlayerWeapon(playerid, 1, 1);
- }
- if(listitem == 1)
- {
- GivePlayerWeapon(playerid, 2, 1);
- }
- if(listitem == 2)
- {
- GivePlayerWeapon(playerid, 3, 1);
- }
- if(listitem == 3)
- {
- GivePlayerWeapon(playerid, 4, 1);
- }
- if(listitem == 4)
- {
- GivePlayerWeapon(playerid, 5, 1);
- }
- if(listitem == 5)
- {
- GivePlayerWeapon(playerid, 6, 1);
- }
- if(listitem == 6)
- {
- GivePlayerWeapon(playerid, 7, 1);
- }
- if(listitem == 7)
- {
- GivePlayerWeapon(playerid, 8, 1);
- }
- if(listitem == 8)
- {
- GivePlayerWeapon(playerid, 10, 1);
- }
- if(listitem == 9)
- {
- GivePlayerWeapon(playerid, 41, 500);
- }
- if(listitem == 10)
- {
- GivePlayerWeapon(playerid, 15, 1);
- }
- }
- return 1;
- }
- if(dialogid == WEAP+2) // Pistols
- {
- if(response)
- {
- if(listitem == 0)
- {
- GivePlayerWeapon(playerid, 22, 500);
- }
- if(listitem == 1)
- {
- GivePlayerWeapon(playerid, 23, 500);
- }
- if(listitem == 2)
- {
- GivePlayerWeapon(playerid, 24, 500);
- }
- }
- return 1;
- }
- if(dialogid == WEAP+3) // Sub's
- {
- if(response)
- {
- if(listitem == 0)
- {
- GivePlayerWeapon(playerid, 28, 500);
- }
- if(listitem == 1)
- {
- GivePlayerWeapon(playerid, 29, 500);
- }
- if(listitem == 2)
- {
- GivePlayerWeapon(playerid, 32, 500);
- }
- }
- return 1;
- }
- if(dialogid == WEAP+4) // Rifle's
- {
- if(response)
- {
- if(listitem == 0)
- {
- GivePlayerWeapon(playerid, 33, 500);
- }
- if(listitem == 1)
- {
- GivePlayerWeapon(playerid, 34, 500);
- }
- }
- return 1;
- }
- if(dialogid == WEAP+5) // Assault
- {
- if(response)
- {
- if(listitem == 0)
- {
- GivePlayerWeapon(playerid, 30, 500);
- }
- if(listitem == 1)
- {
- GivePlayerWeapon(playerid, 31, 500);
- }
- }
- return 1;
- }
- if(dialogid == WEAP+6) // Shotguns
- {
- if(response)
- {
- if(listitem == 0)
- {
- GivePlayerWeapon(playerid, 25, 500);
- }
- if(listitem == 1)
- {
- GivePlayerWeapon(playerid, 26, 500);
- }
- if(listitem == 2)
- {
- GivePlayerWeapon(playerid, 27, 500);
- }
- }
- return 1;
- }
- if(dialogid == WEAP+7) // Heavy Weapons
- {
- if(response)
- {
- if(listitem == 0)
- {
- GivePlayerWeapon(playerid, 35, 500);
- }
- if(listitem == 1)
- {
- GivePlayerWeapon(playerid, 36, 500);
- }
- if(listitem == 2)
- {
- GivePlayerWeapon(playerid, 38, 500);
- }
- if(listitem == 3)
- {
- GivePlayerWeapon(playerid, 9, 500);
- }
- }
- return 1;
- }
- if(dialogid == WEAP+8) // Thrown
- {
- if(response)
- {
- if(listitem == 0)
- {
- GivePlayerWeapon(playerid, 16, 500);
- }
- if(listitem == 1)
- {
- GivePlayerWeapon(playerid, 17, 500);
- }
- }
- return 1;
- }
- if(dialogid == WEAP+9) // Others
- {
- if(response)
- {
- if(listitem == 0)
- {
- GivePlayerWeapon(playerid, 42, 500);
- }
- if(listitem == 1)
- {
- GivePlayerWeapon(playerid, 39, 500);
- GivePlayerWeapon(playerid, 40, 1);
- }
- if(listitem == 2)
- {
- GivePlayerWeapon(playerid, 46, 1);
- }
- if(listitem == 3)
- {
- GivePlayerWeapon(playerid, 44, 1);
- }
- if(listitem == 4)
- {
- GivePlayerWeapon(playerid, 14, 1);
- }
- }
- return 1;
- }
- return 0;
- }
- //----------------------------- End of Script ---------------------------------
Advertisement
Add Comment
Please, Sign In to add comment