#include <a_samp>#include <zcmd>#include <sscanf2>#pragma tabsize 0new Float:x,Float:y,Float:z;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\",\"Admiral\",\"Squalo\",\"Seasparrow\",\"Pizzaboy\",\"Tram\",\"Trailer\",\"Turismo\",\"Speeder\", \"Reefer\",\"Tropic\",\"Flatbed\",\"Yankee\",\"Caddy\",\"Solair\",\"Berkley\'s RC Van\",\"Skimmer\",\"PCJ\",\"Faggio\",\"Freeway\",\"RC Baron\",\"RC Raider\", \"Glendale\",\"Oceanic\",\"Sanchez\",\"Sparrow\",\"Patriot\",\"Quad\",\"Coastguard\",\"Dinghy\",\"Hermes\",\"Sabre\",\"Rustler\",\"ZR3 50\",\"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\",\"NRG\",\"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 B\",\"Trailer C\",\"Andromada\",\"Dodo\",\"RC Cam\",\"Launch\",\"Police Car\",\"Police Car\", \"Police Car\",\"Police Ranger\",\"Picador\",\"S.W.A.T.\",\"Alpha\",\"Phoenix\",\"Glendale\",\"Sadler\",\"Luggage Trailer\",\"Luggage Trailer\", \"Stair Trailer\",\"Boxville\",\"Farm Plow\",\"Utility Trailer\"};new PlayerCar[MAX_PLAYERS]; public OnFilterScriptInit(){ print(\"\\n--------------------------------------\"); print(\" Blank Filterscript by your name here\"); print(\"--------------------------------------\\n\"); return 1;}public OnFilterScriptExit(){ return 1;}stock IsNumeric(const string[]){ for (new i = 0, j = strlen(string); i < j; i++) if (string > \'9\' || string < \'0\') return 0; return 1;}stock ReturnVehicleID(string[]) { for(new i=0;i<sizeof(VehicleName); i++) { if(strfind ( string, VehicleName [ i ], true ) != -1 ) return i+400; } return 0;} CMD:v(playerid,params[]){ new szin1; new szin2; new vehid[128]; new PName[MAX_PLAYER_NAME]; sscanf(params,\"p< >sdd\", vehid, szin1, szin2); if(!vehid[0]) { SendClientMessage(playerid,0xAA3333AA,\"HASZNÁLAT:/v Kocsinév/KocsiID, szin1, szin2\"); } else if(IsPlayerInAnyVehicle(playerid)) { SendClientMessage(playerid,0xAA3333AA,\"Már van kocsid\"); } else { if(PlayerCar[playerid] != 0) { // Ha hibát ír erre a sorra, jelezd a forumon. DestroyVehicle(PlayerCar[playerid]); } new msg[128]; new vid; GetPlayerName(playerid, PName, sizeof(PName)); GetPlayerPos(playerid, x, y, z); if(!IsNumeric(vehid)) vid=ReturnVehicleID(vehid); else vid=strval(vehid); format(msg, sizeof(msg), \"Kaptál egy %s jármûvet!\", VehicleName[vid-400]); SendClientMessage(playerid,0x99FF00AA,msg); PlayerCar[playerid] = CreateVehicle(vid,x+2,y+2,z,0.0,szin1,szin2,9000); } return 1;}
public OnPlayerConnect(playerid){ PlayerCar[playerid] = 0;return 1;}public OnPlayerDisconnect(playerid, reason){ PlayerCar[playerid] = 0;return 1;}