Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // -------------This Script Is Made By Viggz!-------------
- // Hope You Will Enjoy and having fun with it!:)
- // If You See any bugs or have any questions, You are free to ask in Forum-samp!
- #include <a_samp>
- public OnPlayerRequestClass(playerid, classid)
- {
- return 1;
- }
- public OnPlayerConnect(playerid)
- {
- SendClientMessage(playerid, 0xFF0000FF, "This Server Is Using WeaponShop Scripted By Viggz!");
- SendClientMessage(playerid, 0xFF0000FF, "Use /weaponshop too open the Weapon Dialog/Shop");
- return 1;
- }
- public OnPlayerDisconnect(playerid, reason)
- {
- return 1;
- }
- public OnPlayerSpawn(playerid)
- {
- return 1;
- }
- public OnPlayerDeath(playerid, killerid, reason)
- {
- return 1;
- }
- public OnVehicleSpawn(vehicleid)
- {
- return 1;
- }
- public OnVehicleDeath(vehicleid, killerid)
- {
- return 1;
- }
- public OnPlayerText(playerid, text[])
- {
- return 1;
- }
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- if (strcmp("/weaponshop", cmdtext, true, 10) == 0)
- {
- ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Viggz Scripted Weapon Shop!", "{1818F2}---(Weapon Menu!)---\n{FFFFFF}1.Deagle(500$)\n{FFFFFF}2.Dildo(500$)\n{FFFFFF}3.MP5(1000$)\n{FFFFFF}4.M4(1000$)\n{FFFFFF}5.AK-47(1000$)\n{FFFFFF}6.Spraycan(500$)", "Purchase", "Cancel");
- return 1;
- }
- return 0;
- }
- public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
- {
- return 1;
- }
- public OnPlayerExitVehicle(playerid, vehicleid)
- {
- return 1;
- }
- public OnPlayerStateChange(playerid, newstate, oldstate)
- {
- return 1;
- }
- public OnPlayerEnterCheckpoint(playerid)
- {
- return 1;
- }
- public OnPlayerLeaveCheckpoint(playerid)
- {
- return 1;
- }
- public OnPlayerEnterRaceCheckpoint(playerid)
- {
- return 1;
- }
- public OnPlayerLeaveRaceCheckpoint(playerid)
- {
- return 1;
- }
- public OnRconCommand(cmd[])
- {
- return 1;
- }
- public OnPlayerRequestSpawn(playerid)
- {
- return 1;
- }
- public OnObjectMoved(objectid)
- {
- return 1;
- }
- public OnPlayerObjectMoved(playerid, objectid)
- {
- return 1;
- }
- public OnPlayerPickUpPickup(playerid, pickupid)
- {
- return 1;
- }
- public OnVehicleMod(playerid, vehicleid, componentid)
- {
- return 1;
- }
- public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
- {
- return 1;
- }
- public OnVehicleRespray(playerid, vehicleid, color1, color2)
- {
- return 1;
- }
- public OnPlayerSelectedMenuRow(playerid, row)
- {
- return 1;
- }
- public OnPlayerExitedMenu(playerid)
- {
- return 1;
- }
- public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
- {
- return 1;
- }
- public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
- {
- return 1;
- }
- public OnRconLoginAttempt(ip[], password[], success)
- {
- return 1;
- }
- public OnPlayerUpdate(playerid)
- {
- return 1;
- }
- public OnPlayerStreamIn(playerid, forplayerid)
- {
- return 1;
- }
- public OnPlayerStreamOut(playerid, forplayerid)
- {
- return 1;
- }
- public OnVehicleStreamIn(vehicleid, forplayerid)
- {
- return 1;
- }
- public OnVehicleStreamOut(vehicleid, forplayerid)
- {
- return 1;
- }
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- switch(dialogid) // Lookup the dialogid
- {
- case 1:
- {
- if(!response)
- {
- SendClientMessage(playerid, 0xFF0000FF, "You cancelled.");
- return 1; // We processed it
- }
- switch(listitem) // This is far more efficient than using an if-elseif-else structure
- {
- case 0: // Listitems start with 0, not 1
- {
- SendClientMessage(playerid, 0xFF0000FF, "You Can Not Use This Option, Please Choose Another One If Possible!"); // Says that this is not an option!
- }
- case 1:
- {
- GivePlayerMoney(playerid, -500); // Will take 500$ from the player!
- GivePlayerWeapon(playerid, 24, 250); //Give playerid Deagle with 250 ammo
- SendClientMessage(playerid, 0x37FF00FF, "You Have Bought 250 Ammo Of Deagle!"); // Send Message to player
- }
- case 2:
- {
- GivePlayerMoney(playerid, -500); // Will take 500$ from the player!
- GivePlayerWeapon(playerid, 11, 1); //Give playerid 1 dildo
- SendClientMessage(playerid, 0x37FF00FF, "You Have Bought 1 Dildo!"); // Send Message to player
- }
- case 3:
- {
- GivePlayerMoney(playerid, -1000); // Will take 1000$ from the player!
- GivePlayerWeapon(playerid, 29, 250); // Give playerid MP5 with 250 ammo!
- SendClientMessage(playerid, 0x37FF00FF, "You Have Bought 250 Ammo Of MP5!"); // Send Message to player
- }
- case 4:
- {
- GivePlayerMoney(playerid, -1000); // Will take 1000$ from the player!
- GivePlayerWeapon(playerid, 31, 250); // Give Player 250 Ammo Of M4
- SendClientMessage(playerid, 0x37FF00FF, "You Have Bought 250 Ammo Of M4!"); // Send Message to player
- }
- case 5:
- {
- GivePlayerMoney(playerid, -1000); // Will take 1000$ from the player!
- GivePlayerWeapon(playerid, 30, 250); // Give Player 250 Ammo Of Ak-47
- SendClientMessage(playerid, 0x37FF00FF, "You Have Bought 250 Ammo Of AK-47"); // Send Message to player
- }
- case 6:
- {
- GivePlayerMoney(playerid, -500); // Will take 500$ from the player!
- GivePlayerWeapon(playerid, 41, 100); // Give player 100 Ammo Of Spraycan!
- SendClientMessage(playerid, 0x37FF00FF, "You Have Bought 100 Ammo Of SprayCan!"); // Send Message to player
- }
- // Add the rest of your listitems for dialog 1 here
- }
- }
- // Add the rest of your dialogs here
- }
- return 0; // If you put return 1 here the callback will not continue to be called in other scripts (filterscripts, etc.).
- }
- public OnPlayerClickPlayer(playerid, clickedplayerid, source)
- {
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment