Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- #define DIALOG_SKIN 230
- #define DIALOG_CARS 231
- #define DIALOG_WEPS 232
- new
- message[128],
- wepname[32],
- Float:x,
- Float:y,
- Float:z
- ;
- public OnFilterScriptInit()
- return true;
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- if(!strcmp(cmdtext, "/skin", true)) {
- SendClientMessage(playerid, 0xFFFFFFFF, "[INFO] Digite Seu Skin");
- ShowPlayerDialog(playerid,DIALOG_SKIN,DIALOG_STYLE_INPUT,"Skin","Digite Seu Skin abaixo:","Skin","Sair");
- return 1;
- }
- if(!strcmp(cmdtext, "/carro", true)) {
- SendClientMessage(playerid, 0xFFFFFFFF, "[INFO] Digite seu Carro");
- ShowPlayerDialog(playerid,DIALOG_CARS,DIALOG_STYLE_INPUT,"Carros","Digite id do seu carro abaixo:","Carro","Sair");
- return 1;
- }
- if(!strcmp(cmdtext, "/arma", true)) {
- SendClientMessage(playerid, 0xFFFFFFFF, "[INFO] Digite sua arma");
- ShowPlayerDialog(playerid,DIALOG_WEPS,DIALOG_STYLE_INPUT,"Armas","Digite id da sua arma abaixo:","Arma","Sair");
- return 1;
- }
- return 0;
- }
- new
- NomeCarros[][] =
- {
- "Landstalker",
- "Bravura",
- "Buffalo",
- "Linerunner",
- "Pereniel",
- "Sentinel",
- "Dumper",
- "Firetruck",
- "Trashmaster",
- "Stretch",
- "Manana",
- "Infernus",
- "Voodoo",
- "Pony",
- "Mule",
- "Cheetah",
- "Ambulance",
- "Leviathan",
- "Moonbeam",
- "Esperanto",
- "Taxi",
- "Washington",
- "Bobcat",
- "Mr Whoopee",
- "BF Injection",
- "Hunter",
- "Premier",
- "Enforcer",
- "Securicar",
- "Banshee",
- "Predator",
- "Bus",
- "Rhino",
- "Barracks",
- "Hotknife",
- "Trailer",
- "Previon",
- "Coach",
- "Cabbie",
- "Stallion",
- "Rumpo",
- "RC Bandit",
- "Romero",
- "Packer",
- "Monster Truck",
- "Admiral",
- "Squalo",
- "Seasparrow",
- "Pizzaboy",
- "Tram",
- "Trailer",
- "Turismo",
- "Speeder",
- "Reefer",
- "Tropic",
- "Flatbed",
- "Yankee",
- "Caddy",
- "Solair",
- "Berkley's RC Van",
- "Skimmer",
- "PCJ-600",
- "Faggio",
- "Freeway",
- "RC Baron",
- "RC Raider",
- "Glendale",
- "Oceanic",
- "Sanchez",
- "Sparrow",
- "Patriot",
- "Quad",
- "Coastguard",
- "Dinghy",
- "Hermes",
- "Sabre",
- "Rustler",
- "ZR-350",
- "Walton",
- "Regina",
- "Comet",
- "BMX",
- "Burrito",
- "Camper",
- "Marquis",
- "Baggage",
- "Dozer",
- "Maverick",
- "News Chopper",
- "Rancher",
- "FBI Rancher",
- "Virgo",
- "Greenwood",
- "Jetmax",
- "Hotring",
- "Sandking",
- "Blista Compact",
- "Police Maverick",
- "Boxville",
- "Benson",
- "Mesa",
- "RC Goblin",
- "Hotring Racer",
- "Hotring Racer",
- "Bloodring Banger",
- "Rancher",
- "Super GT",
- "Elegant",
- "Journey",
- "Bike",
- "Mountain Bike",
- "Beagle",
- "Cropdust",
- "Stunt",
- "Tanker",
- "RoadTrain",
- "Nebula",
- "Majestic",
- "Buccaneer",
- "Shamal",
- "Hydra",
- "FCR-900",
- "NRG-500",
- "HPV1000",
- "Cement Truck",
- "Tow Truck",
- "Fortune",
- "Cadrona",
- "FBI Truck",
- "Willard",
- "Forklift",
- "Tractor",
- "Combine",
- "Feltzer",
- "Remington",
- "Slamvan",
- "Blade",
- "Freight",
- "Streak",
- "Vortex",
- "Vincent",
- "Bullet",
- "Clover",
- "Sadler",
- "Firetruck",
- "Hustler",
- "Intruder",
- "Primo",
- "Cargobob",
- "Tampa",
- "Sunrise",
- "Merit",
- "Utility",
- "Nevada",
- "Yosemite",
- "Windsor",
- "Monster Truck",
- "Monster Truck",
- "Uranus",
- "Jester",
- "Sultan",
- "Stratum",
- "Elegy",
- "Raindance",
- "RC Tiger",
- "Flash",
- "Tahoma",
- "Savanna",
- "Bandito",
- "Freight",
- "Trailer",
- "Kart",
- "Mower",
- "Duneride",
- "Sweeper",
- "Broadway",
- "Tornado",
- "AT-400",
- "DFT-30",
- "Huntley",
- "Stafford",
- "BF-400",
- "Newsvan",
- "Tug",
- "Trailer",
- "Emperor",
- "Wayfarer",
- "Euros",
- "Hotdog",
- "Club",
- "Trailer",
- "Trailer",
- "Andromada",
- "Dodo",
- "RC Cam",
- "Launch",
- "Police Car (LS)",
- "Police Car (SF)",
- "Police Car (LV)",
- "Police Ranger",
- "Picador",
- "S.W.A.T. Van",
- "Alpha",
- "Phoenix",
- "Glendale",
- "Sadler",
- "Luggage Trailer",
- "Luggage Trailer",
- "Stair Trailer",
- "Boxville",
- "Farm Plow",
- "Utility Trailer"
- };
- new
- badSkins[22] =
- {
- 3, 4, 5, 6, 8, 42, 65, 74, 86,
- 119, 149, 208, 265, 266, 267,
- 268, 269, 270, 271, 272, 273, 289
- };
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- if(dialogid == DIALOG_SKIN) {
- if(!response)
- return SendClientMessage(playerid, 0xFFFFFFFF, "[INFO] Você cancelou a seleção de Skins");
- if(!strval(inputtext))
- return SendClientMessage(playerid, 0xFFFFFFFF, "[INFO] Você cancelou a seleção de Skins");
- if(strval(inputtext) < 0 || strval(inputtext) > 299)
- return SendClientMessage(playerid, 0xFFFFFFFF, "[ERRO] Skin Inválida");
- for (new i = 0; i < 22; i++)
- if(strval(inputtext) == badSkins[i])
- return SendClientMessage(playerid, 0xFFFFFFFF, "[ERRO] Skin Inválida");
- format(message, sizeof(message), "Você colocou a Skin Número %i", strval(inputtext));
- SendClientMessage(playerid, 0xFFFFFFFF, message);
- SetPlayerSkin(playerid,strval(inputtext));
- return 1;
- }
- if(dialogid == DIALOG_WEPS) {
- if(!response)
- return SendClientMessage(playerid, 0xFFFFFFFF, "[INFO] Você cancelou a seleção de Armas");
- if(!strval(inputtext))
- return SendClientMessage(playerid, 0xFFFFFFFF, "[INFO] Você cancelou a seleção de Armas");
- if(strval(inputtext) == 19 || strval(inputtext) == 20 || strval(inputtext) == 21 || strval(inputtext) < 16 || strval(inputtext) > 38)
- return SendClientMessage(playerid, 0xFFFFFFFF, "[ERRO] Armas Inválida");
- GetWeaponName(strval(inputtext),wepname,32);
- format(message, sizeof(message), "Você colocou a arma %s(%i)", wepname,strval(inputtext));
- SendClientMessage(playerid, 0xFFFFFFFF, message);
- GivePlayerWeapon(playerid,strval(inputtext),999999);
- return 1;
- }
- if(dialogid == DIALOG_CARS) {
- if(!response)
- return SendClientMessage(playerid, 0xFFFFFFFF, "[INFO] Você cancelou a seleção de carros");
- if(!strval(inputtext))
- return SendClientMessage(playerid, 0xFFFFFFFF, "[INFO] Você cancelou a seleção de carros");
- if(!IsValidVehicle(strval(inputtext)))
- return SendClientMessage(playerid, 0xFFFFFFFF, "[ERRO] Carro Inválido");
- format(message, sizeof(message), "Você colocou o carro %s(%i)", NomeCarros[strval(inputtext)-400],strval(inputtext));
- SendClientMessage(playerid, 0xFFFFFFFF, message);
- GetPlayerPos(playerid, x, y, z);
- PutPlayerInVehicle(playerid,CreateVehicle(strval(inputtext),x, y, z, 82,0,1,60), 0);
- return 1;
- }
- return 0;
- }
- stock
- IsValidVehicle(modelid)
- {
- switch(modelid) {
- case 581, 523, 462, 521, 463, 522, 461, 448, 468, 586, 509,
- 481, 510, 472, 473, 493, 595, 484, 430, 453,
- 452, 446, 454, 445, 602, 416, 485, 568, 429, 433, 499, 424, 536, 496,
- 504, 422, 609, 498, 401, 575, 518,
- 402, 541, 482, 431, 438, 457, 527, 483, 524, 415, 542, 589, 437, 532,
- 480, 596, 599, 597, 598, 578, 486,
- 507, 562, 585, 427, 419, 587, 490, 528, 533, 544, 407, 565, 455, 530,
- 526, 466, 604, 492, 474, 588, 434,
- 502, 503, 494, 579, 545, 411, 546, 559, 508, 571, 400, 403, 517, 410,
- 551, 500, 418, 572, 423, 414, 516,
- 582, 467, 443, 470, 404, 514, 603, 600, 413, 426, 436, 547, 489, 441,
- 594, 564, 515, 479, 534, 432, 505,
- 442, 440, 475, 543, 605, 495, 567, 428, 405, 535, 458, 580, 439, 561,
- 409, 560, 506, 601, 574, 566, 549,
- 420, 459, 576, 525, 531, 408, 583, 451, 558, 552, 540, 491, 412, 478,
- 421, 529, 456, 554, 477, 548, 425,
- 417, 487, 497, 563, 501, 465, 447, 469, 488, 406, 573, 444, 556, 557,
- 592, 577, 511, 512, 593, 520, 553,
- 464, 476, 519, 460, 513, 539, 471, 435, 450, 591, 606, 607, 610, 584,
- 608, 611, 590, 449:
- return 1;
- default:
- return 0;
- }
- return 0;
- }
- // www.feksquad.com
- // Made by Kyle and DraKoN
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement