Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- For SAMP 0.3c
- FilterScript by Sreadon
- Really simple system but usefull for DM Gamemode.
- Please do not remove the credits..
- If you saw a bug, contact me on SAMP Forum => Sreadon with pm.
- Thank's to Zeex for zcmd
- */
- #define FILTERSCRIPT
- #define COLOR_INFO 0xFFA500FF
- #include <a_samp>
- #include <zcmd>
- public OnFilterScriptInit()
- {
- print("\n=============================================================");
- print(" *********** ********* ****** *** *** *** ***");
- print(" *********** *** ** ** *** *** ***** ***");
- print(" **** ********* ** *** *** *** ** ***");
- print(" **** *** ** ***** *** *** *** ** ***");
- print(" **** *** ** *** ********* *** *****");
- print(" **** *** ******* ********* *** ****");
- print("=============================================================");
- print("By Sreadon");
- print("Version 1.0");
- print("=============================================================");
- return 1;
- }
- /* [IMPORTANT NOTE]:
- If you use others dialog with this filterscript, do not forget to change ID's of dialogs in this filterscript!
- */
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- new Float:X, Float:Y, Float:Z;
- if(response)
- {
- switch(dialogid == 1) // <==== For exemple, you will needs to change this ID if you use others dialogs with this filterscript.
- {
- case 1:
- {
- switch(listitem)// Checking which listitem was selected
- {
- case 0://----------[Menu for buy a gun]-------------//
- {
- ShowPlayerDialog(playerid, 2, DIALOG_STYLE_LIST, "Gun Shop", "Sdpistol \nDesert Eagle \nShotgun \nSawn-off \nM4 \nAk-47 \nParachute \nChainsaw \nSniper Rifle \nJetPack", "Purchase", "Cancel");
- }
- case 1: //----------[Menu for buy a car]-------------//
- {
- ShowPlayerDialog(playerid, 3, DIALOG_STYLE_LIST, "Car Shop", "Coach \nHotknife \nBF Injection \nMonster \nSparrow \nMaverick \nHydra \nCargobob \nBufallo \nTurismo \nBullet \nSanchez \nNRG500 \nVortex \nKarting", "Purchase", "Cancel");
- }
- case 2: //----------[Menu for teleportations]-------------//
- {
- ShowPlayerDialog(playerid, 4, DIALOG_STYLE_LIST, "TeleportMenu", "LeavedAirport \nLas Venturas Airport \nLos Santos Airport \nSan Fierro Airport \nGrooveStreet \nAera 51 ", "Purchase", "Cancel");
- }
- }
- }
- }
- }
- if(response)
- {
- switch(dialogid == 2)
- {
- case 1:
- {
- switch(listitem)
- {
- case 0://----------[That Give a SDPistol to the player]-------------//
- {
- GivePlayerWeapon(playerid, 23, 200);
- }
- case 1: //----------[That Give a Deagle to the player]-------------//
- {
- GivePlayerWeapon(playerid, 24, 200);
- }
- case 2: //----------[That Give a Simply shotgun to the player]-------------//
- {
- GivePlayerWeapon(playerid, 25, 200);
- }
- case 3: //----------[That Give a Sawn-off to the player]-------------//
- {
- GivePlayerWeapon(playerid, 26, 200);
- }
- case 4: //----------[That Give a M4 to the player]-------------//
- {
- GivePlayerWeapon(playerid, 31, 400);
- }
- case 5: //----------[That Give a AK-47 to the player]-------------//
- {
- GivePlayerWeapon(playerid, 30, 400);
- }
- case 6: //----------[That Give a parachute to the player]-------------//
- {
- GivePlayerWeapon(playerid, 46, 1);
- }
- case 7: //----------[That Give a chainsaw to the player]-------------//
- {
- GivePlayerWeapon(playerid, 9, 1);
- }
- case 8: //----------[That Give a SniperRifle to the player]-------------//
- {
- GivePlayerWeapon(playerid, 34, 200);
- }
- case 9: //----------[That Give a JetPack to the player]-------------//
- {
- SetPlayerSpecialAction(playerid, 2);
- }
- }
- }
- }
- }
- if(response)
- {
- switch(dialogid == 3)
- {
- case 1:
- {
- switch(listitem)
- {
- case 0: //-----------------[Spawn a Coach]----------------//
- {
- GetPlayerPos(playerid, X, Y, Z);
- CreateVehicle(431, X+4, Y, Z, 10, 0, 0, 100);
- SendClientMessage(playerid, COLOR_INFO, "You have spawned vehicule [Coach]");
- }
- case 1: //----------------[Spawn a Hotknife]-------------//
- {
- GetPlayerPos(playerid, X, Y, Z);
- CreateVehicle(434, X+4, Y, Z, 10, 0, 0, 100);
- SendClientMessage(playerid, COLOR_INFO, "You have spawned vehicule [Hotknife]");
- }
- case 2: //--------------[Spawn a BF Injection]--------------//
- {
- GetPlayerPos(playerid, X, Y, Z);
- CreateVehicle(424, X+4, Y, Z, 10, 0, 0, 100);
- SendClientMessage(playerid, COLOR_INFO, "You have spawned vehicule [BF Injection]");
- }
- case 3: //--------------[Spawn a Monster]--------------//
- {
- GetPlayerPos(playerid, X, Y, Z);
- CreateVehicle(444, X+4, Y, Z, 10, 0, 0, 100);
- SendClientMessage(playerid, COLOR_INFO, "You have spawned vehicule [Monster]");
- }
- case 4: //--------------[Spawn a Sparrow]--------------//
- {
- GetPlayerPos(playerid, X, Y, Z);
- CreateVehicle(469, X+4, Y, Z, 10, 0, 0, 100);
- SendClientMessage(playerid, COLOR_INFO, "You have spawned vehicule [Sparrow]");
- }
- case 5: //--------------[Spawn a Maverick]--------------//
- {
- GetPlayerPos(playerid, X, Y, Z);
- CreateVehicle(487, X+4, Y, Z, 10, 0, 0, 100);
- SendClientMessage(playerid, COLOR_INFO, "You have spawned vehicule [Maverick]");
- }
- case 6: //--------------[Spawn a Hydra]--------------//
- {
- GetPlayerPos(playerid, X, Y, Z);
- CreateVehicle(520, X+4, Y, Z, 10, 0, 0, 100);
- SendClientMessage(playerid, COLOR_INFO, "You have spawned vehicule [Hydra]");
- }
- case 7: //--------------[Spawn a Cargobob]--------------//
- {
- GetPlayerPos(playerid, X, Y, Z);
- CreateVehicle(548, X+4, Y, Z, 10, 0, 0, 100);
- SendClientMessage(playerid, COLOR_INFO, "You have spawned vehicule [Cargobob]");
- }
- case 8: //--------------[Spawn a Buffalo]--------------//
- {
- GetPlayerPos(playerid, X, Y, Z);
- CreateVehicle(402, X+4, Y, Z, 10, 0, 0, 100);
- SendClientMessage(playerid, COLOR_INFO, "You have spawned vehicule [Bufallo]");
- }
- case 9: //--------------[Spawn a Turismo]--------------//
- {
- GetPlayerPos(playerid, X, Y, Z);
- CreateVehicle(451, X+4, Y, Z, 10, 0, 0, 100);
- SendClientMessage(playerid, COLOR_INFO, "You have spawned vehicule [Turismo]");
- }
- case 10: //--------------[Spawn a Bullet]--------------//
- {
- GetPlayerPos(playerid, X, Y, Z);
- CreateVehicle(541, X+4, Y, Z, 10, 0, 0, 100);
- SendClientMessage(playerid, COLOR_INFO, "You have spawned vehicule [Bullet]");
- }
- case 11: //--------------[Spawn a Sanchez]--------------//
- {
- GetPlayerPos(playerid, X, Y, Z);
- CreateVehicle(468, X+4, Y, Z, 10, 0, 0, 100);
- SendClientMessage(playerid, COLOR_INFO, "You have spawned vehicule [Sanchez]");
- }
- case 12: //--------------[Spawn a NRG500]--------------//
- {
- GetPlayerPos(playerid, X, Y, Z);
- CreateVehicle(522, X+4, Y, Z, 10, 0, 0, 100);
- SendClientMessage(playerid, COLOR_INFO, "You have spawned vehicule [NRG500]");
- }
- case 13: //--------------[Spawn a Vortex]--------------//
- {
- GetPlayerPos(playerid, X, Y, Z);
- CreateVehicle(539, X+4, Y, Z, 10, 0, 0, 100);
- SendClientMessage(playerid, COLOR_INFO, "You have spawned vehicule [Vortex]");
- }
- case 14: //--------------[Spawn a Karting]--------------//
- {
- GetPlayerPos(playerid, X, Y, Z);
- CreateVehicle(571, X+4, Y, Z, 10, 0, 0, 100);
- SendClientMessage(playerid, COLOR_INFO, "You have spawned vehicule [Karting]");
- }
- }
- }
- }
- }
- if(response)
- {
- switch(dialogid == 4)
- {
- case 1:
- {
- switch(listitem)
- {
- case 0: //-----------------[Leave Airport]----------------//
- {
- SetPlayerPos(playerid,407.8798,2525.1943,16.7844);
- SendClientMessage(playerid, COLOR_INFO, "Sucessfuly teleported to LeavedAirport");
- }
- case 1: //----------------[LV Airport]-------------//
- {
- SetPlayerPos(playerid,1469.2806,1570.0126,10.8125);
- SendClientMessage(playerid, COLOR_INFO, "Sucessfuly teleported to Las Venturas Airport");
- }
- case 2: //--------------[LS Airport]--------------//
- {
- SetPlayerPos(playerid,1986.5513,-2488.3906,13.5391);
- SendClientMessage(playerid, COLOR_INFO, "Sucessfuly teleported to Los Santos Airport");
- }
- case 3: //--------------[SF Airport]--------------//
- {
- SetPlayerPos(playerid,-1266.8010,-119.0685,14.1440);
- SendClientMessage(playerid, COLOR_INFO, "Sucessfuly teleported to SF Airport");
- }
- case 4: //--------------[Groove Street]--------------//
- {
- SetPlayerPos(playerid,2493.0503,-1673.5786,13.3359);
- SendClientMessage(playerid, COLOR_INFO, "Sucessfuly teleported to Groove Street");
- }
- case 5: //--------------[Area51]--------------//
- {
- SetPlayerPos(playerid,323.2570,2000.0634,17.6437);
- SendClientMessage(playerid, COLOR_INFO, "Sucessfuly teleported to Area51");
- }
- }
- }
- }
- }
- return 1;
- }
- COMMAND:menu(playerid, params[])
- {
- ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "What do you want?", "Gun Shop \nVehicles Shop \nTeleport Destinations", "Buy", "Cancel");
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement