Sziasztok!
Sok helyen található már egy pont ugyanilyen script, csak épp kódilag nem meg egyezõ.
És most publikálom, hogy hogyan oldottam én meg röviden ezt.. A scriptrõl.
Az egész script egy parancsról, és néhány dialogról szól. Viszont nem mindegy, hogy 300, vagy épp csak ~70 sorból oldja meg az ember, esetleg helyezi be a játékmódjába.
Játékon belül nem lehet különbséget tapasztalni egy másik dialogos kocsilehívótól!
A csoport nevek direkt nem lettek lefordítva. Mindenki át írhassa saját igénye szerint, ha úgy tartsa kedve.
A kód szabadon terjeszthetõ, nevemet nem kötelezõ feltüntetni, nem igazán érdekel a dolog..
Egyéb:A kódban szereplõ dialogoknak a tartalmi része (azaz a kocsinevek, csoportnevek) a következõ publikált scriptbõl tartalmaznak:
Simple Vehicle Spawner v 1.2 by x96664Készítõ.A scriptet Pedró készítette 2012. Október. 22-én.
LetöltésForráskód //2012. 10. 22
#define FILTERSCRIPT
#include <a_samp>
#include <zcmd>
new VehicleNames[][] = {
\"Landstalker\",\"Bravura\",\"Buffalo\",\"Linerunner\",\"Perrenial\",\"Sentinel\",\"Dumper\",\"Firetruck\",\"Trashmaster\",\"Stretch\",\"Manana\",\"Infernus\",\"Voodoo\",\"Pony\",\"Mule\",\"Cheetah\",\"Ambulance\",\"Leviathan\",\"Moonbeam\",
\"Esperanto\",\"Taxi\",\"Washington\",\"Bobcat\",\"Whoopee\",\"BF Injection\",\"Hunter\",\"Premier\",\"Enforcer\",\"Securicar\",\"Banshee\",\"Predator\",\"Bus\",\"Rhino\",\"Barracks\",\"Hotknife\",\"Trailer\",\"Previon\",\"Coach\",
\"Cabbie\",\"Stallion\",\"Rumpo\",\"RC Bandit\",\"Romero\",\"Packer\",\"Monster\",\"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\",
\"Boxvillde\",\"Benson\",\"Mesa\",\"RC Goblin\",\"Hotring Racer A\",\"Hotring Racer B\",\"Bloodring Banger\",\"Rancher\",\"Super GT\",\"Elegant\",\"Journey\",\"Bike\",\"Mountain Bike\",\"Beagle\",\"Cropduster\",\"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\",\"Monster\",
\"Uranus\",\"Jester\",\"Sultan\",\"Stratum\",\"Elegy\",\"Raindance\",\"RC Tiger\",\"Flash\",\"Tahoma\",\"Savanna\",\"Bandito\",\"Freight Flat\",\"Streak Carriage\",\"Kart\",\"Mower\",\"Dune\",\"Sweeper\",\"Broadway\",\"Tornado\",\"AT-400\",\"DFT-30\",
\"Huntley\",\"Stafford\",\"BF-400\",\"News Van\",\"Tug\",\"Trailer\",\"Emperor\",\"Wayfarer\",\"Euros\",\"Hotdog\",\"Club\",\"Freight Box\",\"Trailer\",\"Andromada\",\"Dodo\",\"RC Cam\",\"Launch\",\"Police Car\",\"Police Car\",\"Police Car\",
\"Police Ranger\",\"Picador\",\"S.W.A.T\",\"Alpha\",\"Phoenix\",\"Glendale\",\"Sadler\",\"Luggage\",\"Luggage\",\"Stairs\",\"Boxville\",\"Tiller\",\"Utility Trailer\"
};
#define DIALOG_V2 820
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) {
switch(dialogid) {
case DIALOG_V2: {
if(!response) return 1;
new title[128];
format(title, sizeof(title), \"{FFBB00}%s\", inputtext);
switch(listitem) {
case 0: ShowPlayerDialog(playerid, DIALOG_V2+(1+listitem), DIALOG_STYLE_LIST, title, \"Andromada\\nAT-400\\nBeagle\\nCropduster\\nDodo\\nHydra\\nNevada\\nRustler\\nShamal\\nSkimmer\\nStuntplane\", \"Lerak\", \"Vissza\");
case 1: ShowPlayerDialog(playerid, DIALOG_V2+(1+listitem), DIALOG_STYLE_LIST, title, \"Cargobob\\nHunter\\nLeviathan\\nMaverick\\nNews Maverick\\nPolice Maverick\\nRaindance\\nSeasparrow\\nSparrow\", \"Lerak\", \"Vissza\");
case 2: ShowPlayerDialog(playerid, DIALOG_V2+(1+listitem), DIALOG_STYLE_LIST, title, \"BF-400\\nBike\\nBMX\\nFaggio\\nFCR-900\\nFreeway\\nMountain Bike\\nNRG-500\\nPCJ-600\\nPizzaboy\\nQuad\\nSanchez\\nWayfarer\", \"Lerak\", \"Vissza\");
case 3: ShowPlayerDialog(playerid, DIALOG_V2+(1+listitem), DIALOG_STYLE_LIST, title, \"Comet\\nFeltzer\\nStallion\\nWindsor\", \"Lerak\", \"Vissza\");
case 4: ShowPlayerDialog(playerid, DIALOG_V2+(1+listitem), DIALOG_STYLE_LIST, title, \"Benson\\nBobcat\\nBurrito\\nBoxville\\nBoxburg\\nCement Truck\\nDFT-30\\nFlatbed\\nLinerunner\\nMule\\nNewsvan\\nPacker\\nPetrol Tanker\\nPony\\nRoadtrain\\nRumpo\\nSadler\\nSadler Shit\\nTopfun\\nTractor\\nTrashmaster\\nUtility Van\\nWalton\\nYankee\\nYosemite\", \"Lerak\", \"Vissza\");
case 5: ShowPlayerDialog(playerid, DIALOG_V2+(1+listitem), DIALOG_STYLE_LIST, title, \"Blade\\nBroadway\\nRemington\\nSavanna\\nSlamvan\\nTahoma\\nTornado\\nVoodoo\", \"Lerak\", \"Vissza\");
case 6: ShowPlayerDialog(playerid, DIALOG_V2+(1+listitem), DIALOG_STYLE_LIST, title, \"Bandito\\nBF Injection\\nDune\\nHuntley\\nLandstalker\\nMesa\\nMonster\\nMonster A\\nMonster B\\nPatriot\\nRancher A\\nRancher B\\nSandking\", \"Lerak\", \"Vissza\");
case 7: ShowPlayerDialog(playerid, DIALOG_V2+(1+listitem), DIALOG_STYLE_LIST, title, \"Ambulance\\nBarracks\\nBus\\nCabbie\\nCoach\\nCop Bike (HPV-1000)\\nEnforcer\\nFBI Rancher\\nFBI Truck\\nFiretruck\\nFiretruck LA\\nPolice Car (LSPD)\\nPolice Car (LVPD)\\nPolice Car (SFPD)\\nRanger\\nRhino\\nS.W.A.T\\nTaxi\", \"Lerak\", \"Vissza\");
case 8: ShowPlayerDialog(playerid, DIALOG_V2+(1+listitem), DIALOG_STYLE_LIST, title, \"Admiral\\nBloodring Banger\\nBravura\\nBuccaneer\\nCadrona\\nClover\\nElegant\\nElegy\\nEmperor\\nEsperanto\\nFortune\\nGlendale Shit\\nGlendale\\nGreenwood\\nHermes\\nIntruder\\nMajestic\\nManana\\nMerit\\nNebula\\nOceanic\\nPicador\\nPremier\\nPrevion\\nPrimo\\nSentinel\\nStafford\\nSultan\\nSunrise\\nTampa\\nVincent\\nVirgo\\nWillard\\nWashington\", \"Lerak\", \"Vissza\");
case 9: ShowPlayerDialog(playerid, DIALOG_V2+(1+listitem), DIALOG_STYLE_LIST, title, \"Alpha\\nBanshee\\nBlista Compact\\nBuffalo\\nBullet\\nCheetah\\nClub\\nEuros\\nFlash\\nHotring Racer\\nHotring Racer A\\nHotring Racer B\\nInfernus\\nJester\\nPhoenix\\nSabre\\nSuper GT\\nTurismo\\nUranus\\nZR-350\", \"Lerak\", \"Vissza\");
case 10: ShowPlayerDialog(playerid, DIALOG_V2+(1+listitem), DIALOG_STYLE_LIST, title, \"Moonbeam\\nPerenniel\\nRegina\\nSolair\\nStratum\", \"Lerak\", \"Vissza\");
case 11: ShowPlayerDialog(playerid, DIALOG_V2+(1+listitem), DIALOG_STYLE_LIST, title, \"Coastguard\\nDinghy\\nJetmax\\nLaunch\\nMarquis\\nPredator\\nReefer\\nSpeeder\\nSquallo\\nTropic\", \"Lerak\", \"Vissza\");
case 12: ShowPlayerDialog(playerid, DIALOG_V2+(1+listitem), DIALOG_STYLE_LIST, title, \"Article Trailer\\nArticle Trailer 2\\nArticle Trailer 3\\nBaggage Trailer A\\nBaggage Trailer B\\nFarm Trailer\\nFreight Flat Trailer (Train)\\nFreight Box Trailer (Train)\\nPetrol Trailer\\nStreak Trailer (Train)\\nStairs Trailer\\nUtility Trailer\", \"Lerak\", \"Vissza\");
case 13: ShowPlayerDialog(playerid, DIALOG_V2+(1+listitem), DIALOG_STYLE_LIST, title, \"Baggage\\nBrownstreak (Train)\\nCaddy\\nCamper\\nCamper A\\nCombine Harvester\\nDozer\\nDumper\\nForklift\\nFreight (Train)\\nHotknife\\nHustler\\nHotdog\\nKart\\nMower\\nMr Whoopee\\nRomero\\nSecuricar\\nStretch\\nSweeper\\nTram\\nTowtruck\\nTug\\nVortex\", \"Lerak\", \"Vissza\");
case 14: ShowPlayerDialog(playerid, DIALOG_V2+(1+listitem), DIALOG_STYLE_LIST, title, \"RC Bandit\\nRC Baron\\nRC Raider\\nRC Goblin\\nRC Tiger\\nRC Cam\", \"Lerak\", \"Vissza\");
}
}
case DIALOG_V2+1..DIALOG_V2+15: {
if(!response) return cmd_vlist(playerid);
CarSpawner(playerid, GetVehicleModelIDFromName(inputtext));
new sor[128]; format(sor, 128, \"Sikeresen lekértél egy {00FF00}%s{DCDCDC}(Modell: %i){FFFFFF}-t!\", inputtext, GetVehicleModelIDFromName(inputtext));
SendClientMessage(playerid, -1, sor);
}
}
return 1;
}
CMD:vlist(playerid) return ShowPlayerDialog(playerid, DIALOG_V2, DIALOG_STYLE_LIST, \"Jármû Csoportok\", \"Airplanes\\nHelicopters\\nBikes\\nConvertibles\\nIndustrial\\nLowriders\\nOff Road\\nPublic Service Vehicles\\nSaloons\\nSport Vehicles\\nStation Wagons\\nBoats\\nTrailers\\nUnique Vehicles\\nRC Vehicles\", \"Tovább\", \"Mégse\");
stock GetVehicleModelIDFromName(vname[]) { //From: fsdebug.pwn
for(new i = 0; i < 211; i++) if(strfind(VehicleNames, vname, false) != -1) return i + 400;
return -1;
}
stock CarSpawner(playerid, model) { //By: Pedró
new Float:p[4];
GetPlayerPos(playerid, p[0], p[1], p[2]);
GetPlayerFacingAngle(playerid, p[3]);
if(GetPVarInt(playerid, \"myCar\") != INVALID_VEHICLE_ID) {
if(IsPlayerInAnyVehicle(playerid) && GetPlayerVehicleID(playerid) == GetPVarInt(playerid, \"myCar\")) RemovePlayerFromVehicle(playerid);
DestroyVehicle(GetPVarInt(playerid, \"myCar\"));
}
SetPVarInt(playerid, \"myCar\", CreateVehicle(model, p[0], p[1], p[2], p[3], random(126), random(126), -1));
PutPlayerInVehicle(playerid, GetPVarInt(playerid, \"myCar\"), 0);
SetVehicleVirtualWorld(GetPVarInt(playerid, \"myCar\"), GetPlayerVirtualWorld(playerid));
LinkVehicleToInterior(GetPVarInt(playerid, \"myCar\"), GetPlayerInterior(playerid));
return 1;
}