#include <a_samp>#define DIALOG_VEHICLE 1488#define DIALOG_VLISTER 1490#define COLOR_HRP 0xFF6600FF#define red 0xFF0000AAnew VehicleIDs[MAX_VEHICLES];new v[MAX_PLAYERS];new VehicleName[][] = { \"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 C\", \"Admiral\", \"Squalo\", \"Seasparrow\", \"Pizzaboy\", \"Tram\", \"Trailer\", \"Turismo\", \"Speeder\", \"Reefer\", \"Tropic\", \"Flatbed\", \"Yankee\", \"Caddy\", \"Solair\", \"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 A\", \"Hotring 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\", \"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\", \"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\", \"LSPD\", \"SFPD\", \"LVPD\", \"Police Ranger\", \"Picador\", \"SWAT Van\", \"Alpha\", \"Phoenix\", \"Glendale\", \"Sadler\", \"Trailer1\", \"Trailer2\", \"Trailer3\", \"Boxville\", \"Farm Plow\", \"Utility Trailer\"};public OnPlayerDisconnect(playerid){ DestroyVehicle(v[playerid]);return 1;}public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]){ if(dialogid == DIALOG_VLISTER && response){ if(GetPlayerInterior(playerid) != 0) return SendClientMessage(playerid,red,\"Épületekben nem kérhetsz le autót.\"); { if(IsPlayerInAnyVehicle(playerid)) { if(VehicleIDs[GetPlayerVehicleID(playerid)]) { DestroyVehicle(GetPlayerVehicleID(playerid)); } else { SetVehicleToRespawn(GetPlayerVehicleID(playerid)); } } DestroyVehicle(v[playerid]);// new text[64];// format(text,sizeof(text),\"[%d] %s spawnolva !\", listitem+400,VehicleName[listitem]);// SendClientMessage(playerid, COLOR_HRP, text);new Float: x, Float: y, Float:z;GetPlayerPos(playerid, x, y, z); new vid = CreateVehicle(listitem+400,x+1.2,y+1.2,z,0,-1,-1,600000); LinkVehicleToInterior(vid,GetPlayerInterior(playerid));PutPlayerInVehicle(playerid,vid,0);v[playerid] = vid;VehicleIDs[vid] = 1; }}else if(dialogid == DIALOG_VEHICLE){ if(GetPlayerInterior(playerid) != 0) return SendClientMessage(playerid,red,\"Épületekben nem kérhetsz le autót.\"); { if(!response || !strlen(inputtext)) { return 1; } if(!GetVehicleIDFromName(inputtext) && strval(inputtext) < 400 || !GetVehicleIDFromName(inputtext) && strval(inputtext) > 611) { SendClientMessage(playerid, COLOR_HRP, \"Ismeretlen Jármû !\"); return 1;}if(IsPlayerInAnyVehicle(playerid)) { if(VehicleIDs[GetPlayerVehicleID(playerid)]) { DestroyVehicle(GetPlayerVehicleID(playerid)); } else { SetVehicleToRespawn(GetPlayerVehicleID(playerid)); } } DestroyVehicle(v[playerid]);// new text[64];new Float: x, Float: y, Float:z, Float:a;GetPlayerFacingAngle(playerid, a);GetPlayerPos(playerid, x, y, z);new vid;if(strlen(inputtext) < 4) // tug bus bmx ... 400 - 611{ if(strval(inputtext) < 400) // tug bus bmx { vid = CreateVehicle(GetVehicleIDFromName(inputtext),x+1.2,y+1.2,z,a,-1,-1,600000);// format(text,sizeof(text),\"[%d] %s spawnolva !\", GetVehicleIDFromName(inputtext),inputtext);// SendClientMessage(playerid, COLOR_HRP, text); } else // 400 - 611 { vid = CreateVehicle(strval(inputtext),x+1.2,y+1.2,z,a,-1,-1,600000);// format(text,sizeof(text),\"[%d] %s spawnolva !\", strval(inputtext),VehicleName[strval(inputtext)-400]);// SendClientMessage(playerid, COLOR_HRP, text); }}else{ vid = CreateVehicle(GetVehicleIDFromName(inputtext),x+1.2,y+1.2,z,a,-1,-1,600000);// format(text,sizeof(text),\"[%d] %s spawnolva !\", GetVehicleIDFromName(inputtext),inputtext);// SendClientMessage(playerid, COLOR_HRP, text);}LinkVehicleToInterior(vid,GetPlayerInterior(playerid));PutPlayerInVehicle(playerid,vid,0);v[playerid] = vid;VehicleIDs[vid] = 1;}}return 1;}public OnPlayerCommandText(playerid, cmdtext[]){ if(strcmp(cmdtext, \"/vspawn\", true) == 0 || strcmp(cmdtext, \"/v\", true) == 0 || strcmp(cmdtext, \"/buycar\", true) == 0){ ShowPlayerDialog(playerid, DIALOG_VEHICLE, DIALOG_STYLE_INPUT, \"Jármû Lerakás Név vagy ID Szerint\", \"Írd be a jármû nevét vagy ID-jét !\", \"Lerak\", \"Kilépés\"); return 1;}if(strcmp(cmdtext, \"/vlist\", true) == 0){ new text[2848]; for(new i = 0; i < 211; i++) { if(i == 0) { format(text,sizeof(text),\"[%d] %s\",i+400,VehicleName); } else { format(text,sizeof(text),\"%s\\n[%d] %s\",text,i+400,VehicleName); } } ShowPlayerDialog(playerid, DIALOG_VLISTER, DIALOG_STYLE_LIST,\"Válassz a listából !\",text,\"Lerak\",\"Kilépés\"); return 1;}return 0;}stock GetVehicleIDFromName(modelname[]){ for(new i = 400; i <= 611; i++) { if(strcmp(modelname, VehicleName[i-400], true) == 0) { return i; } }return 0;}
#include <a_samp>#define DIALOG_VEHICLE 1488#define DIALOG_VLISTER 1490#define COLOR_HRP 0xFF6600FF#define red 0xFF0000AAnew VehicleIDs[MAX_VEHICLES];new v[MAX_PLAYERS];new VehicleName[][] = { \"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 C\", \"Admiral\", \"Squalo\", \"Seasparrow\", \"Pizzaboy\", \"Tram\", \"Trailer\", \"Turismo\", \"Speeder\", \"Reefer\", \"Tropic\", \"Flatbed\", \"Yankee\", \"Caddy\", \"Solair\", \"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 A\", \"Hotring 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\", \"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\", \"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\", \"LSPD\", \"SFPD\", \"LVPD\", \"Police Ranger\", \"Picador\", \"SWAT Van\", \"Alpha\", \"Phoenix\", \"Glendale\", \"Sadler\", \"Trailer1\", \"Trailer2\", \"Trailer3\", \"Boxville\", \"Farm Plow\", \"Utility Trailer\"};public OnPlayerDisconnect(playerid){ DestroyVehicle(v[playerid]);return 1;}public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]){ if(dialogid == DIALOG_VLISTER && response){ if(GetPlayerInterior(playerid) != 0) return SendClientMessage(playerid,red,\"Épületekben nem kérhetsz le autót.\"); { if(IsPlayerInAnyVehicle(playerid)) { if(VehicleIDs[GetPlayerVehicleID(playerid)]) { DestroyVehicle(GetPlayerVehicleID(playerid)); } else { SetVehicleToRespawn(GetPlayerVehicleID(playerid)); } } DestroyVehicle(v[playerid]);// new text[64];// format(text,sizeof(text),\"[%d] %s spawnolva !\", listitem+400,VehicleName[listitem]);// SendClientMessage(playerid, COLOR_HRP, text);new Float: x, Float: y, Float:z;GetPlayerPos(playerid, x, y, z); new vid = CreateVehicle(listitem+400,x+1.2,y+1.2,z,0,-1,-1,600000); LinkVehicleToInterior(vid,GetPlayerInterior(playerid));PutPlayerInVehicle(playerid,vid,0);v[playerid] = vid;VehicleIDs[vid] = 1; }}else if(dialogid == DIALOG_VEHICLE){ if(GetPlayerInterior(playerid) != 0) return SendClientMessage(playerid,red,\"Épületekben nem kérhetsz le autót.\"); { if(!response || !strlen(inputtext)) { return 1; } if(!GetVehicleIDFromName(inputtext) && strval(inputtext) < 400 || !GetVehicleIDFromName(inputtext) && strval(inputtext) > 611) { SendClientMessage(playerid, COLOR_HRP, \"Ismeretlen Jármû !\"); return 1;}if(IsPlayerInAnyVehicle(playerid)) { if(VehicleIDs[GetPlayerVehicleID(playerid)]) { DestroyVehicle(GetPlayerVehicleID(playerid)); } else { SetVehicleToRespawn(GetPlayerVehicleID(playerid)); } } DestroyVehicle(v[playerid]);// new text[64];new Float: x, Float: y, Float:z, Float:a;GetPlayerFacingAngle(playerid, a);GetPlayerPos(playerid, x, y, z);new vid;if(strlen(inputtext) < 4) // tug bus bmx ... 400 - 611{ if(strval(inputtext) < 400) // tug bus bmx { vid = CreateVehicle(GetVehicleIDFromName(inputtext),x+1.2,y+1.2,z,a,-1,-1,-1);// format(text,sizeof(text),\"[%d] %s spawnolva !\", GetVehicleIDFromName(inputtext),inputtext);// SendClientMessage(playerid, COLOR_HRP, text); } else // 400 - 611 { vid = CreateVehicle(strval(inputtext),x+1.2,y+1.2,z,a,-1,-1,-1);// format(text,sizeof(text),\"[%d] %s spawnolva !\", strval(inputtext),VehicleName[strval(inputtext)-400]);// SendClientMessage(playerid, COLOR_HRP, text); }}else{ vid = CreateVehicle(GetVehicleIDFromName(inputtext),x+1.2,y+1.2,z,a,-1,-1,-1);// format(text,sizeof(text),\"[%d] %s spawnolva !\", GetVehicleIDFromName(inputtext),inputtext);// SendClientMessage(playerid, COLOR_HRP, text);}LinkVehicleToInterior(vid,GetPlayerInterior(playerid));PutPlayerInVehicle(playerid,vid,0);v[playerid] = vid;VehicleIDs[vid] = 1;}}return 1;}public OnPlayerCommandText(playerid, cmdtext[]){ if(strcmp(cmdtext, \"/vspawn\", true) == 0 || strcmp(cmdtext, \"/v\", true) == 0 || strcmp(cmdtext, \"/buycar\", true) == 0){ ShowPlayerDialog(playerid, DIALOG_VEHICLE, DIALOG_STYLE_INPUT, \"Jármû Lerakás Név vagy ID Szerint\", \"Írd be a jármû nevét vagy ID-jét !\", \"Lerak\", \"Kilépés\"); return 1;}if(strcmp(cmdtext, \"/vlist\", true) == 0){ new text[2848]; for(new i = 0; i < 211; i++) { if(i == 0) { format(text,sizeof(text),\"[%d] %s\",i+400,VehicleName); } else { format(text,sizeof(text),\"%s\\n[%d] %s\",text,i+400,VehicleName); } } ShowPlayerDialog(playerid, DIALOG_VLISTER, DIALOG_STYLE_LIST,\"Válassz a listából !\",text,\"Lerak\",\"Kilépés\"); return 1;}return 0;}stock GetVehicleIDFromName(modelname[]){ for(new i = 400; i <= 611; i++) { if(strcmp(modelname, VehicleName[i-400], true) == 0) { return i; } }return 0;}
#include <a_samp>#define DIALOG_VEHICLE 1488#define DIALOG_VLISTER 1490#define COLOR_HRP 0xFF6600FF#define red 0xFF0000AAnew VehicleIDs[MAX_VEHICLES];new v[MAX_PLAYERS];new VehicleName[][] = { \"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 C\", \"Admiral\", \"Squalo\", \"Seasparrow\", \"Pizzaboy\", \"Tram\", \"Trailer\", \"Turismo\", \"Speeder\", \"Reefer\", \"Tropic\", \"Flatbed\", \"Yankee\", \"Caddy\", \"Solair\", \"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 A\", \"Hotring 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\", \"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\", \"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\", \"LSPD\", \"SFPD\", \"LVPD\", \"Police Ranger\", \"Picador\", \"SWAT Van\", \"Alpha\", \"Phoenix\", \"Glendale\", \"Sadler\", \"Trailer1\", \"Trailer2\", \"Trailer3\", \"Boxville\", \"Farm Plow\", \"Utility Trailer\"};public OnPlayerDisconnect(playerid){ DestroyVehicle(v[playerid]);return 1;}public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]){ if(dialogid == DIALOG_VLISTER && response){ if(GetPlayerInterior(playerid) != 0) return SendClientMessage(playerid,red,\"Épületekben nem kérhetsz le autót.\"); { if(IsPlayerInAnyVehicle(playerid)) { if(VehicleIDs[GetPlayerVehicleID(playerid)]) { DestroyVehicle(GetPlayerVehicleID(playerid)); } else { SetVehicleToRespawn(GetPlayerVehicleID(playerid)); } } DestroyVehicle(v[playerid]);// new text[64];// format(text,sizeof(text),\"[%d] %s spawnolva !\", listitem+400,VehicleName[listitem]);// SendClientMessage(playerid, COLOR_HRP, text);new Float: x, Float: y, Float:z;GetPlayerPos(playerid, x, y, z); new vid = CreateVehicle(listitem+400,x+1.2,y+1.2,z,0,-1,-1,-1); LinkVehicleToInterior(vid,GetPlayerInterior(playerid));PutPlayerInVehicle(playerid,vid,0);v[playerid] = vid;VehicleIDs[vid] = 1; }}else if(dialogid == DIALOG_VEHICLE){ if(GetPlayerInterior(playerid) != 0) return SendClientMessage(playerid,red,\"Épületekben nem kérhetsz le autót.\"); { if(!response || !strlen(inputtext)) { return 1; } if(!GetVehicleIDFromName(inputtext) && strval(inputtext) < 400 || !GetVehicleIDFromName(inputtext) && strval(inputtext) > 611) { SendClientMessage(playerid, COLOR_HRP, \"Ismeretlen Jármû !\"); return 1;}if(IsPlayerInAnyVehicle(playerid)) { if(VehicleIDs[GetPlayerVehicleID(playerid)]) { DestroyVehicle(GetPlayerVehicleID(playerid)); } else { SetVehicleToRespawn(GetPlayerVehicleID(playerid)); } } DestroyVehicle(v[playerid]);// new text[64];new Float: x, Float: y, Float:z, Float:a;GetPlayerFacingAngle(playerid, a);GetPlayerPos(playerid, x, y, z);new vid;if(strlen(inputtext) < 4) // tug bus bmx ... 400 - 611{ if(strval(inputtext) < 400) // tug bus bmx { vid = CreateVehicle(GetVehicleIDFromName(inputtext),x+1.2,y+1.2,z,a,-1,-1,-1);// format(text,sizeof(text),\"[%d] %s spawnolva !\", GetVehicleIDFromName(inputtext),inputtext);// SendClientMessage(playerid, COLOR_HRP, text); } else // 400 - 611 { vid = CreateVehicle(strval(inputtext),x+1.2,y+1.2,z,a,-1,-1,-1);// format(text,sizeof(text),\"[%d] %s spawnolva !\", strval(inputtext),VehicleName[strval(inputtext)-400]);// SendClientMessage(playerid, COLOR_HRP, text); }}else{ vid = CreateVehicle(GetVehicleIDFromName(inputtext),x+1.2,y+1.2,z,a,-1,-1,-1);// format(text,sizeof(text),\"[%d] %s spawnolva !\", GetVehicleIDFromName(inputtext),inputtext);// SendClientMessage(playerid, COLOR_HRP, text);}LinkVehicleToInterior(vid,GetPlayerInterior(playerid));PutPlayerInVehicle(playerid,vid,0);v[playerid] = vid;VehicleIDs[vid] = 1;}}return 1;}public OnPlayerCommandText(playerid, cmdtext[]){ if(strcmp(cmdtext, \"/vspawn\", true) == 0 || strcmp(cmdtext, \"/v\", true) == 0 || strcmp(cmdtext, \"/buycar\", true) == 0){ ShowPlayerDialog(playerid, DIALOG_VEHICLE, DIALOG_STYLE_INPUT, \"Jármû Lerakás Név vagy ID Szerint\", \"Írd be a jármû nevét vagy ID-jét !\", \"Lerak\", \"Kilépés\"); return 1;}if(strcmp(cmdtext, \"/vlist\", true) == 0){ new text[2848]; for(new i = 0; i < 211; i++) { if(i == 0) { format(text,sizeof(text),\"[%d] %s\",i+400,VehicleName); } else { format(text,sizeof(text),\"%s\\n[%d] %s\",text,i+400,VehicleName); } } ShowPlayerDialog(playerid, DIALOG_VLISTER, DIALOG_STYLE_LIST,\"Válassz a listából !\",text,\"Lerak\",\"Kilépés\"); return 1;}return 0;}stock GetVehicleIDFromName(modelname[]){ for(new i = 400; i <= 611; i++) { if(strcmp(modelname, VehicleName[i-400], true) == 0) { return i; } }return 0;}