new eladokocsi[24];public OnGameModeInit(){//Autó kereskedés autói//eladokocsi[0] = AddStaticVehicleEx(603,2472.8000488,1357.9000244,10.8000002,180.0000000,-1,-1,0); //Phoenixeladokocsi[1] = AddStaticVehicleEx(602,2468.6000977,1357.9000244,10.6999998,180.0000000,-1,-1,0); //Alphaeladokocsi[2] = AddStaticVehicleEx(587,2451.8999023,1337.0999756,10.6000004,180.0000000,-1,-1,0); //Euroseladokocsi[3] = AddStaticVehicleEx(565,2464.6999512,1358.0000000,10.5000000,180.0000000,-1,-1,0); //Flasheladokocsi[4] = AddStaticVehicleEx(562,2460.8999023,1358.4000244,10.6000004,180.0000000,-1,-1,0); //Elegyeladokocsi[5] = AddStaticVehicleEx(560,2457.3000488,1358.5000000,10.6000004,180.0000000,-1,-1,0); //Sultaneladokocsi[6] = AddStaticVehicleEx(559,2453.5000000,1358.5999756,10.6000004,180.0000000,-1,-1,0); //Jestereladokocsi[7] = AddStaticVehicleEx(558,2449.6000977,1358.4000244,10.5000000,180.0000000,-1,-1,0); //Uranuseladokocsi[8] = AddStaticVehicleEx(555,2467.3999023,1345.1999512,10.6000004,0.0000000,-1,-1,0); //Windsoreladokocsi[9] = AddStaticVehicleEx(541,2463.3999023,1345.1999512,10.5000000,0.0000000,-1,-1,0); //Bulleteladokocsi[10] = AddStaticVehicleEx(506,2459.3999023,1345.4000244,10.6000004,0.0000000,-1,-1,0); //Super GTeladokocsi[11] = AddStaticVehicleEx(480,2454.8000488,1345.5000000,10.6999998,0.0000000,-1,-1,0); //Cometeladokocsi[12] = AddStaticVehicleEx(477,2450.3999023,1345.5999756,10.6999998,0.0000000,-1,-1,0); //ZR-350eladokocsi[13] = AddStaticVehicleEx(451,2441.3000488,1354.8000488,10.6000004,270.0000000,-1,-1,0); //Turismoeladokocsi[14] = AddStaticVehicleEx(429,2441.1000977,1350.4000244,10.6000004,270.0000000,-1,-1,0); //Bansheeeladokocsi[15] = AddStaticVehicleEx(415,2441.0000000,1346.3000488,10.6999998,270.0000000,-1,-1,0); //Cheetaheladokocsi[16] = AddStaticVehicleEx(411,2441.0000000,1342.0999756,10.6000004,270.0000000,-1,-1,0); //Infernuseladokocsi[17] = AddStaticVehicleEx(402,2441.1000977,1359.0999756,10.8000002,270.0000000,-1,-1,0); //Buffaloeladokocsi[18] = AddStaticVehicleEx(549,2464.8999023,1336.8000488,10.6999998,180.0000000,-1,-1,0); //Tampaeladokocsi[19] = AddStaticVehicleEx(545,2461.1000977,1336.5999756,10.8000002,180.0000000,-1,-1,0); //Hustlereladokocsi[20] = AddStaticVehicleEx(533,2456.8000488,1336.8000488,10.6000004,178.0000000,-1,-1,0); //Feltzereladokocsi[21] = AddStaticVehicleEx(431,2445.0000000,1327.0999756,11.1000004,270.0000000,-1,-1,0); //Buseladokocsi[22] = AddStaticVehicleEx(571,2440.5000000,1338.3000488,10.1999998,270.0000000,-1,-1,0); //Karteladokocsi[23] = AddStaticVehicleEx(478,2441.3999023,1334.6999512,10.8000002,270.0000000,-1,-1,0); //Waltonreturn 1;}public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger){for(new i;i<sizeof(eladokocsi);i++){if(vehicleid == eladokocsi){ ShowPlayerDialog(playerid, DIALOG_ELADOKOCSI, DIALOG_STYLE_MSGBOX, \"{7800FF}Vásárlás\",\"{00FFFF}Ez az autó 500.000$-ba kerül. Szeretnéd megvenni?\", \"Igen\", \"Nem\");break;}}return 1;}public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]){if(dialogid == DIALOG_ELADOKOCSI){if(!response)return RemovePlayerFromVehicle(playerid);{ new file[100]; if(GetPlayerMoney(playerid) < 500000) return SendClientMessage(playerid,PIROS,\"Nem tudod megvenni, mert nincs elég pénzed!\"); GivePlayerMoney(playerid, -500000); SendClientMessage(playerid,ZOLD,\"Megvetted a jármûvet használati útmutató a /help-ben\"); GetPlayerName(playerid,nev,sizeof(nev)); format(file,sizeof(file),\"/Motor tulajdonosok/%s.ini\",nev); if(!dini_Exists(file)) { dini_Create(file); dini_IntSet(file, \"Motor\", 1); }}return 1;}return 1;}
#define MAX_ELADO_KOCSI 24new eladokocsi[MAX_ELADO_KOCSI];new JelenlegElado[MAX_ELADO_KOCSI] = 1;new KocsiID[MAX_PLAYERS];public OnGameModeInit(){eladokocsi[0] = AddStaticVehicleEx(603,2472.8000488,1357.9000244,10.8000002,180.0000000,-1,-1,0); //Phoenixeladokocsi[1] = AddStaticVehicleEx(602,2468.6000977,1357.9000244,10.6999998,180.0000000,-1,-1,0); //Alphaeladokocsi[2] = AddStaticVehicleEx(587,2451.8999023,1337.0999756,10.6000004,180.0000000,-1,-1,0); //Euroseladokocsi[3] = AddStaticVehicleEx(565,2464.6999512,1358.0000000,10.5000000,180.0000000,-1,-1,0); //Flasheladokocsi[4] = AddStaticVehicleEx(562,2460.8999023,1358.4000244,10.6000004,180.0000000,-1,-1,0); //Elegyeladokocsi[5] = AddStaticVehicleEx(560,2457.3000488,1358.5000000,10.6000004,180.0000000,-1,-1,0); //Sultaneladokocsi[6] = AddStaticVehicleEx(559,2453.5000000,1358.5999756,10.6000004,180.0000000,-1,-1,0); //Jestereladokocsi[7] = AddStaticVehicleEx(558,2449.6000977,1358.4000244,10.5000000,180.0000000,-1,-1,0); //Uranuseladokocsi[8] = AddStaticVehicleEx(555,2467.3999023,1345.1999512,10.6000004,0.0000000,-1,-1,0); //Windsoreladokocsi[9] = AddStaticVehicleEx(541,2463.3999023,1345.1999512,10.5000000,0.0000000,-1,-1,0); //Bulleteladokocsi[10] = AddStaticVehicleEx(506,2459.3999023,1345.4000244,10.6000004,0.0000000,-1,-1,0); //Super GTeladokocsi[11] = AddStaticVehicleEx(480,2454.8000488,1345.5000000,10.6999998,0.0000000,-1,-1,0); //Cometeladokocsi[12] = AddStaticVehicleEx(477,2450.3999023,1345.5999756,10.6999998,0.0000000,-1,-1,0); //ZR-350eladokocsi[13] = AddStaticVehicleEx(451,2441.3000488,1354.8000488,10.6000004,270.0000000,-1,-1,0); //Turismoeladokocsi[14] = AddStaticVehicleEx(429,2441.1000977,1350.4000244,10.6000004,270.0000000,-1,-1,0); //Bansheeeladokocsi[15] = AddStaticVehicleEx(415,2441.0000000,1346.3000488,10.6999998,270.0000000,-1,-1,0); //Cheetaheladokocsi[16] = AddStaticVehicleEx(411,2441.0000000,1342.0999756,10.6000004,270.0000000,-1,-1,0); //Infernuseladokocsi[17] = AddStaticVehicleEx(402,2441.1000977,1359.0999756,10.8000002,270.0000000,-1,-1,0); //Buffaloeladokocsi[18] = AddStaticVehicleEx(549,2464.8999023,1336.8000488,10.6999998,180.0000000,-1,-1,0); //Tampaeladokocsi[19] = AddStaticVehicleEx(545,2461.1000977,1336.5999756,10.8000002,180.0000000,-1,-1,0); //Hustlereladokocsi[20] = AddStaticVehicleEx(533,2456.8000488,1336.8000488,10.6000004,178.0000000,-1,-1,0); //Feltzereladokocsi[21] = AddStaticVehicleEx(431,2445.0000000,1327.0999756,11.1000004,270.0000000,-1,-1,0); //Buseladokocsi[22] = AddStaticVehicleEx(571,2440.5000000,1338.3000488,10.1999998,270.0000000,-1,-1,0); //Karteladokocsi[23] = AddStaticVehicleEx(478,2441.3999023,1334.6999512,10.8000002,270.0000000,-1,-1,0); //Waltonreturn 1;}public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger){for(new i;i<MAX_ELADO_KOCSI;i++){ if(vehicleid == eladokocsi){ if(JelenlegElado == 1) { vehicleid = KocsiID[playerid]; ShowPlayerDialog(playerid, DIALOG_ELADOKOCSI, DIALOG_STYLE_MSGBOX, \"{7800FF}Vásárlás\",\"{00FFFF}Ez az autó 500.000$-ba kerül. Szeretnéd megvenni?\", \"Igen\", \"Nem\"); } else { SendClientMessage(playerid,-1,\"Ezt a kocsit már nem lehet megvenni!\"); }}}return 1;}public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]){if(dialogid == DIALOG_ELADOKOCSI){if(!response)return RemovePlayerFromVehicle(playerid);{ new file[100]; if(GetPlayerMoney(playerid) < 500000) return SendClientMessage(playerid,PIROS,\"Nem tudod megvenni, mert nincs elég pénzed!\"); else { GivePlayerMoney(playerid, -500000); SendClientMessage(playerid,ZOLD,\"Megvetted a jármûvet használati útmutató a /help-ben\"); new name[MAX_PLAYER_NAME+1]; GetPlayerName(playerid, name, sizeof(name)); JelenlegElado[KocsiID[playerid]] = 0; format(file,sizeof(file),\"/Motor tulajdonosok/%s.ini\",name); SetTimerEx(\"ReCreateVeh\",10000,0,\"i\",playerid); if(!dini_Exists(file)) { dini_Create(file); dini_IntSet(file, \"Motor\", 1); } }}return 1;}return 1;}forward ReCreateVeh(playerid);public ReCreateVeh(playerid){if(KocsiID[playerid] == eladokocsi[0])AddStaticVehicleEx(603,2472.8000488,1357.9000244,10.8000002,180.0000000,-1,-1,0); //Phoenix if(KocsiID[playerid] == eladokocsi[1])AddStaticVehicleEx(602,2468.6000977,1357.9000244,10.6999998,180.0000000,-1,-1,0); //Alpha if(KocsiID[playerid] == eladokocsi[2])AddStaticVehicleEx(587,2451.8999023,1337.0999756,10.6000004,180.0000000,-1,-1,0); //Euros if(KocsiID[playerid] == eladokocsi[3])AddStaticVehicleEx(565,2464.6999512,1358.0000000,10.5000000,180.0000000,-1,-1,0); //Flash if(KocsiID[playerid] == eladokocsi[4])AddStaticVehicleEx(562,2460.8999023,1358.4000244,10.6000004,180.0000000,-1,-1,0); //Elegy if(KocsiID[playerid] == eladokocsi[5])AddStaticVehicleEx(560,2457.3000488,1358.5000000,10.6000004,180.0000000,-1,-1,0); //Sultan if(KocsiID[playerid] == eladokocsi[6])AddStaticVehicleEx(559,2453.5000000,1358.5999756,10.6000004,180.0000000,-1,-1,0); //Jesterif(KocsiID[playerid] == eladokocsi[7])AddStaticVehicleEx(558,2449.6000977,1358.4000244,10.5000000,180.0000000,-1,-1,0); //Uranus if(KocsiID[playerid] == eladokocsi[8])AddStaticVehicleEx(555,2467.3999023,1345.1999512,10.6000004,0.0000000,-1,-1,0); //Windsor if(KocsiID[playerid] == eladokocsi[9])AddStaticVehicleEx(541,2463.3999023,1345.1999512,10.5000000,0.0000000,-1,-1,0); //Bullet if(KocsiID[playerid] == eladokocsi[10])AddStaticVehicleEx(506,2459.3999023,1345.4000244,10.6000004,0.0000000,-1,-1,0); //Super GT if(KocsiID[playerid] == eladokocsi[11])AddStaticVehicleEx(480,2454.8000488,1345.5000000,10.6999998,0.0000000,-1,-1,0); //Cometif(KocsiID[playerid] == eladokocsi[12])AddStaticVehicleEx(477,2450.3999023,1345.5999756,10.6999998,0.0000000,-1,-1,0); //ZR-350 if(KocsiID[playerid] == eladokocsi[13])AddStaticVehicleEx(451,2441.3000488,1354.8000488,10.6000004,270.0000000,-1,-1,0); //Turismo if(KocsiID[playerid] == eladokocsi[14])AddStaticVehicleEx(429,2441.1000977,1350.4000244,10.6000004,270.0000000,-1,-1,0); //Banshee if(KocsiID[playerid] == eladokocsi[15])AddStaticVehicleEx(415,2441.0000000,1346.3000488,10.6999998,270.0000000,-1,-1,0); //Cheetahif(KocsiID[playerid] == eladokocsi[16])AddStaticVehicleEx(411,2441.0000000,1342.0999756,10.6000004,270.0000000,-1,-1,0); //Infernusif(KocsiID[playerid] == eladokocsi[17])AddStaticVehicleEx(402,2441.1000977,1359.0999756,10.8000002,270.0000000,-1,-1,0); //Buffaloif(KocsiID[playerid] == eladokocsi[18])AddStaticVehicleEx(549,2464.8999023,1336.8000488,10.6999998,180.0000000,-1,-1,0); //Tampaif(KocsiID[playerid] == eladokocsi[19])AddStaticVehicleEx(545,2461.1000977,1336.5999756,10.8000002,180.0000000,-1,-1,0); //Hustlerif(KocsiID[playerid] == eladokocsi[20])AddStaticVehicleEx(533,2456.8000488,1336.8000488,10.6000004,178.0000000,-1,-1,0); //Feltzerif(KocsiID[playerid] == eladokocsi[22])AddStaticVehicleEx(431,2445.0000000,1327.0999756,11.1000004,270.0000000,-1,-1,0); //Busif(KocsiID[playerid] == eladokocsi[23])AddStaticVehicleEx(571,2440.5000000,1338.3000488,10.1999998,270.0000000,-1,-1,0); //Kartif(KocsiID[playerid] == eladokocsi[24])AddStaticVehicleEx(478,2441.3999023,1334.6999512,10.8000002,270.0000000,-1,-1,0); //Waltonreturn 1;}