dcmd_car(playerid, params[]){new carid[32],carid2,color1,color2,Float:x,Float:y,Float:z,Float:Angle,inte;if(sscanf(params, \"s[32]D(1)D(1)\",carid2,color1,color2)) return SendClientMessage(playerid,-1,\"Használat2:/car ...\");if(strlen(carid)==0){ if(color1==-1) color1 = random(126); if(color2==-1) color2 = random(126); GetPlayerPos(playerid,x,y,z); inte = GetPlayerInterior(playerid); GetPlayerFacingAngle(playerid,Angle); DestroyVehicle(PlayerInfo[playerid][kocsi]); PlayerInfo[playerid][kocsi]=CreateVehicle(carid2, x,y,z, Angle, color1, color2, -1); LinkVehicleToInterior(PlayerInfo[playerid][kocsi],inte);}else{ carid2=GetVehicleModelIDFromName(carid); if(color1==-1) color1 = random(126); if(color2==-1) color2 = random(126); GetPlayerPos(playerid,x,y,z); GetPlayerFacingAngle(playerid,Angle); inte = GetPlayerInterior(playerid); DestroyVehicle(PlayerInfo[playerid][kocsi]); PlayerInfo[playerid][kocsi]=CreateVehicle(carid2, x,y,z, Angle, color1, color2, -1); LinkVehicleToInterior(PlayerInfo[playerid][kocsi],inte);}return 1;}stock GetVehicleModelIDFromName(vname[]){ for(new i = 0; i < 211; i++) { if ( strfind(VehicleNames, vname, true) != -1 ) return i + 400; } return -1;}
new VehicleNames[212][] = {\"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-600\",\"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 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\",\"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 A\",\"Emperor\",\"Wayfarer\",\"Euros\",\"Hotdog\",\"Club\",\"Trailer B\",\"Trailer C\",\"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\"}; dcmd_car(playerid, params[]){new carid[32],carid2,color1,color2,Float:x,Float:y,Float:z,Float:Angle,inte;if(sscanf(params, \"s[32]D(-1)D(-1)\",carid2,color1,color2)) return SendClientMessage(playerid,-1,\"Használat2:/car ...\");if(!sscanf(params, \"dD(-1)D(-1)\",carid2,color1,color2)){ if(carid2 < 400 || carid2 > 611) return SendClientMessage(playerid,ERROR, \"HIBA: nemlétezik ilyen modell vagy hibás a név\"); if(color1==-1) color1 = random(126); if(color2==-1) color2 = random(126); GetPlayerPos(playerid,x,y,z); inte = GetPlayerInterior(playerid); GetPlayerFacingAngle(playerid,Angle); DestroyVehicle(PlayerInfo[playerid][kocsi]); PlayerInfo[playerid][kocsi]=CreateVehicle(carid2, x,y,z, Angle, color1, color2, -1); LinkVehicleToInterior(PlayerInfo[playerid][kocsi],inte); PutPlayerInVehicle(playerid,PlayerInfo[playerid][kocsi], 0); format(str,sizeof(str),\"Te lekértél egy %s-t | ID: %d | Szin1: %d | Szin2: %d |\",VehicleNames[carid2-400],carid2,color1,color2);}if(sscanf(params, \"dD(-1)D(-1)\",carid2,color1,color2)){ carid2=GetVehicleModelIDFromName(carid); if(carid2 < 400 || carid2 > 611) return SendClientMessage(playerid,ERROR, \"HIBA: nemlétezik ilyen modell vagy hibás a név\"); if(color1==-1) color1 = random(126); if(color2==-1) color2 = random(126); GetPlayerPos(playerid,x,y,z); GetPlayerFacingAngle(playerid,Angle); inte = GetPlayerInterior(playerid); DestroyVehicle(PlayerInfo[playerid][kocsi]); PlayerInfo[playerid][kocsi]=CreateVehicle(carid2, x,y,z, Angle, color1, color2, -1); LinkVehicleToInterior(PlayerInfo[playerid][kocsi],inte); PutPlayerInVehicle(playerid,PlayerInfo[playerid][kocsi], 0); format(str,sizeof(str),\"Te lekértél egy %s-t | ID: %d | Szin1: %d | Szin2: %d |\",VehicleNames[carid2-400],carid2,color1,color2);}SendClientMessage(playerid,zold,str);return 1;} stock GetVehicleModelIDFromName(vname[]){for(new i = 0; i < 211; i++){if ( strfind(VehicleNames, vname, true) != -1 ) return i + 400;}return -1;}
dcmd_car(playerid, params[]){new carid[32],carid2,color1,color2,Float:x,Float:y,Float:z,Float:Angle,inte;if(IsNumeric(params[0])){if(sscanf(params, \"ddd\",carid2,color1,color2)) return SendClientMessage(playerid,-1,\"Használat2:/car ...\");if(carid2 < 400 || carid2 > 611) return SendClientMessage(playerid,ERROR, \"HIBA: nemlétezik ilyen modell vagy hibás a név\"); if(color1==-1) color1 = random(126); if(color2==-1) color2 = random(126); GetPlayerPos(playerid,x,y,z); inte = GetPlayerInterior(playerid); GetPlayerFacingAngle(playerid,Angle); DestroyVehicle(PlayerInfo[playerid][kocsi]); PlayerInfo[playerid][kocsi]=CreateVehicle(carid2, x,y,z, Angle, color1, color2, -1); LinkVehicleToInterior(PlayerInfo[playerid][kocsi],inte); PutPlayerInVehicle(playerid,PlayerInfo[playerid][kocsi], 0); format(str,sizeof(str),\"Te lekértél egy %s-t | ID: %d | Szin1: %d | Szin2: %d |\",VehicleNames[carid2-400],carid2,color1,color2);}else{if(sscanf(params, \"s[32]dd\",carid,color1,color2)) return SendClientMessage(playerid,-1,\"Használat2:/car ...\");carid2=GetVehicleModelIDFromName(carid); if(carid2 < 400 || carid2 > 611) return SendClientMessage(playerid,ERROR, \"HIBA: nemlétezik ilyen modell vagy hibás a név\"); if(color1==-1) color1 = random(126); if(color2==-1) color2 = random(126); GetPlayerPos(playerid,x,y,z); GetPlayerFacingAngle(playerid,Angle); inte = GetPlayerInterior(playerid); DestroyVehicle(PlayerInfo[playerid][kocsi]); PlayerInfo[playerid][kocsi]=CreateVehicle(carid2, x,y,z, Angle, color1, color2, -1); LinkVehicleToInterior(PlayerInfo[playerid][kocsi],inte); PutPlayerInVehicle(playerid,PlayerInfo[playerid][kocsi], 0); format(str,sizeof(str),\"Te lekértél egy %s-t | ID: %d | Szin1: %d | Szin2: %d |\",VehicleNames[carid2-400],carid2,color1,color2);}SendClientMessage(playerid,zold,str);return 1;} stock GetVehicleModelIDFromName(vname[]){for(new i = 0; i < 211; i++){if ( strfind(VehicleNames, vname, true) != -1 ) return i + 400;}return -1;}stock IsNumeric(string[]){for (new i = 0, j = strlen(string); i < j; i++)if (string > \'9\' || string < \'0\') return 0;return 1;}
if(carid2 < 400 || carid2 > 611) return SendClientMessage(playerid,ERROR, \"HIBA: nemlétezik ilyen modell vagy hibás a név\");teljes kód:dcmd_car(playerid, params[]){new carid[32],carid2,color1,color2,Float:x,Float:y,Float:z,Float:Angle,inte;if(IsNumeric(params[0])){ if(sscanf(params, \"dD(-1)D(-1)\",carid2,color1,color2)) return SendClientMessage(playerid,-1,\"Használat2:/car ...\");}if(!IsNumeric(params[0])){ if(sscanf(params, \"s[32]D(-1)D(-1)\",carid,color1,color2)) return SendClientMessage(playerid,-1,\"Használat2:/car ...\"); carid2=GetVehicleModelIDFromName(carid);}if(carid2 < 400 || carid2 > 611) return SendClientMessage(playerid,ERROR, \"HIBA: nemlétezik ilyen modell vagy hibás a név\");if(color1==-1) color1 = random(126);if(color2==-1) color2 = random(126);GetPlayerPos(playerid,x,y,z);GetPlayerFacingAngle(playerid,Angle);inte = GetPlayerInterior(playerid);DestroyVehicle(PlayerInfo[playerid][kocsi]);PlayerInfo[playerid][kocsi]=CreateVehicle(carid2, x,y,z, Angle, color1, color2, -1);LinkVehicleToInterior(PlayerInfo[playerid][kocsi],inte);PutPlayerInVehicle(playerid,PlayerInfo[playerid][kocsi], 0);format(str,sizeof(str),\"Te lekértél egy %s-t | ID: %d | Szin1: %d | Szin2: %d |\",VehicleNames[carid2-400],carid2,color1,color2);SendClientMessage(playerid,zold,str);return 1;}
dcmd_car(playerid, params[]){new carid[32],carid2,color1,color2,Float:x,Float:y,Float:z,Float:Angle,inte;sscanf(params, \"s[32]D(-1)D(-1)\",carid,color1,color2);if(IsNumeric(carid)){ if(sscanf(params, \"dD(-1)D(-1)\",carid2,color1,color2)) return SendClientMessage(playerid,-1,\"Használat2:/car ...\");}if(!IsNumeric(carid)){ if(sscanf(params, \"s[32]D(-1)D(-1)\",carid,color1,color2)) return SendClientMessage(playerid,-1,\"Használat2:/car ...\"); carid2=GetVehicleModelIDFromName(carid);}if(carid2 < 400 || carid2 > 611) return SendClientMessage(playerid,ERROR, \"HIBA: nemlétezik ilyen modell vagy hibás a név\");if(color1==-1) color1 = random(126);if(color2==-1) color2 = random(126);GetPlayerPos(playerid,x,y,z);GetPlayerFacingAngle(playerid,Angle);inte = GetPlayerInterior(playerid);DestroyVehicle(PlayerInfo[playerid][kocsi]);PlayerInfo[playerid][kocsi]=CreateVehicle(carid2, x,y,z, Angle, color1, color2, -1);LinkVehicleToInterior(PlayerInfo[playerid][kocsi],inte);PutPlayerInVehicle(playerid,PlayerInfo[playerid][kocsi], 0);format(str,sizeof(str),\"Te lekértél egy %s-t | ID: %d | Szin1: %d | Szin2: %d |\",VehicleNames[carid2-400],carid2,color1,color2);SendClientMessage(playerid,zold,str);return 1;}
dcmd_car(playerid, params[]){new carid[32],carid2,color1,color2,Float:x,Float:y,Float:z,Float:Angle,inte;if(sscanf(params, \"s[32]D(-1)D(-1)\",carid,color1,color2)) { return SendClientMessage(playerid,-1,\"Használat2:/car ...\"); }//if(IsNumeric(carid)){ carid2 = strval(carid); }else{ carid2 = GetVehicleModelIDFromName(carid); }//if(carid2 < 400 || carid2 > 611) return SendClientMessage(playerid,ERROR, \"HIBA: nemlétezik ilyen modell vagy hibás a név\");if(color1 == -1) color1 = random(126);if(color2 == -1) color2 = random(126);// Szín ellenõrzés?GetPlayerPos(playerid,x,y,z);GetPlayerFacingAngle(playerid,Angle);inte = GetPlayerInterior(playerid);//if(GetVehicleModel(PlayerInfo[playerid][kocsi])) { DestroyVehicle(PlayerInfo[playerid][kocsi]); }//PlayerInfo[playerid][kocsi] = CreateVehicle(carid2, x,y,z, Angle, color1, color2, -1);LinkVehicleToInterior(PlayerInfo[playerid][kocsi],inte);PutPlayerInVehicle(playerid,PlayerInfo[playerid][kocsi], 0);//format(str,sizeof(str),\"Te lekértél egy %s-t | ID: %d | Szin1: %d | Szin2: %d |\",VehicleNames[carid2-400],carid2,color1,color2);SendClientMessage(playerid,zold,str);return 1;}
#define FILTERSCRIPT#include <a_samp>#include <sscanf2>#include <zcmd>CMD:v(playerid, params[]) {new modelid, color1, color2;sscanf(params, \"k<vehicle>I(-1)I(-1)\", modelid, color1, color2);if(modelid == -1) return SendClientMessage(playerid, 0xFF0000AA, \"Hibás jármûazonosítót adtál meg.\");if(color1 == -1) color1 = random(512);if(color2 == -1) color2 = random(512);new vehicleid, Float:p[4], interior;GetPlayerPos(playerid, p[0], p[1], p[2]);GetPlayerFacingAngle(playerid, p[3]);interior = GetPlayerInterior(playerid);vehicleid = CreateVehicle(modelid, p[0], p[1], p[2], p[3], color1, color2, -1);LinkVehicleToInterior(vehicleid, interior);PutPlayerInVehicle(playerid, vehicleid, 0);SendClientMessage(playerid, 0x00FF00FF, \"Sikeresen lehívtál egy jármûvet!\");return 1;}