#include <a_samp>#include <core>#include <float>new glob5C[212][1] = {\"Landstalker\",\"Bravura\",\"Buffalo\",\"Linerunner\",\"Perrenial\",\"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 1\",\"Previon\",\"Coach\",\"Cabbie\",\"Stallion\",\"Rumpo\",\"RC Bandit\",\"Romero\",\"Packer\",\"Monster\",\"Admiral\",\"Squalo\",\"Seasparrow\",\"Pizzaboy\",\"Tram\",\"Trailer 2\",\"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 A\",\"Hotring Racer B\",\"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 LA\",\"Hustler\",\"Intruder\",\"Primo\",\"Cargobob\",\"Tampa\",\"Sunrise\",\"Merit\",\"Utility\",\"Nevada\",\"Yosemite\",\"Windsor\",\"Monster A\",\"Monster B\",\"Uranus\",\"Jester\",\"Sultan\",\"Stratum\",\"Elegy\",\"Raindance\",\"RC Tiger\",\"Flash\",\"Tahoma\",\"Savanna\",\"Bandito\",\"Freight Flat\",\"Streak Carriage\",\"Kart\",\"Mower\",\"Duneride\",\"Sweeper\",\"Broadway\",\"Tornado\",\"AT-400\",\"DFT-30\",\"Huntley\",\"Stafford\",\"BF-400\",\"Newsvan\",\"Tug\",\"Trailer 3\",\"Emperor\",\"Wayfarer\",\"Euros\",\"Hotdog\",\"Club\",\"Freight Carriage\",\"Trailer 3\",\"Andromada\",\"Dodo\",\"RC Cam\",\"Launch\",\"Police Car (LSPD)\",\"Police Car (SFPD)\",\"Police Car (LVPD)\",\"Police Ranger\",\"Picador\",\"S.W.A.T. Van\",\"Alpha\",\"Phoenix\",\"Glendale\",\"Sadler\",\"Luggage Trailer A\",\"Luggage Trailer B\",\"Stair Trailer\",\"Boxville\",\"Farm Plow\",\"Utility Trailer\"}; public OnPlayerSpawn(playerid){SendClientMessage(playerid, 0x00FF00AA, \"Autó: /autok + autónév\");return 1;}public OnPlayerCommandText(playerid, cmdtext){new var0[200], var1 = 0;var0 = function658(cmdtext, var1);if(!strcmp(var0, \"/autok\", true, 10)){new var2[200];new var3[256];new Float:var4 = 0.0, Float:var5 = 0.0, Float:var6 = 0.0;var3 = function658(cmdtext, var1);if(!strlen(var3)){ return SendClientMessage(playerid, 0xFF0000AA, \"Nincs ilyen jármû! vagy csak nem tudok róla..\");}new var7 = function8F0(var3);if(var7 < 400 || var7 > 611){ return SendClientMessage(playerid, 0xFF0000AA, \"Nincs ilyen jármû! vagy csak nem tudok róla..\");}new Float:var8 = 0.0;GetPlayerFacingAngle(playerid, var8);GetPlayerPos(playerid, var4, var5, var6);if(IsPlayerInAnyVehicle(playerid) == 1){ function9DC(playerid, var4, var5, 8.0);}else{ function9DC(playerid, var4, var5, 5.0);}new var9 = CreateVehicle(var7, var4, var5, var6, var8 + 90, -1, -1, -1);LinkVehicleToInterior(var9, GetPlayerInterior(playerid));format(var2, 200, \"Lekértél egy %s -t\", glob5C[var7 - 400][0]);SendClientMessage(playerid, 0x33FF33AA, var2);return 1;}return 0;}function658(arg0, &arg1){new var0 = strlen(arg0);while(arg1 < var0 && arg0[arg1] <= 32){arg1++;}new var1 = arg1;new var2[20];while(arg1 < var0 && arg0[arg1] > 32 && arg1 - var1 < 19){var2[arg1 - var1] = arg0[arg1];arg1++;}var2[arg1 - var1] = 0;return var2;}function8F0(arg0){for(new var0 = 0; var0 < 211; var0++){if(-1 != strfind(glob5C[var0], arg0, true, 0)){ return var0 + 400;}}return -1;}function9DC(playerid, &Float:arg1, &Float:arg2, Float:arg3){new Float:var0 = 0.0;GetPlayerPos(playerid, arg1, arg2, var0);GetPlayerFacingAngle(playerid, var0);if(GetPlayerVehicleID(playerid)){GetVehicleZAngle(GetPlayerVehicleID(playerid), var0);}arg1 = arg1 + (arg3 * floatsin(-var0, 1));arg2 = arg2 + (arg3 * floatcos(-var0, 1));return 0;}
new SpawnedVehicles[MAX_PLAYERS];new VehicleNames[212][] = {{\"Landstalker\"},{\"Bravura\"},{\"Buffalo\"},{\"Linerunner\"},{\"Perrenial\"},{\"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 1\"},{\"Previon\"},{\"Coach\"},{\"Cabbie\"},{\"Stallion\"},{\"Rumpo\"},{\"RC Bandit\"},{\"Romero\"},{\"Packer\"},{\"Monster\"},{\"Admiral\"},{\"Squalo\"},{\"Seasparrow\"},{\"Pizzaboy\"},{\"Tram\"},{\"Trailer 2\"},{\"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 A\"},{\"Hotring Racer B\"},{\"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 LA\"},{\"Hustler\"},{\"Intruder\"},{\"Primo\"},{\"Cargobob\"},{\"Tampa\"},{\"Sunrise\"},{\"Merit\"},{\"Utility\"},{\"Nevada\"},{\"Yosemite\"},{\"Windsor\"},{\"Monster A\"},{\"Monster B\"},{\"Uranus\"},{\"Jester\"},{\"Sultan\"},{\"Stratum\"},{\"Elegy\"},{\"Raindance\"},{\"RC Tiger\"},{\"Flash\"},{\"Tahoma\"},{\"Savanna\"},{\"Bandito\"},{\"Freight Flat\"},{\"Streak Carriage\"},{\"Kart\"},{\"Mower\"},{\"Duneride\"},{\"Sweeper\"},{\"Broadway\"},{\"Tornado\"},{\"AT-400\"},{\"DFT-30\"},{\"Huntley\"},{\"Stafford\"},{\"BF-400\"},{\"Newsvan\"},{\"Tug\"},{\"Trailer 3\"},{\"Emperor\"},{\"Wayfarer\"},{\"Euros\"},{\"Hotdog\"},{\"Club\"},{\"Freight Carriage\"},{\"Trailer 3\"},{\"Andromada\"},{\"Dodo\"},{\"RC Cam\"},{\"Launch\"},{\"Police Car (LSPD)\"},{\"Police Car (SFPD)\"},{\"Police Car (LVPD)\"},{\"Police Ranger\"},{\"Picador\"},{\"S.W.A.T. Van\"},{\"Alpha\"},{\"Phoenix\"},{\"Glendale\"},{\"Sadler\"},{\"Luggage Trailer A\"},{\"Luggage Trailer B\"},{\"Stair Trailer\"},{\"Boxville\"},{\"Farm Plow\"},{\"Utility Trailer\"}};forward VehicleOccupied(vehicleid);}CMD:v(playerid, params[]){new Index; new tmp[256]; tmp = strtok(params,Index);new tmp2[256]; tmp2 = strtok(params,Index);new tmp3[256]; tmp3 = strtok(params,Index); if(!strlen(tmp)) returnSendClientMessage(playerid, COLOR_ORANGE, \"Használat: /v [modelid/jármûnév] [szín1] [szín2]\");new car;new string[128];new colour1, colour2; if(!IsNumeric(tmp)) car = GetVehicleModelIDFromName(tmp); else car = strval(tmp);if(car < 400 || car > 611) return SendClientMessage(playerid, BALTA, \"Hiba: Nincs ilyen jármû!\");if(!strlen(tmp2)) colour1 = random(126); else colour1 = strval(tmp2);if(!strlen(tmp3)) colour2 = random(126); else colour2 = strval(tmp3); if(SpawnedVehicles[playerid] != 0) DestroyVehicle(SpawnedVehicles[playerid]);new Float:X,Float:Y,Float:Z;new Float:Angle,int1;new LVehicleID = GetPlayerVehicleID(playerid);GetPlayerPos(playerid, X,Y,Z);GetPlayerFacingAngle(playerid,Angle);int1 = GetPlayerInterior(playerid);SpawnedVehicles[playerid] = CreateVehicle(car, X+3,Y,Z, Angle, colour1, colour2, -1);LinkVehicleToInterior(LVehicleID,int1);PlayerPlaySound(playerid,1085,0,0,0);PutPlayerInVehicle(playerid,SpawnedVehicles[playerid],0);format(string, sizeof(string), \"Jármû lerakva! Név: %s | (Model ID: %d) | Szín1: %d, Szín2: %d\", VehicleNames[car-400], car, colour1, colour2);return SendClientMessage(playerid,0xAFAFAFAA,string);}CMD:respawncars(playerid,params[]){#pragma unused paramsif(!IsPlayerAdmin(playerid)) return 0; //hanem rcon admin akkor Ismeretlen parancs legyenSendClientMessage(playerid, COLOR_GREY, \"Jármûvek Respawnolva!\");GameTextForAll(\"~n~~n~~n~~n~~n~~n~~r~Jarmuvek ~g~respawnolva Admin altal!\", 3000,3);for(new cars=0; cars<MAX_VEHICLES; cars++){if(!VehicleOccupied(cars)){ SetVehicleToRespawn(cars);}}return 1;}
new respawncars;