Keresés:

Eredmények megjelenítése: 'betöltés'.

  • Keresés kulcs alapján

    Kulcsszavak ami alapján könnyebben megtalálják a témát.
  • Keresés szerző alapján

Tartalom típusa


Fórum

  • Rejtett
  • Általános beszélgetés
    • A Fórum
    • Beszélgetés
    • Képek / Videók
    • Off Telep
    • Kérdések, Segítség
    • Hostingok
  • San Andreas: Közösség
    • Általános
    • SA-MP szerverek
    • MTA szerverek
    • Média
    • Klánok
  • GTA V - RAGE Multiplayer
    • Általános
    • Szkriptek és Pályák
    • Leírások/Útmutatók
    • Segítségkérés
  • SA-MP: Szerverfejlesztők
    • Szkriptek és Pályák
    • Pluginok és Programok
    • Leírások/Útmutatók
    • Segítségkérés
  • Multi Theft Auto: Szerverfejlesztők
    • Általános
    • Scriptek
    • Leírások
    • Pályakészítő
    • Modellezés
    • Segítségkérés
  • Ügyességi kategóriák & ligák
    • Stunt
    • Drift
    • Parkour
    • Pályakészítõ
  • További GTA Szériák
    • GTA V
    • GTA IV
    • GTA San Andreas
    • GTA Vice City
  • Versenyek és Rendezvények
    • Verseny szervezése
    • Rendezvények

Calendars

  • Community Calendar

4 találat

  1. Sziasztok! Elakadtam, de érzem, hogy közel járok. Arról lenne szó, hogy egy angol (letöltött) házrendszerbe próbálok belefűzni egy bútor rendszert. Minden szuper, a menü, a létrehozás, a vásárlás, a mentés... Viszont a betöltés nem akar sikerülni... Beillesztem ide azokat a részeket, amire szükségetek lehet. (Nem a teljes scriptet.) (A betöltést a házrendszer kocsibetöltéséből próbáltam átalakítani. De sehogy se akar sikerülni...) Előre is köszönöm, ha valaki segít. ///Enumok enum THouseData { PickupID, // Holds the pickup-id that is linked to this house Text3D:DoorText, // Holds the reference to the 3DText above the house's pickup MapIconID, // Holds the ID of the mapicon for the house bool:Owned, // Holds true if the house is owned by somebody Owner[24], // Holds the name of the owner of the house HouseName[100], // Holds the name of the house (this will be displayed above the pickup near the house when it's owned) Float:HouseX, // Holds the X-coordinate of the pickup for the house Float:HouseY, // Holds the Y-coordinate of the pickup for the house Float:HouseZ, // Holds the Z-coordinate of the pickup for the house HouseLevel, // Holds the level of upgrades the house has, and defines which interior to use when you enter the house HouseMaxLevel, // Holds the maximum level this house can be upgraded to HousePrice, // Holds the price for buying the house, the same price applies when upgrading a house per level (multiplied by HouseUpgradePercent/100) bool:HouseOpened, // Holds true if the house is open to the public (anyone can enter), false means: only the owner can enter it bool:Insurance, // Holds "true" if the house has an insurance for the vehicles belonging to this house VehicleIDs[10], // Holds the vehicle-id's of the vehicles linked to this house (max 10 vehicles per house) bool:StaticHouse, // Holds "true" if the house is static (cannot be upgraded and has a fixed interior) CarSlots, // Holds the amount of carslots available //butorok FCount, FModel[MAX_FURNITURE], FurnitureObj[MAX_FURNITURE], Float:FPosX[MAX_FURNITURE], Float:FPosY[MAX_FURNITURE], Float:FPosZ[MAX_FURNITURE], Float:FRotX[MAX_FURNITURE], Float:FRotY[MAX_FURNITURE], Float:FRotZ[MAX_FURNITURE], Interiorja, VirtualWorld } // Holds the data for all houses new AHouseData[MAX_HOUSES][THouseData]; //////////////////// //Betöltés /////////////////// Butorokbetolt(HouseID) //A gamemode betöltésénél van, ugyanígy tölti be a házakat. { // Setup local variables new file[100], File:HFile, LineFromFile[100], ParameterName[50], ParameterValue[50]; // Construct the complete filename for this house-file format(file, sizeof(file), HouseFile, HouseID); // Construct the complete filename for this house-file // Check if the HouseFile exists if (fexist(file)) { // Open the housefile for reading HFile = fopen(file, io_read); // Read the first line of the file fread(HFile, LineFromFile); // Keep reading until the end of the file is found (no more data) // An empty line between data-segments still has the NewLine characters (\r\n) so it's not completely empty // Reading past the last line will read a completely empty line, therefore indicating the end of the file while (strlen(LineFromFile) > 0) { StripNewLine(LineFromFile); // Strip any newline characters from the LineFromFile sscanf(LineFromFile, "s[50]s[50]", ParameterName, ParameterValue); // Extract parametername and parametervalue new Float:butikao[6]; new butikai; // Check if there is anything in the LineFromFile (skipping empty lines) if (strlen(LineFromFile) > 0) { if (strcmp(ParameterName, "[Butor]", false) == 0) // If the parametername is correct ("[Vehicle]") { // Clear all data to start a new vehicle for (new i; i < 6; i++) butikao[i] = 0; } //majd ide if (strcmp(ParameterName, "FCount", false) == 0) AHouseData[HouseID][FCount] = strval(ParameterValue); if (strcmp(ParameterName, "FModel", false) == 0) butikai = strval(ParameterValue); if (strcmp(ParameterName, "FPosX", false) == 0) butikao[0] = floatstr(ParameterValue); if (strcmp(ParameterName, "FPosY", false) == 0) butikao[1] = floatstr(ParameterValue); if (strcmp(ParameterName, "FPosZ", false) == 0) butikao[2] = floatstr(ParameterValue); if (strcmp(ParameterName, "FRotX", false) == 0) butikao[3] = floatstr(ParameterValue); if (strcmp(ParameterName, "FRotY", false) == 0) butikao[4] = floatstr(ParameterValue); if (strcmp(ParameterName, "FRotZ", false) == 0) butikao[5] = floatstr(ParameterValue); if (strcmp(ParameterName, "[/Butor]", false) == 0) // If the parametername is correct ("[/Vehicle]") { for(new i = 0; i < AHouseData[HouseID][FCount]; i ++) { if(i != 0) { AHouseData[HouseID][FModel][i] = butikai; AHouseData[HouseID][FPosX][i] = butikao[0]; AHouseData[HouseID][FPosY][i] = butikao[1]; AHouseData[HouseID][FPosZ][i] = butikao[2]; AHouseData[HouseID][FRotX][i] = butikao[3]; AHouseData[HouseID][FRotY][i] = butikao[4]; AHouseData[HouseID][FRotZ][i] = butikao[5]; printf("Ebben a házban ennyi bútor lett betöltve: %d",AHouseData[HouseID][FCount]); } } } } // Read the next line of the file fread(HFile, LineFromFile); } // Close the file fclose(HFile); // Return if the file was read correctly return 1; } else return 0; // Return 0 if the file couldn't be read (doesn't exist) } /////////////////////// //így néz ki a mentés fájl. ////////////////////// Owned Yes Owner Valaki HouseName Valaki háza HouseX 1478.116210 HouseY 1013.164611 HouseZ 10.869333 HouseLevel 9 HouseMaxLevel 9 HousePrice 0 HouseOpened No Insurance No StaticHouse Yes CarSlots 10 FCount 6 [Butor] FModel 0 FPosX 0.000000 FPosY 0.000000 FPosZ 0.000000 FRotX 0.000000 FRotY 0.000000 FRotZ 0.000000 [/Butor] [Butor] FModel 0 FPosX 0.000000 FPosY 0.000000 FPosZ 0.000000 FRotX 0.000000 FRotY 0.000000 FRotZ 0.000000 [/Butor] [Butor] FModel 0 FPosX 0.000000 FPosY 0.000000 FPosZ 0.000000 FRotX 0.000000 FRotY 0.000000 FRotZ 0.000000 [/Butor] [Butor] FModel 0 FPosX 0.000000 FPosY 0.000000 FPosZ 0.000000 FRotX 0.000000 FRotY 0.000000 FRotZ 0.000000 [/Butor] [Butor] FModel 0 FPosX 0.000000 FPosY 0.000000 FPosZ 0.000000 FRotX 0.000000 FRotY 0.000000 FRotZ 0.000000 [/Butor] Ebből többszáz van, (MAX_FURNITURES), párat másoltam csak be.
  2. Sziasztok. Egy mapváltást szeretnék megcsinálni a szerveremen, tehát pl. 5 perc után vált egy mapot egy txt fájlból, viszont ezt még nem nagyon sikerült összehozni. Van egy start parancs amivel ezt az egészet elindítja, és van egy olajospalya.txt nevű fájlom abban vannak az adatok. Először megpróbáltam úgy, hogy a txt fájlban CreateObject is ott volt, aztán már csak RAW Data, tehát csak akkor működik ha a txt fájlban így van beleírva: 8210, 287.91364, 1456.87207, 12.66430, 0.00000, 0.00000, 90.00000; model, x pozíció, y, z, forgatásnak x, y, z - tehát jelenleg így működik a betöltés csak, és 55 object van mindegyiket betölti, viszont az lenne a gondom hogy az utolsó forgatási z pozíciót sose tölti be, mindegyiknél 0-át ír, ez mitől lehet? emiatt ugye rosszul is vannak elforgatva CMD:start(playerid, params[]) { if(JatekosInfo[playerid][Admin] >= 4) { if(inditas == 1) return SCM(playerid, -1,"{ff0000}[MP-ZM] A játék már el van indítva!"); inditas = 1; new string[128], masikstring[32]; new randompaly = random(sizeof(randompalya)); format(kovipalya, 32, "%s", randompalya[randompaly]); if(Egyezik(kovipalya, "olajospalya.txt")) { format(masikstring, sizeof(masikstring),"Olajos"); } format(string, sizeof(string),"{ff0000}[MP-ZM] {008000}JÁTÉK ELINDÍTVA! PÁLYA: %s", masikstring); SCMTA(-1, string); new File:handle = fopen(kovipalya, io_read), buf[128]; if(!handle) return 0; new model, count; new Float:px, Float:py, Float:pz, Float:rx, Float:ry, Float:rz; /*for(new i = 0; i < MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { nologin[i] = 1; } }*/ while(fread(handle, buf)) { if(sscanf(buf, "p<,>iffffff", model, px, py, pz, rx, ry, rz)) { count++; printf("model: %i | px: %f | py: %f | pz: %f | rx: %f | ry: %f | rz: %f", model, px, py, pz, rx, ry, rz); CreateObject(model, px, py, pz, rx, ry, rz); } } fclose(handle); printf("[ Objectek sikeresen betöltve! | Pálya: %s | Objectek száma: %i ]",kovipalya, count); for(new i = 0; i < MAX_PLAYERS; i++) { if(IsPlayerConnected(i))//275.3230,1413.0404,10.4401 { if(Egyezik(kovipalya, "olajospalya.txt")) { RemoveBuildingForPlayer(i, 3288, 221.5703, 1374.9688, 9.5859, 0.25); RemoveBuildingForPlayer(i, 3257, 221.5703, 1374.9688, 9.5859, 0.25); RemoveBuildingForPlayer(i, 3674, 199.3828, 1407.1172, 35.8984, 0.25); RemoveBuildingForPlayer(i, 3674, 247.5547, 1471.0938, 35.8984, 0.25); } SetPlayerPos(i, 275.3230,1413.0404,10.4401); tulelo[i] = 1; } } } else { SCM(playerid, -1,"{ff0000}[MP-ZM] Nem vagy jogosult a parancs használatára!"); } return 1; }
  3. Sziasztok, van egy kocsirendszerem amit kissé átszerkesztettem, vagyis legelőször próbáltam magamtól megcsinálni, hogy megtanuljam de tanultam sok modból is, én dinit használok mert tanulok belőle, viszont később át fogok térni a mysqlre, csupán most ez így könnyebb számomra, elküldöm a kocsirendszert, annyi a baj vele, hogy ugye megveszi a kocsit minden jó, lespawnolja aztán elmegyek valahova leparkolom fellépek, betölti de viszont azt írja ki hogy "ez nem az én járművem/nincs kulcsom ehhez a járműhöz." Viszont ha a /getkocsitulaj paranccsal lehívom a kocsinak a tulaját akkor kijelzi, megnéztem akkor hogy lehet a /motor-nál vagy a /parkol-nál van hiba, de nem találom, tudnátok segíteni légy szíves? enum vInfo { Model, Float:XPos, Float:YPos, Float:ZPos, Float:APos, Szin1, Szin2, Respawn, Tulaj[24], Float:Elet, Zarva, INT, VW, Sold, Beinditva, FutottKM, Uzemanyag, // 1 = Benzin , 2 = Diesel Fuel, MaxFuel } stock KocsiOn(vehicleid) { new doors, lights, engine, alarm, bonnet, boot, objective; GetVehicleParamsEx(vehicleid,engine,lights,alarm,doors,bonnet,boot,objective); SetVehicleParamsEx(vehicleid,1,1,alarm,doors,bonnet,boot,objective); JarmuInfo[vehicleid][Beinditva] = 1; return 1; } stock KocsiOff(vehicleid) { new doors, alarm, bonnet, boot, objective; SetVehicleParamsEx(vehicleid,0,0,alarm,doors,bonnet,boot,objective); JarmuInfo[vehicleid][Beinditva] = 0; return 1; } /* stock vFile(vehicleid) { new vehicleFile[60]; format(vehicleFile,sizeof(vehicleFile),"/kocsik/%d.ini", vehicleid); return vehicleFile; } stock CreateVehicleEx(modelid, Float:x, Float:y, Float:z, Float:a, color1, color2, respawntime, tulaj[24]) { new vehicleid = GetFreeVehicleSlot(); JarmuInfo[vehicleid][Model] = modelid; JarmuInfo[vehicleid][XPos] = x; JarmuInfo[vehicleid][YPos] = y; JarmuInfo[vehicleid][ZPos] = z; JarmuInfo[vehicleid][APos] = a; JarmuInfo[vehicleid][Szin1] = color1; JarmuInfo[vehicleid][Szin2] = color2; JarmuInfo[vehicleid][Respawn] = respawntime; JarmuInfo[vehicleid][Tulaj] = tulaj; CreateVehicle(modelid, x, y, z, a, color1, color2, respawntime); return vehicleid; } */ stock LoadVehicle(vehicleid) { JarmuInfo[vehicleid][Model] = dini_Int(vehicleFile(vehicleid),"Model"); JarmuInfo[vehicleid][XPos] = dini_Float(vehicleFile(vehicleid), "XPos"); JarmuInfo[vehicleid][YPos] = dini_Float(vehicleFile(vehicleid), "YPos"); JarmuInfo[vehicleid][ZPos] = dini_Float(vehicleFile(vehicleid), "ZPos"); JarmuInfo[vehicleid][APos] = dini_Float(vehicleFile(vehicleid), "APos"); JarmuInfo[vehicleid][Szin1] = dini_Int(vehicleFile(vehicleid), "Szin1"); JarmuInfo[vehicleid][Szin2] = dini_Int(vehicleFile(vehicleid), "Szin2"); format(JarmuInfo[vehicleid][Tulaj], 128, dini_Get(vehicleFile(vehicleid), "Tulaj")); JarmuInfo[vehicleid][Respawn] = dini_Int(vehicleFile(vehicleid), "Respawn"); JarmuInfo[vehicleid][Zarva] = dini_Int(vehicleFile(vehicleid), "Zarva"); JarmuInfo[vehicleid][FutottKM] = dini_Int(vehicleFile(vehicleid), "FutottKM"); JarmuInfo[vehicleid][Elet] = dini_Float(vehicleFile(vehicleid), "Elet"); vehicleid = CreateVehicle(JarmuInfo[vehicleid][Model], JarmuInfo[vehicleid][XPos], JarmuInfo[vehicleid][YPos], JarmuInfo[vehicleid][ZPos], JarmuInfo[vehicleid][APos], JarmuInfo[vehicleid][Szin1], JarmuInfo[vehicleid][Szin2], JarmuInfo[vehicleid][Respawn]); SetVehicleVirtualWorld(vehicleid, JarmuInfo[vehicleid][VW]); LinkVehicleToInterior(vehicleid, JarmuInfo[vehicleid][INT]); return 1; } stock ReloadVehicle(vehicleid) { if(JarmuInfo[vehicleid][Sold] == 0) return 0; DestroyVehicle(vehicleid); GetVehicleHealth(vehicleid, JarmuInfo[vehicleid][Elet]); JarmuInfo[vehicleid][Model] = dini_Int(vehicleFile(vehicleid),"Model"); JarmuInfo[vehicleid][XPos] = dini_Float(vehicleFile(vehicleid), "XPos"); JarmuInfo[vehicleid][YPos] = dini_Float(vehicleFile(vehicleid), "YPos"); JarmuInfo[vehicleid][ZPos] = dini_Float(vehicleFile(vehicleid), "ZPos"); JarmuInfo[vehicleid][APos] = dini_Float(vehicleFile(vehicleid), "APos"); JarmuInfo[vehicleid][Szin1] = dini_Int(vehicleFile(vehicleid), "Szin1"); JarmuInfo[vehicleid][Szin2] = dini_Int(vehicleFile(vehicleid), "Szin2"); JarmuInfo[vehicleid][Respawn] = dini_Int(vehicleFile(vehicleid), "Respawn"); format(JarmuInfo[vehicleid][Tulaj], 34, "%s", dini_Get(vehicleFile(vehicleid), "Tulaj")); JarmuInfo[vehicleid][FutottKM] = dini_Int(vehicleFile(vehicleid), "FutottKM"); JarmuInfo[vehicleid][Elet] = dini_Float(vehicleFile(vehicleid), "Elet"); JarmuInfo[vehicleid][Zarva] = dini_Int(vehicleFile(vehicleid), "Zarva"); JarmuInfo[vehicleid][Sold] = dini_Int(vehicleFile(vehicleid), "Sold"); JarmuInfo[vehicleid][Beinditva] = dini_Int(vehicleFile(vehicleid), "Beinditva"); JarmuInfo[vehicleid][Elet] = dini_Float(vehicleFile(vehicleid), "Elet"); vehicleid = CreateVehicle(JarmuInfo[vehicleid][Model], JarmuInfo[vehicleid][XPos], JarmuInfo[vehicleid][YPos], JarmuInfo[vehicleid][ZPos], JarmuInfo[vehicleid][APos], JarmuInfo[vehicleid][Szin1], JarmuInfo[vehicleid][Szin2], JarmuInfo[vehicleid][Respawn]); SetVehiclePos(vehicleid, JarmuInfo[vehicleid][XPos], JarmuInfo[vehicleid][YPos], JarmuInfo[vehicleid][ZPos]); SetVehicleZAngle(vehicleid, JarmuInfo[vehicleid][APos]); SetVehicleVirtualWorld(vehicleid, JarmuInfo[vehicleid][VW]); LinkVehicleToInterior(vehicleid, JarmuInfo[vehicleid][INT]); return 1; } stock vehicleFile(vehicleid) { new sz_gFile[ 64 + 1 ]; format( sz_gFile, sizeof(sz_gFile), "/kocsik/%d.ini", vehicleid); return sz_gFile; } stock SaveVehicle(vehicleid) { if(JarmuInfo[vehicleid][Sold] == 1) { if(!dini_Exists(vehicleFile(vehicleid))) { dini_Create( vehicleFile(vehicleid) ); } } GetVehicleHealth(vehicleid, JarmuInfo[vehicleid][Elet]); GetVehicleZAngle(vehicleid, JarmuInfo[vehicleid][APos]); GetVehiclePos(vehicleid, JarmuInfo[vehicleid][XPos], JarmuInfo[vehicleid][ZPos], JarmuInfo[vehicleid][YPos]); dini_IntSet(vehicleFile(vehicleid),"Model", GetVehicleModel(vehicleid)); dini_FloatSet(vehicleFile(vehicleid),"XPos", JarmuInfo[vehicleid][XPos]); dini_FloatSet(vehicleFile(vehicleid),"YPos", JarmuInfo[vehicleid][YPos]); dini_FloatSet(vehicleFile(vehicleid),"ZPos", JarmuInfo[vehicleid][ZPos]); dini_FloatSet(vehicleFile(vehicleid),"APos", JarmuInfo[vehicleid][APos]); dini_IntSet(vehicleFile(vehicleid),"Szin1", JarmuInfo[vehicleid][Szin1]); dini_IntSet(vehicleFile(vehicleid),"Szin2", JarmuInfo[vehicleid][Szin2]); dini_IntSet(vehicleFile(vehicleid),"Respawn", JarmuInfo[vehicleid][Respawn]); dini_FloatSet(vehicleFile(vehicleid),"Elet", JarmuInfo[vehicleid][Elet]); dini_Set(vehicleFile(vehicleid), "Tulaj", JarmuInfo[vehicleid][Tulaj]); dini_IntSet(vehicleFile(vehicleid), "Zarva", JarmuInfo[vehicleid][Zarva]); dini_IntSet(vehicleFile(vehicleid), "INT", JarmuInfo[vehicleid][INT]); dini_IntSet(vehicleFile(vehicleid), "VW", JarmuInfo[vehicleid][VW]); dini_IntSet(vehicleFile(vehicleid), "Sold", JarmuInfo[vehicleid][Sold]); dini_IntSet(vehicleFile(vehicleid), "Beinditva", JarmuInfo[vehicleid][Beinditva]); dini_IntSet(vehicleFile(vehicleid), "FutottKM", JarmuInfo[vehicleid][FutottKM]); return 1; } stock LoadAllVehicles() { for(new i; i < MAX_VEHICLES; i++) { LoadVehicle(i); } } stock SaveAllVehicles() { for(new i; i < MAX_VEHICLES; i++) { SaveVehicle(i); } } stock IsPlayerCar( playerid, vehicleid ) { if( Egyezik(Name(playerid), JarmuInfo[vehicleid][Tulaj])) { return 1; } else { return 0; } } CMD:parkol(playerid, params[]) { new vehicleid = Kozelikocsi(playerid); new Float:x, Float:y, Float:z; for(new i; i < MAX_VEHICLES; i++) { GetVehiclePos(i, x, y, z); if(IsPlayerInRangeOfPoint(playerid, 3, x, y, z)) { if(CompareEx(Name(playerid), JarmuInfo[i][Tulaj])) { if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER) { GetVehiclePos( vehicleid, JarmuInfo[vehicleid][XPos], JarmuInfo[vehicleid][YPos], JarmuInfo[vehicleid][ZPos]); GetVehicleZAngle( vehicleid, JarmuInfo[vehicleid][APos]); GetVehicleHealth(vehicleid, JarmuInfo[vehicleid][Elet]); JarmuInfo[vehicleid][INT] = GetPlayerInterior(playerid); JarmuInfo[vehicleid][VW] = GetPlayerVirtualWorld(playerid); format(JarmuInfo[vehicleid][Tulaj], 30, "%s", Name(playerid)); SCM(playerid, -1,"{ffdd00}Sikeres parkolás!"); SaveVehicle(vehicleid); ReloadVehicle(vehicleid); SaveVehicle(vehicleid); ReloadVehicle(vehicleid); } else { SCM(playerid, -1,"{ff0000}Szállj be a kocsiba!"); } } } } return 1; } CMD:kocsikulcs(playerid, params[]) { new Float: x, Float: y, Float: z, bool:talalat = false, bool:ove = false; for(new i; i < MAX_VEHICLES; i ++) { GetVehiclePos(i, x, y, z); if(IsPlayerInRangeOfPoint(playerid, 3.0, x, y, z)) { talalat = true; if(IsPlayerCar( playerid, i ) == 2 || JatekosInfo[playerid][KocsiID1] == i) { ove = true; if(JarmuInfo[i][Zarva] == 0) { JarmuInfo[i][Zarva] = 1; SendClientMessage(playerid, NARANCS, "Bezártad a járműved!"); cmd_me(playerid, "bezárta a járművet."); } else { SendClientMessage(playerid, NARANCS, "Kinyitottad a járműved!"); cmd_me(playerid, "kinyitotta a járművet."); JarmuInfo[i][Zarva] = 0; } } } } if(talalat == false) return SendClientMessage(playerid, -1, "{ff0000}Nem vagy jármű mellett!"); if(ove == false) return SendClientMessage(playerid, -1, "{ff0000}Ez a jármű nem a tiéd!"); return 1; } CMD:motor(playerid, params[]) { new vehicle = GetPlayerVehicleID(playerid); if(IsPlayerInAnyVehicle(playerid)) { if(IsPlayerInVehicle(playerid,taxikocsi1) || IsPlayerInVehicle(playerid,taxikocsi2) || IsPlayerInVehicle(playerid,taxikocsi3) || IsPlayerInVehicle(playerid,taxikocsi4) || IsPlayerInVehicle(playerid,taxikocsi5) || IsPlayerInVehicle(playerid,taxikocsi6) || IsPlayerInVehicle(playerid,taxikocsi7) || IsPlayerInVehicle(playerid,taxikocsi8)) { if(JatekosInfo[playerid][Frakcio] == 6 || AdminSzoliban[playerid] == true) { if(JarmuInfo[vehicle][Beinditva] == 0) { KocsiOn(vehicle); cmd_me(playerid,"beindította a járművet."); } else if(JarmuInfo[vehicle][Beinditva] == 1) { KocsiOff(vehicle); cmd_me(playerid,"leállította a járművet."); } } else { SCM(playerid, -1,"{ff0000}Ehhez a járműhöz nincs kulcsod!"); } } else if(IsPlayerInVehicle(playerid, radiokocsi1) || IsPlayerInVehicle(playerid, radiokocsi2) || IsPlayerInVehicle(playerid, radioheli1)) { if(JatekosInfo[playerid][Frakcio] == 4 || AdminSzoliban[playerid] == true) { if(JarmuInfo[vehicle][Beinditva] == 0) { KocsiOn(vehicle); cmd_me(playerid,"beindította a járművet."); } else if(JarmuInfo[vehicle][Beinditva] == 1) { KocsiOff(vehicle); cmd_me(playerid,"leállította a járművet."); } } else { SCM(playerid, -1,"{ff0000}Ehhez a járműhöz nincs kulcsod!"); } } else if(CompareEx(Name(playerid), JarmuInfo[vehicle][Tulaj]) || AdminSzoliban[playerid] == true || JatekosInfo[playerid][KocsiID1] == vehicle) { if(JarmuInfo[vehicle][Beinditva] == 0) { KocsiOn(vehicle); cmd_me(playerid,"beindította a járművet."); } else if(JarmuInfo[vehicle][Beinditva] == 1) { KocsiOff(vehicle); cmd_me(playerid,"leállította a járművet."); } } else { SCM(playerid, -1,"{ff0000}Ehhez a járműhöz nincs kulcsod!"); } } else { SCM(playerid, -1,"{ff0000}Mit akarsz beindítani?"); } return 1; } if(dialogid == jarmuvesz) { if(response) { new sz_gString[ 128 + 1 ], S[256]; new i_Vehicle = 0; new talalat = 0; for(new i; i < MAX_VEHICLES; i ++) { if( Egyezik(Name(playerid), JarmuInfo[i][Tulaj])) { talalat++; } } if(talalat >= 3) return SCM(playerid, -1, "{ff0000}Maximum 3 kocsid lehet, prémium tagság esetén 6!"); if( i_Vehicle >= MAX_VEHICLES) return SendClientMessageToAll(PIROS, "Nem lehet több járművet venni, a járművek elérték a maximumot!"); if(JatekosInfo[playerid][Penz] < Vehicles[listitem][1]) return SCM(playerid, -1, "{ff0000}Nincs elég pénz nálad ennek a kocsinak a vásárlásához!"); JatekosInfo[playerid][Penz] -= Vehicles[ listitem ][ 1 ]; i_Vehicle = CreateVehicle(GetVehicleNameFromDialog(listitem), -1221.7827,1827.3278,41.4795,229.6266, 1, 1, 0 ); JarmuInfo[i_Vehicle][Model] = GetVehicleNameFromDialog(listitem); JarmuInfo[i_Vehicle][Szin1] = 1; JarmuInfo[i_Vehicle][Szin2] = 1; JarmuInfo[i_Vehicle][Elet] = 1000.0; GetVehiclePos(i_Vehicle, JarmuInfo[i_Vehicle][XPos], JarmuInfo[i_Vehicle][YPos], JarmuInfo[i_Vehicle][ZPos]); GetVehicleZAngle(i_Vehicle, JarmuInfo[i_Vehicle][APos]); GetVehicleHealth(i_Vehicle, JarmuInfo[i_Vehicle][Elet]); JarmuInfo[i_Vehicle][INT] = GetPlayerInterior(playerid); JarmuInfo[i_Vehicle][VW] = GetPlayerVirtualWorld(playerid); format(JarmuInfo[i_Vehicle][Tulaj], 30, "%s", Name(playerid)); ChangeVehicleColor( i_Vehicle, 1, 1); format( sz_gString, sizeof(sz_gString), "{ffdd00}* Sikeresen megvettél egy járművet! (( ID: %d | Többi infó: /kocsihelp )) *", i_Vehicle ); SCM( playerid, -1, sz_gString ); SCM(playerid, -1,"{ffdd00}* Vigyázz rá, mert ha felrobban a járműved akkor többé már nem használhatod! *"); cmd_me(playerid, "vett egy járművet."); format(S, sizeof(S), "{11B0CC}[S-ADMIN] %s vett egy járművet! ID: %d ", Name(playerid), i_Vehicle); AdminUzenet(-1, S); if(talalat == 0) { JatekosInfo[playerid][KocsiID1] = i_Vehicle; } else if(talalat == 1) { JatekosInfo[playerid][KocsiID2] = i_Vehicle; } else if(talalat == 2) { JatekosInfo[playerid][KocsiID3] = i_Vehicle; } JarmuInfo[i_Vehicle][Sold] = 1; JarmuInfo[i_Vehicle][INT] = GetPlayerInterior(playerid); JarmuInfo[i_Vehicle][VW] = GetPlayerVirtualWorld(playerid); new Float:vehiclehealth; GetVehicleHealth(i_Vehicle, vehiclehealth); JarmuInfo[i_Vehicle][Elet] = vehiclehealth; JarmuInfo[i_Vehicle][Beinditva] = 0; SaveVehicle(i_Vehicle); } }
  4. Sziasztok! Valaki át tudná írni nekem ezt a kódot, úgy, hogy amikor a játékos lelép csak akkor spawnoljanak le a kocsijai és amikor lelép törlödjenek? Meg, hogy lehessen legalább 5 kocsija egy embernek ne csak egy. Én ehhez valahogy hülye vagyok nem akar összejönni működőképesen :) (Tudom ez nem ZCMD de átírom majd (Netről töltöttem) ) Előre is köszönöm ha valaki segít nekem! #include <a_samp> #include <dini> #define COLOR_GRAD2 0xBFC0C2FF #define COLOR_GRAD3 0xCBCCCEFF #define ORANGE 0xF67900F6 #define WHITE 0xF6F6F6F6 #define GREEN 0x00D400F6 #define YELLOW 0xECD400F6 #define COLOR_GREY 0x777979FF #define COLOR_PURPLE 0xC2A2DAAA #define COLOR_WHITE 0xFFFFFFAA #define MAX_BUY_V 50 #pragma tabsize 0 forward ini_GetKey( line[] ); enum Auto { model,owned,cLock, Float:x,Float:y,Float:z, Farbe1,Farbe2,Float:a,owner[128],preis,paintjob,mod1,mod2,mod3,mod4,mod5,mod6,mod7,mod8,mod9,mod10, mod11,mod12,mod13,mod14,mod15,mod16,mod17, } new VehicleSystem[MAX_BUY_V][Auto]; new IDIS[MAX_VEHICLES]; new created; new file[256]; new Text3D:TextUpCar[MAX_VEHICLES]; new TextCar[256]; forward ProxDetector(Float:radi, playerid, string[],col1,col2,col3,col4,col5); forward SaveTool(); forward Carlabel(playerid); new spoiler[20][0] = { {1000}, {1001}, {1002}, {1003}, {1014}, {1015}, {1016}, {1023}, {1058}, {1060}, {1049}, {1050}, {1138}, {1139}, {1146}, {1147}, {1158}, {1162}, {1163}, {1164} }; new nitro[3][0] = { {1008}, {1009}, {1010} }; new fbumper[23][0] = { {1117}, {1152}, {1153}, {1155}, {1157}, {1160}, {1165}, {1167}, {1169}, {1170}, {1171}, {1172}, {1173}, {1174}, {1175}, {1179}, {1181}, {1182}, {1185}, {1188}, {1189}, {1192}, {1193} }; new rbumper[22][0] = { {1140}, {1141}, {1148}, {1149}, {1150}, {1151}, {1154}, {1156}, {1159}, {1161}, {1166}, {1168}, {1176}, {1177}, {1178}, {1180}, {1183}, {1184}, {1186}, {1187}, {1190}, {1191} }; new exhaust[28][0] = { {1018}, {1019}, {1020}, {1021}, {1022}, {1028}, {1029}, {1037}, {1043}, {1044}, {1045}, {1046}, {1059}, {1064}, {1065}, {1066}, {1089}, {1092}, {1104}, {1105}, {1113}, {1114}, {1126}, {1127}, {1129}, {1132}, {1135}, {1136} }; new bventr[2][0] = { {1042}, {1044} }; new bventl[2][0] = { {1043}, {1045} }; new bscoop[4][0] = { {1004}, {1005}, {1011}, {1012} }; new rscoop[13][0] = { {1006}, {1032}, {1033}, {1035}, {1038}, {1053}, {1054}, {1055}, {1061}, {1067}, {1068}, {1088}, {1091} }; new lskirt[21][0] = { {1007}, {1026}, {1031}, {1036}, {1039}, {1042}, {1047}, {1048}, {1056}, {1057}, {1069}, {1070}, {1090}, {1093}, {1106}, {1108}, {1118}, {1119}, {1133}, {1122}, {1134} }; new rskirt[21][0] = { {1017}, {1027}, {1030}, {1040}, {1041}, {1051}, {1052}, {1062}, {1063}, {1071}, {1072}, {1094}, {1095}, {1099}, {1101}, {1102}, {1107}, {1120}, {1121}, {1124}, {1137} }; new hydraulics[1][0] = { {1087} }; new base[1][0] = { {1086} }; new rbbars[2][0] = { {1109}, {1110} }; new fbbars[2][0] = { {1115}, {1116} }; new wheels[17][0] = { {1025}, {1073}, {1074}, {1075}, {1076}, {1077}, {1078}, {1079}, {1080}, {1081}, {1082}, {1083}, {1084}, {1085}, {1096}, {1097}, {1098} }; new lights[2][0] = { {1013}, {1024} }; forward Tunen(vehicleid); /**/ #define FILTERSCRIPT #if defined FILTERSCRIPT public OnFilterScriptInit() { if(!dini_Exists("PersonalCars/cars.cfg")){ dini_Create("PersonalCars/cars.cfg");} new loader[128]; for(new i = 0;i<MAX_BUY_V;i++) { format(loader,sizeof(loader),"veh_model_%d",i); VehicleSystem[i][model] = dini_Int("PersonalCars/cars.cfg",loader); format(loader,sizeof(loader),"veh_owned_%d",i); VehicleSystem[i][owned] = dini_Int("PersonalCars/cars.cfg",loader); format(loader,sizeof(loader),"veh_cLock_%d",i); VehicleSystem[i][cLock] = dini_Int("PersonalCars/cars.cfg",loader); format(loader,sizeof(loader),"veh_owner_%d",i); strmid(VehicleSystem[i][owner],dini_Get("PersonalCars/cars.cfg",loader),0,128,128); format(loader,sizeof(loader),"veh_x_%d",i); VehicleSystem[i][x] = dini_Float("PersonalCars/cars.cfg",loader); format(loader,sizeof(loader),"veh_y_%d",i); VehicleSystem[i][y] = dini_Float("PersonalCars/cars.cfg",loader); format(loader,sizeof(loader),"veh_z_%d",i); VehicleSystem[i][z] = dini_Float("PersonalCars/cars.cfg",loader); format(loader,sizeof(loader),"veh_Farbe1_%d",i); VehicleSystem[i][Farbe1] = dini_Int("PersonalCars/cars.cfg",loader); format(loader,sizeof(loader),"veh_Farbe2_%d",i); VehicleSystem[i][Farbe2] = dini_Int("PersonalCars/cars.cfg",loader); format(loader,sizeof(loader),"veh_a_%d",i); VehicleSystem[i][a] = dini_Float("PersonalCars/cars.cfg",loader); format(loader,sizeof(loader),"veh_owner_%d",i); strmid(VehicleSystem[i][owner],dini_Get("PersonalCars/cars.cfg",loader),0,128,128); format(loader,sizeof(loader),"veh_preis_%d",i); VehicleSystem[i][preis] = dini_Int("PersonalCars/cars.cfg",loader); // format(loader,sizeof(loader),"veh_mod1_%d",i); VehicleSystem[i][mod1] = dini_Int("PersonalCars/cars.cfg",loader); format(loader,sizeof(loader),"veh_mod2_%d",i); VehicleSystem[i][mod2] = dini_Int("PersonalCars/cars.cfg",loader); format(loader,sizeof(loader),"veh_mod3_%d",i); VehicleSystem[i][mod3] = dini_Int("PersonalCars/cars.cfg",loader); format(loader,sizeof(loader),"veh_mod4_%d",i); VehicleSystem[i][mod4] = dini_Int("PersonalCars/cars.cfg",loader); format(loader,sizeof(loader),"veh_mod5_%d",i); VehicleSystem[i][mod5] = dini_Int("PersonalCars/cars.cfg",loader); format(loader,sizeof(loader),"veh_mod6_%d",i); VehicleSystem[i][mod6] = dini_Int("PersonalCars/cars.cfg",loader); format(loader,sizeof(loader),"veh_mod7_%d",i); VehicleSystem[i][mod7] = dini_Int("PersonalCars/cars.cfg",loader); format(loader,sizeof(loader),"veh_mod8_%d",i); VehicleSystem[i][mod8] = dini_Int("PersonalCars/cars.cfg",loader); format(loader,sizeof(loader),"veh_mod9_%d",i); VehicleSystem[i][mod9] = dini_Int("PersonalCars/cars.cfg",loader); format(loader,sizeof(loader),"veh_mod10_%d",i); VehicleSystem[i][mod10] = dini_Int("PersonalCars/cars.cfg",loader); format(loader,sizeof(loader),"veh_mod11_%d",i); VehicleSystem[i][mod11] = dini_Int("PersonalCars/cars.cfg",loader); format(loader,sizeof(loader),"veh_mod12_%d",i); VehicleSystem[i][mod12] = dini_Int("PersonalCars/cars.cfg",loader); format(loader,sizeof(loader),"veh_mod13_%d",i); VehicleSystem[i][mod13] = dini_Int("PersonalCars/cars.cfg",loader); format(loader,sizeof(loader),"veh_mod14_%d",i); VehicleSystem[i][mod14] = dini_Int("PersonalCars/cars.cfg",loader); format(loader,sizeof(loader),"veh_mod15_%d",i); VehicleSystem[i][mod15] = dini_Int("PersonalCars/cars.cfg",loader); format(loader,sizeof(loader),"veh_mod16_%d",i); VehicleSystem[i][mod16] = dini_Int("PersonalCars/cars.cfg",loader); format(loader,sizeof(loader),"veh_mod17_%d",i); VehicleSystem[i][mod17] = dini_Int("PersonalCars/cars.cfg",loader); // format(loader,sizeof(loader),"veh_paint_%d",i); VehicleSystem[i][paintjob] = dini_Int("PersonalCars/cars.cfg",loader); new car = CreateVehicle(VehicleSystem[i][model],VehicleSystem[i][x],VehicleSystem[i][y],VehicleSystem[i][z],VehicleSystem[i][a],VehicleSystem[i][Farbe1],VehicleSystem[i][Farbe2],600000); // if(VehicleSystem[i][model]!=0){ created++; Tunen(car); IDIS[car] = created; } } for(new c = 0; c < MAX_VEHICLES; c++) { if (VehicleSystem[c][owned]==1) { format(TextCar,sizeof(TextCar),"{00FFEE}%s{FFFFFF} kocsija",VehicleSystem[GetCreatorID(c)][owner]); TextUpCar[c] = Create3DTextLabel(TextCar, 0xFFFFFFAA ,0,0,0,20.0,0); Attach3DTextLabelToVehicle(TextUpCar[c],c,0.0,0.0,0.0); SetVehicleNumberPlate(c, VehicleSystem[GetCreatorID(c)][owner]); } else if(VehicleSystem[c][owned]==0) { format(TextCar,sizeof(TextCar),"Ez a kocsi eladó, ára: %d",VehicleSystem[GetCreatorID(c)][preis]); TextUpCar[c] = Create3DTextLabel(TextCar, 0xFFFFFFAA ,0,0,0,20.0,0); Attach3DTextLabelToVehicle(TextUpCar[c],c,0.0,0.0,0.0); } } return 1; } public OnFilterScriptExit() { return 1; } #else main() { } #endif public OnGameModeInit() { return 1; } public OnGameModeExit() { return 1; } public OnPlayerRequestClass(playerid, classid) { return 1; } public OnPlayerRequestSpawn(playerid) { return 1; } public OnPlayerConnect(playerid) { if(!dini_Exists(PFile(playerid))) { dini_Create(PFile(playerid)); dini_IntSet(PFile(playerid),"HaveCar",0); } return 1; } public OnPlayerDisconnect(playerid, reason) { return 1; } public OnPlayerSpawn(playerid) { AntiDeAMX(); return 1; } public OnPlayerDeath(playerid, killerid, reason) { return 1; } public OnVehicleSpawn(vehicleid) { return 1; } public OnVehicleDeath(vehicleid, killerid) { if(GetCreatorID(vehicleid)!=0) { new create = GetCreatorID(vehicleid); DestroyVehicle(vehicleid); new CAR = CreateVehicle(VehicleSystem[create][model],VehicleSystem[create][x],VehicleSystem[create][y],VehicleSystem[create][z],VehicleSystem[create][a],VehicleSystem[create][Farbe1],VehicleSystem[create][Farbe2],600000); SetVehicleNumberPlate(vehicleid, VehicleSystem[GetCreatorID(vehicleid)][owner]); Tunen(CAR); } return 1; } public OnPlayerText(playerid, text[]) { return 1; } public OnPlayerCommandText(playerid, cmdtext[]) { new cmd[128],tmp[128],idx; cmd = strtok(cmdtext,idx); new string[256]; new vehicleid = GetPlayerVehicleID(playerid); new giveplayer[MAX_PLAYER_NAME]; new sendername[MAX_PLAYER_NAME]; new giveplayerid; if(strcmp(cmd, "/kocsi", true) == 0) { if(IsPlayerConnected(playerid)) { new x_nr[64]; x_nr = strtok(cmdtext, idx); if(!strlen(x_nr)) { SendClientMessage(playerid, COLOR_GREY, "Használat: /kocsi utasítás"); SendClientMessage(playerid, COLOR_WHITE, "park, bezar, kinyit, pozicio"); return 1; } if(strcmp(x_nr,"bezar",true) == 0) { new keycar = (dini_Int(PFile(playerid),"HaveCar")); new personalcar = (dini_Int(PFile(playerid),"CarID")); if(keycar == 1) { new locked[256]; locked = strtok(cmdtext, idx); if (VehicleSystem[GetCreatorID(personalcar)][cLock]==1) { for(new i = 0; i < MAX_PLAYERS; i++) { if (IsPlayerConnected(i)) { SetVehicleParamsForPlayer(personalcar,i,0,1); } } format(string, sizeof(string), "~w~Kocsi~n~~g~Zarva"); GameTextForPlayer(playerid, string, 4000, 3); VehicleSystem[GetCreatorID(personalcar)][cLock]=0; GetPlayerName(playerid, sendername, sizeof(sendername)); format(string,sizeof(string), "* %s A kocsi zárva!", sendername); ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE); SaveTool(); return 1; } } } else if(strcmp(x_nr,"kinyit",true) == 0) { new keycar = (dini_Int(PFile(playerid),"HaveCar")); new personalcar = (dini_Int(PFile(playerid),"CarID")); if(keycar == 1) { new locked[256]; locked = strtok(cmdtext, idx); if (VehicleSystem[GetCreatorID(vehicleid)][cLock]==0) { for(new i = 0; i < MAX_PLAYERS; i++) { if (IsPlayerConnected(i)) { SetVehicleParamsForPlayer(personalcar,i,0,0); } } format(string, sizeof(string), "~w~Kocsi~n~~g~Kinyitva"); GameTextForPlayer(playerid, string, 4000, 3); GetPlayerName(playerid, sendername, sizeof(sendername)); format(string,sizeof(string), "* %s Kocsi kinyitva!", sendername); ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE); VehicleSystem[GetCreatorID(personalcar)][cLock]=1; SaveTool(); return 1; } } } else if(strcmp(x_nr,"park",true) == 0) { if(!IsPlayerInAnyVehicle(playerid)){return 1;} if(GetCreatorID(vehicleid)!=0) { if (strmatch(VehicleSystem[GetCreatorID(vehicleid)][owner],Spielername(playerid))) { new Float:vx,Float:vy,Float:vz,Float:va; GetVehiclePos(GetPlayerVehicleID(playerid),vx,vy,vz); GetVehicleZAngle(GetPlayerVehicleID(playerid),va); VehicleSystem[GetCreatorID(vehicleid)][x]=vx; VehicleSystem[GetCreatorID(vehicleid)][y]=vy; VehicleSystem[GetCreatorID(vehicleid)][z]=vz; VehicleSystem[GetCreatorID(vehicleid)][a]=va; SetVehicleHealth(GetPlayerVehicleID(playerid),100.0); SendClientMessage(playerid,WHITE,"Sikeresen leparkoltad a kocsid!"); SendClientMessage(playerid,YELLOW,"Mostantól mindig itt találod!"); SaveTool(); } } return 1; } else if(strcmp(x_nr,"pozicio",true) == 0) { if(!IsPlayerConnected(playerid)) { return 1; } new Float:xxx,Float:yyy,Float:zzz; new keycar = (dini_Int(PFile(playerid),"HaveCar")); new personalcar = (dini_Int(PFile(playerid),"CarID")); if(keycar == 0) { GameTextForPlayer(playerid, "~w~A kocsid bejelolve", 2500, 3); return 1; } SendClientMessage(playerid,COLOR_WHITE,"Kocsid bejelőlve!"); GetVehiclePos(personalcar, xxx, yyy, zzz); SetPlayerCheckpoint(playerid, xxx, yyy, zzz, 6); return 1; } } return 1; } if (strcmp(cmd, "/removeveh", true) ==0 ) { if(!IsPlayerInAnyVehicle(playerid)){return 1;} if(!IsPlayerAdmin(playerid)){return 1;} VehicleSystem[GetCreatorID(vehicleid)][model]=0; VehicleSystem[GetCreatorID(vehicleid)][owned]=0; VehicleSystem[GetCreatorID(vehicleid)][x]=(0.0); VehicleSystem[GetCreatorID(vehicleid)][y]=(0.0); VehicleSystem[GetCreatorID(vehicleid)][z]=(0.0); VehicleSystem[GetCreatorID(vehicleid)][Farbe1]=0; VehicleSystem[GetCreatorID(vehicleid)][Farbe2]=0; VehicleSystem[GetCreatorID(vehicleid)][preis]=0; VehicleSystem[GetCreatorID(vehicleid)][mod1]=0; VehicleSystem[GetCreatorID(vehicleid)][mod2]=0; VehicleSystem[GetCreatorID(vehicleid)][mod3]=0; VehicleSystem[GetCreatorID(vehicleid)][mod4]=0; VehicleSystem[GetCreatorID(vehicleid)][mod5]=0; VehicleSystem[GetCreatorID(vehicleid)][mod6]=0; VehicleSystem[GetCreatorID(vehicleid)][mod7]=0; VehicleSystem[GetCreatorID(vehicleid)][mod8]=0; VehicleSystem[GetCreatorID(vehicleid)][mod9]=0; VehicleSystem[GetCreatorID(vehicleid)][mod10]=0; VehicleSystem[GetCreatorID(vehicleid)][mod11]=0; VehicleSystem[GetCreatorID(vehicleid)][mod12]=0; VehicleSystem[GetCreatorID(vehicleid)][mod13]=0; VehicleSystem[GetCreatorID(vehicleid)][mod14]=0; VehicleSystem[GetCreatorID(vehicleid)][mod15]=0; VehicleSystem[GetCreatorID(vehicleid)][mod16]=0; VehicleSystem[GetCreatorID(vehicleid)][mod17]=0; VehicleSystem[GetCreatorID(vehicleid)][paintjob]=0; VehicleSystem[GetCreatorID(vehicleid)][cLock]=1; strmid(VehicleSystem[GetCreatorID(vehicleid)][owner],"",0,128,128); IDIS[vehicleid]=0; DestroyVehicle(vehicleid); SaveTool(); return 1; } if (strcmp(cmd, "/newbuycar", true) ==0 ) { if(!IsPlayerAdmin(playerid)){return 1;} tmp = strtok(cmdtext,idx); if(!strlen(tmp)){return 1;} new vehiclemodel = strval(tmp); tmp = strtok(cmdtext,idx); if(!strlen(tmp)){return 1;} new color1 = strval(tmp); tmp = strtok(cmdtext,idx); if(!strlen(tmp)){return 1;} new color2 = strval(tmp); tmp = strtok(cmdtext,idx); if(!strlen(tmp)){return 1;} new price = strval(tmp); new Float:px,Float:py,Float:pz,Float:pa; GetPlayerPos(playerid,px,py,pz); GetPlayerFacingAngle(playerid,pa); created++; VehicleSystem[created][model]=vehiclemodel; VehicleSystem[created][x]=px; VehicleSystem[created][y]=py; VehicleSystem[created][z]=pz; VehicleSystem[created][a]=pa; VehicleSystem[created][Farbe1]=color1; VehicleSystem[created][Farbe2]=color2; VehicleSystem[created][preis]=price; VehicleSystem[created][owned]=0; VehicleSystem[created][cLock]=1; strmid(VehicleSystem[created][owner],"dealercar",0,128,128); new ccar = CreateVehicle(VehicleSystem[created][model],VehicleSystem[created][x],VehicleSystem[created][y],VehicleSystem[created][z],VehicleSystem[created][a],VehicleSystem[created][Farbe1],VehicleSystem[created][Farbe2],600000); IDIS[ccar]=created; SaveTool(); return 1; } if (strcmp(cmd, "/kocsivesz", true) ==0 ) { /*if(dini_Int(PFile(playerid),"HaveCar")== 1) return SendClientMessage(playerid,ORANGE,"[ERROR]You already have a Car");*/ /*if(dini_Int(PFile(playerid),"HaveCar")== 1) { } else { SendClientMessage(playerid, ORANGE,"[ERROR]You already have a Car"); return 1; }*/ new HaveCar = (dini_Int(PFile(playerid),"HaveCar")); if(!IsPlayerInAnyVehicle(playerid)){return 1;} if(GetCreatorID(vehicleid)!=0) { if(HaveCar == 0) { if (strmatch(VehicleSystem[GetCreatorID(vehicleid)][owner],Spielername(playerid))){SendClientMessage(playerid,WHITE,"!");return 1;} if (strmatch(VehicleSystem[GetCreatorID(vehicleid)][owner],"dealercar")) { if(VehicleSystem[GetCreatorID(vehicleid)][preis] < GetPlayerMoney(playerid)) { strmid(VehicleSystem[GetCreatorID(vehicleid)][owner],Spielername(playerid),0,128,128); VehicleSystem[GetCreatorID(vehicleid)][owned]=1; SetVehicleNumberPlate(vehicleid, VehicleSystem[GetCreatorID(vehicleid)][owner]); GivePlayerMoney(playerid,-VehicleSystem[GetCreatorID(vehicleid)][preis]); SendClientMessage(playerid,YELLOW,"Sikeresen megvásároltad!"); SendClientMessage(playerid,WHITE," Kocsi parancsokért /kocsi"); TogglePlayerControllable(playerid,1); Delete3DTextLabel(TextUpCar[vehicleid]); SaveTool(); } else { SendClientMessage(playerid,WHITE,"Nincs elég pénzed"); } } else { SendClientMessage(playerid,WHITE,"Ez a kocsi nem eladó!"); } } else { SendClientMessage(playerid, ORANGE,"Neked már van kocsid"); } } else { SendClientMessage(playerid,WHITE,"Ez nem eladó!"); } if(!dini_Exists(PFile(playerid))) { dini_Create(PFile(playerid)); dini_IntSet(PFile(playerid),"HaveCar",1); dini_IntSet(PFile(playerid),"CarID",vehicleid); } else if(dini_Exists(PFile(playerid))) { dini_IntSet(PFile(playerid),"HaveCar",1); dini_IntSet(PFile(playerid),"CarID",vehicleid); } return 1; } if (strcmp(cmd, "/elad", true) ==0) { if(!IsPlayerInAnyVehicle(playerid)){return 1;} if(GetCreatorID(vehicleid)!=0) { if (IsPlayerAdmin(playerid)) { tmp = strtok(cmdtext,idx); if(!strlen(tmp)){SendClientMessage(playerid,WHITE,"/elad ár");return 1;} new Float:vx,Float:vy,Float:vz,Float:va; GetVehiclePos(GetPlayerVehicleID(playerid),vx,vy,vz); GetVehicleZAngle(GetPlayerVehicleID(playerid),va); VehicleSystem[GetCreatorID(vehicleid)][x]=vx; VehicleSystem[GetCreatorID(vehicleid)][y]=vy; VehicleSystem[GetCreatorID(vehicleid)][z]=vz; VehicleSystem[GetCreatorID(vehicleid)][a]=va; VehicleSystem[GetCreatorID(vehicleid)][preis]=strval(tmp); VehicleSystem[GetCreatorID(vehicleid)][owned]=0; VehicleSystem[GetCreatorID(vehicleid)][cLock]=1; strmid(VehicleSystem[GetCreatorID(vehicleid)][owner],"dealercar",0,128,128); SendClientMessage(playerid,WHITE,"Ez a kocsi újra eladó!"); SaveTool(); Delete3DTextLabel(TextUpCar[vehicleid]); format(TextCar,sizeof(TextCar),"Ez a kocsi eladó: %d",VehicleSystem[GetCreatorID(vehicleid)][preis]); TextUpCar[vehicleid] = Create3DTextLabel(TextCar, 0xFFFFFFAA ,0,0,0,20.0,0); Attach3DTextLabelToVehicle(TextUpCar[vehicleid],vehicleid,0.0,0.0,0.0); } else { SendClientMessage(playerid,WHITE,"INFO: Nem vagy admin!"); } } return 1; } if (strcmp(cmd, "/apark", true) ==0 ) { if(!IsPlayerInAnyVehicle(playerid)){return 1;} if(!IsPlayerAdmin(playerid)){return 1;} if(GetCreatorID(vehicleid)!=0) { new Float:vx,Float:vy,Float:vz,Float:va; GetVehiclePos(GetPlayerVehicleID(playerid),vx,vy,vz); GetVehicleZAngle(GetPlayerVehicleID(playerid),va); VehicleSystem[GetCreatorID(vehicleid)][x]=vx; VehicleSystem[GetCreatorID(vehicleid)][y]=vy; VehicleSystem[GetCreatorID(vehicleid)][z]=vz; VehicleSystem[GetCreatorID(vehicleid)][a]=va; SendClientMessage(playerid,WHITE,"Admin Park!"); SaveTool(); } else { SendClientMessage(playerid,WHITE," Te ezt nem teheted meg!"); } return 1; } if (strcmp(cmd, "/exitcar", true) ==0 ) { if(!IsPlayerInAnyVehicle(playerid)){return 1;} if(GetCreatorID(vehicleid)!=0) { TogglePlayerControllable(playerid, 1); RemovePlayerFromVehicle(playerid); } return 1; } if (strcmp(cmd, "/deleteowner", true)==0) { if ((IsPlayerAdmin(playerid))) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, WHITE, "Használat: /deleteowner ID"); return 1; } GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); format(string,sizeof(string),"Users/%s.ini",tmp); dini_Remove(string); SendClientMessage(playerid, ORANGE, "Tulajdonos Törölve"); } return 1; } return 0; } stock Spielername(playerid) { new spname[128]; GetPlayerName(playerid,spname,sizeof(spname)); return spname; } public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger) { new personalcar = (dini_Int(PFile(playerid),"CarID")); for(new i=0; i < MAX_PLAYERS; i++) { if(GetCreatorID(vehicleid)!=0) { if (personalcar == vehicleid) { SetVehicleParamsForPlayer(vehicleid,i,0,0); } else { if (VehicleSystem[vehicleid][cLock]==0) { SetVehicleParamsForPlayer(vehicleid,i,0,1); } else if (VehicleSystem[vehicleid][cLock]==1) { SetVehicleParamsForPlayer(vehicleid,i,0,0); } } } } return 1; } public OnPlayerExitVehicle(playerid, vehicleid) { for(new c = 0; c < MAX_VEHICLES; c++) { if(GetCreatorID(vehicleid)!=0) { if (VehicleSystem[c][owned]==1) { format(TextCar,sizeof(TextCar),"{00FFEE}%s{FFFFFF}'s Kocsija",VehicleSystem[GetCreatorID(vehicleid)][owner]); TextUpCar[vehicleid] = Create3DTextLabel(TextCar, 0xFFFFFFAA ,0,0,0,20.0,0); Attach3DTextLabelToVehicle(TextUpCar[vehicleid],vehicleid,0.0,0.0,0.0); SetVehicleNumberPlate(vehicleid, VehicleSystem[GetCreatorID(vehicleid)][owner]); } else if (VehicleSystem[c][owned]==0) { format(TextCar,sizeof(TextCar),"Ez a kocsi leadó ennyiért: %d",VehicleSystem[GetCreatorID(c)][preis]); TextUpCar[c] = Create3DTextLabel(TextCar, 0xFFFFFFAA ,0,0,0,20.0,0); Attach3DTextLabelToVehicle(TextUpCar[c],c,0.0,0.0,0.0); SetVehicleNumberPlate(vehicleid, VehicleSystem[GetCreatorID(vehicleid)][owner]); } } } return 1; } public OnPlayerStateChange(playerid, newstate, oldstate) { if(newstate == 2) { new vehicleid = GetPlayerVehicleID(playerid); if(GetCreatorID(vehicleid)!=0) { Tunen(vehicleid); if ((strmatch(VehicleSystem[GetCreatorID(vehicleid)][owner],Spielername(playerid)))) { SendClientMessage(playerid,GREEN," /kocsi a kocsi parancsaiért"); for(new c = 0; c < MAX_VEHICLES; c++) { Delete3DTextLabel(TextUpCar[c]); } } else if(strmatch(VehicleSystem[GetCreatorID(vehicleid)][owner],"dealercar")) { if(!IsPlayerAdmin(playerid)){ TogglePlayerControllable(playerid,0);} new fffx[128]; format(fffx,sizeof(fffx),"Ez a kocsi eladó: %d$",VehicleSystem[GetCreatorID(vehicleid)][preis]); SendClientMessage(playerid,WHITE,fffx); SendClientMessage(playerid,YELLOW,"/Kocsivesz"); } else { TogglePlayerControllable(playerid,0); TogglePlayerControllable(playerid,1); new ex[128]; format(ex,sizeof(ex),"Ez a %s kocsija",VehicleSystem[GetCreatorID(vehicleid)][owner]); SendClientMessage(playerid,YELLOW,ex); for(new c = 0; c < MAX_VEHICLES; c++) { Delete3DTextLabel(TextUpCar[c]); } } } } return 1; } public ProxDetector(Float:radi, playerid, string[],col1,col2,col3,col4,col5) { if(IsPlayerConnected(playerid)) { new Float:posx, Float:posy, Float:posz; new Float:oldposx, Float:oldposy, Float:oldposz; new Float:tempposx, Float:tempposy, Float:tempposz; GetPlayerPos(playerid, oldposx, oldposy, oldposz); //radi = 2.0; //Trigger Radius for(new i = 0; i < MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { GetPlayerPos(i, posx, posy, posz); tempposx = (oldposx -posx); tempposy = (oldposy -posy); tempposz = (oldposz -posz); //printf("DEBUG: X:%f Y:%f Z:%f",posx,posy,posz); if (((tempposx < radi/16) && (tempposx > -radi/16)) && ((tempposy < radi/16) && (tempposy > -radi/16)) && ((tempposz < radi/16) && (tempposz > -radi/16))) { SendClientMessage(i, col1, string); } else if (((tempposx < radi/8) && (tempposx > -radi/8)) && ((tempposy < radi/8) && (tempposy > -radi/8)) && ((tempposz < radi/8) && (tempposz > -radi/8))) { SendClientMessage(i, col2, string); } else if (((tempposx < radi/4) && (tempposx > -radi/4)) && ((tempposy < radi/4) && (tempposy > -radi/4)) && ((tempposz < radi/4) && (tempposz > -radi/4))) { SendClientMessage(i, col3, string); } else if (((tempposx < radi/2) && (tempposx > -radi/2)) && ((tempposy < radi/2) && (tempposy > -radi/2)) && ((tempposz < radi/2) && (tempposz > -radi/2))) { SendClientMessage(i, col4, string); } else if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi))) { SendClientMessage(i, col5, string); } } else { SendClientMessage(i, col1, string); } } }//not connected return 1; } public OnPlayerEnterCheckpoint(playerid) { return 1; } public OnPlayerLeaveCheckpoint(playerid) { return 1; } public OnPlayerEnterRaceCheckpoint(playerid) { return 1; } public OnPlayerLeaveRaceCheckpoint(playerid) { return 1; } public OnRconCommand(cmd[]) { return 1; } public OnObjectMoved(objectid) { return 1; } public OnPlayerObjectMoved(playerid, objectid) { return 1; } public OnPlayerPickUpPickup(playerid, pickupid) { return 1; } public OnPlayerSelectedMenuRow(playerid, row) { return 1; } public OnPlayerExitedMenu(playerid) { return 1; } stock GetCreatorID(vehicleid) { return IDIS[vehicleid]; } stock strmatch(const String1[], const String2[]) { if ((strcmp(String1, String2, true, strlen(String2)) == 0) && (strlen(String2) == strlen(String1))) { return true; } else { return false; } } /* TUNING */ InitComponents(componentid) { new i; for(i=0; i<20; i++) { if(spoiler[i][0]==componentid) { return 1; } } for(i=0; i<3; i++) { if(nitro[i][0]==componentid) { return 2; } } for(i=0; i<23; i++) { if(fbumper[i][0]==componentid) { return 3; } } for(i=0; i<22; i++) { if(rbumper[i][0]==componentid) { return 4; } } for(i=0; i<28; i++) { if(exhaust[i][0]==componentid) { return 5; } } for(i=0; i<2; i++) { if(bventr[i][0]==componentid) { return 6; } } for(i=0; i<2; i++) { if(bventl[i][0]==componentid) { return 7; } } for(i=0; i<4; i++) { if(bscoop[i][0]==componentid) { return 8; } } for(i=0; i<13; i++) { if(rscoop[i][0]==componentid) { return 9; } } for(i=0; i<21; i++) { if(lskirt[i][0]==componentid) { return 10; } } for(i=0; i<21; i++) { if(rskirt[i][0]==componentid) { return 11; } } if(hydraulics[0][0]==componentid) { return 12; } if(base[0][0]==componentid) { return 13; } for(i=0; i<2; i++) { if(rbbars[i][0]==componentid) { return 14; } } for(i=0; i<2; i++) { if(fbbars[i][0]==componentid) { return 15; } } for(i=0; i<17; i++) { if(wheels[i][0]==componentid) { return 16; } } for(i=0; i<2; i++) { if(lights[i][0]==componentid) { return 17; } } return 0; } public OnVehiclePaintjob(playerid,vehicleid, paintjobid) { if(GetCreatorID(vehicleid)!=0) { VehicleSystem[GetCreatorID(vehicleid)][paintjob] =paintjobid; } return 1; } public OnVehicleRespray(playerid,vehicleid, color1, color2) { if(GetCreatorID(vehicleid)!=0) { VehicleSystem[GetCreatorID(vehicleid)][Farbe1] =color1; VehicleSystem[GetCreatorID(vehicleid)][Farbe2] =color2; } return 1; } public OnVehicleMod(playerid,vehicleid,componentid) { if(GetCreatorID(vehicleid)!=0) { new Varz=InitComponents(componentid); switch (Varz) { case 1: { VehicleSystem[GetCreatorID(vehicleid)][mod1] = componentid;} case 2: { VehicleSystem[GetCreatorID(vehicleid)][mod2] = componentid; } case 3: { VehicleSystem[GetCreatorID(vehicleid)][mod3] = componentid; } case 4: { VehicleSystem[GetCreatorID(vehicleid)][mod4] = componentid; } case 5: { VehicleSystem[GetCreatorID(vehicleid)][mod5] = componentid; } case 6: { VehicleSystem[GetCreatorID(vehicleid)][mod6] = componentid; } case 7: { VehicleSystem[GetCreatorID(vehicleid)][mod7] = componentid; } case 8: { VehicleSystem[GetCreatorID(vehicleid)][mod8] = componentid;} case 9: { VehicleSystem[GetCreatorID(vehicleid)][mod9] = componentid; } case 10: { VehicleSystem[GetCreatorID(vehicleid)][mod10] = componentid; } case 11: { VehicleSystem[GetCreatorID(vehicleid)][mod11] = componentid; } case 12: { VehicleSystem[GetCreatorID(vehicleid)][mod12] = componentid; } case 13: { VehicleSystem[GetCreatorID(vehicleid)][mod13] = componentid; } case 14: { VehicleSystem[GetCreatorID(vehicleid)][mod14] = componentid; } case 15: { VehicleSystem[GetCreatorID(vehicleid)][mod15] = componentid; } case 16: { VehicleSystem[GetCreatorID(vehicleid)][mod16] = componentid; } case 17: { VehicleSystem[GetCreatorID(vehicleid)][mod17] = componentid; } } } printf("componentid Added: %d",componentid); return 1; } public Tunen(vehicleid) { if(GetCreatorID(vehicleid)!=0) { new tempmod; tempmod = VehicleSystem[GetCreatorID(vehicleid)][mod1]; if(tempmod!=0) { AddVehicleComponent(vehicleid,tempmod); } tempmod = VehicleSystem[GetCreatorID(vehicleid)][mod2]; if(tempmod!=0) { AddVehicleComponent(vehicleid,tempmod); } tempmod = VehicleSystem[GetCreatorID(vehicleid)][mod3]; if(tempmod!=0) { AddVehicleComponent(vehicleid,tempmod); } tempmod = VehicleSystem[GetCreatorID(vehicleid)][mod4]; if(tempmod!=0) { AddVehicleComponent(vehicleid,tempmod); } tempmod = VehicleSystem[GetCreatorID(vehicleid)][mod5]; if(tempmod!=0) { AddVehicleComponent(vehicleid,tempmod); } tempmod = VehicleSystem[GetCreatorID(vehicleid)][mod6]; if(tempmod!=0) { AddVehicleComponent(vehicleid,tempmod); } tempmod = VehicleSystem[GetCreatorID(vehicleid)][mod7]; if(tempmod!=0) { AddVehicleComponent(vehicleid,tempmod); } tempmod = VehicleSystem[GetCreatorID(vehicleid)][mod8]; if(tempmod!=0) { AddVehicleComponent(vehicleid,tempmod); } tempmod = VehicleSystem[GetCreatorID(vehicleid)][mod9]; if(tempmod!=0) { AddVehicleComponent(vehicleid,tempmod); } tempmod = VehicleSystem[GetCreatorID(vehicleid)][mod10]; if(tempmod!=0) { AddVehicleComponent(vehicleid,tempmod); } tempmod = VehicleSystem[GetCreatorID(vehicleid)][mod11]; if(tempmod!=0) { AddVehicleComponent(vehicleid,tempmod); } tempmod = VehicleSystem[GetCreatorID(vehicleid)][mod12]; if(tempmod!=0) { AddVehicleComponent(vehicleid,tempmod); } tempmod = VehicleSystem[GetCreatorID(vehicleid)][mod13]; if(tempmod!=0) { AddVehicleComponent(vehicleid,tempmod); } tempmod = VehicleSystem[GetCreatorID(vehicleid)][mod14]; if(tempmod!=0) { AddVehicleComponent(vehicleid,tempmod); } tempmod = VehicleSystem[GetCreatorID(vehicleid)][mod15]; if(tempmod!=0) { AddVehicleComponent(vehicleid,tempmod); } tempmod = VehicleSystem[GetCreatorID(vehicleid)][mod16]; if(tempmod!=0) { AddVehicleComponent(vehicleid,tempmod); } tempmod = VehicleSystem[GetCreatorID(vehicleid)][mod17]; if(tempmod!=0) { AddVehicleComponent(vehicleid,tempmod); } tempmod = VehicleSystem[GetCreatorID(vehicleid)][paintjob]; if(tempmod!=0) { ChangeVehiclePaintjob(vehicleid,tempmod); } } return 1; } //STRTOK strtok(const string[], &index) { new length = strlen(string); while ((index < length) && (string[index] <= ' ')) { index++; } new offset = index; new result[20]; while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1))) { result[index - offset] = string[index]; index++; } result[index - offset] = EOS; return result; } public SaveTool() { new count; new saver[128]; fremove("PersonalCars/cars.cfg"); dini_Create("PersonalCars/cars.cfg"); for(new i = 0;i<MAX_BUY_V;i++) { if(VehicleSystem[i][model]!=0) { count++; format(saver,sizeof(saver),"veh_model_%d",count); dini_IntSet("PersonalCars/cars.cfg",saver,VehicleSystem[i][model]); format(saver,sizeof(saver),"veh_owned_%d",count); dini_IntSet("PersonalCars/cars.cfg",saver,VehicleSystem[i][owned]); format(saver,sizeof(saver),"veh_cLock_%d",count); dini_IntSet("PersonalCars/cars.cfg",saver,VehicleSystem[i][cLock]); format(saver,sizeof(saver),"veh_x_%d",count); dini_FloatSet("PersonalCars/cars.cfg",saver,VehicleSystem[i][x]); format(saver,sizeof(saver),"veh_y_%d",count); dini_FloatSet("PersonalCars/cars.cfg",saver,VehicleSystem[i][y]); format(saver,sizeof(saver),"veh_z_%d",count); dini_FloatSet("PersonalCars/cars.cfg",saver,VehicleSystem[i][z]); format(saver,sizeof(saver),"veh_a_%d",count); dini_FloatSet("PersonalCars/cars.cfg",saver,VehicleSystem[i][a]); format(saver,sizeof(saver),"veh_Farbe1_%d",count); dini_IntSet("PersonalCars/cars.cfg",saver,VehicleSystem[i][Farbe1]); format(saver,sizeof(saver),"veh_Farbe2_%d",count); dini_IntSet("PersonalCars/cars.cfg",saver,VehicleSystem[i][Farbe2]); format(saver,sizeof(saver),"veh_owner_%d",count); dini_Set("PersonalCars/cars.cfg",saver,VehicleSystem[i][owner]); format(saver,sizeof(saver),"veh_preis_%d",count); dini_IntSet("PersonalCars/cars.cfg",saver,VehicleSystem[i][preis]); // format(saver,sizeof(saver),"veh_mod1_%d",count); dini_IntSet("PersonalCars/cars.cfg",saver,VehicleSystem[i][mod1]); format(saver,sizeof(saver),"veh_mod2_%d",count); dini_IntSet("PersonalCars/cars.cfg",saver,VehicleSystem[i][mod2]); format(saver,sizeof(saver),"veh_mod3_%d",count); dini_IntSet("PersonalCars/cars.cfg",saver,VehicleSystem[i][mod3]); format(saver,sizeof(saver),"veh_mod4_%d",count); dini_IntSet("PersonalCars/cars.cfg",saver,VehicleSystem[i][mod4]); format(saver,sizeof(saver),"veh_mod5_%d",count); dini_IntSet("PersonalCars/cars.cfg",saver,VehicleSystem[i][mod5]); format(saver,sizeof(saver),"veh_mod6_%d",count); dini_IntSet("PersonalCars/cars.cfg",saver,VehicleSystem[i][mod6]); format(saver,sizeof(saver),"veh_mod7_%d",count); dini_IntSet("PersonalCars/cars.cfg",saver,VehicleSystem[i][mod7]); format(saver,sizeof(saver),"veh_mod8_%d",count); dini_IntSet("PersonalCars/cars.cfg",saver,VehicleSystem[i][mod8]); format(saver,sizeof(saver),"veh_mod9_%d",count); dini_IntSet("PersonalCars/cars.cfg",saver,VehicleSystem[i][mod9]); format(saver,sizeof(saver),"veh_mod10_%d",count); dini_IntSet("PersonalCars/cars.cfg",saver,VehicleSystem[i][mod10]); format(saver,sizeof(saver),"veh_mod11_%d",count); dini_IntSet("PersonalCars/cars.cfg",saver,VehicleSystem[i][mod11]); format(saver,sizeof(saver),"veh_mod12_%d",count); dini_IntSet("PersonalCars/cars.cfg",saver,VehicleSystem[i][mod12]); format(saver,sizeof(saver),"veh_mod13_%d",count); dini_IntSet("PersonalCars/cars.cfg",saver,VehicleSystem[i][mod13]); format(saver,sizeof(saver),"veh_mod14_%d",count); dini_IntSet("PersonalCars/cars.cfg",saver,VehicleSystem[i][mod14]); format(saver,sizeof(saver),"veh_mod15_%d",count); dini_IntSet("PersonalCars/cars.cfg",saver,VehicleSystem[i][mod15]); format(saver,sizeof(saver),"veh_mod16_%d",count); dini_IntSet("PersonalCars/cars.cfg",saver,VehicleSystem[i][mod16]); format(saver,sizeof(saver),"veh_mod17_%d",count); dini_IntSet("PersonalCars/cars.cfg",saver,VehicleSystem[i][mod17]); // format(saver,sizeof(saver),"veh_paint_%d",count); dini_IntSet("PersonalCars/cars.cfg",saver,VehicleSystem[i][paintjob]); } } return 1; } stock Gn(playerid) { new pname[24]; GetPlayerName(playerid,pname,MAX_PLAYER_NAME); return pname; } stock PFile(playerid) { format(file,64,"PersonalCars/Users/%s.ini",Gn(playerid)); return file; } stock Pc(playerid) return dini_Int(PFile(playerid),"CarId"); public Carlabel(playerid) { new carid = GetPlayerVehicleID(playerid); if (VehicleSystem[carid][owned]==1) { Delete3DTextLabel(TextUpCar[carid]); format(TextCar,sizeof(TextCar),"{00FFEE}%s{FFFFFF} Kocsija",VehicleSystem[GetCreatorID(carid)][owner]); TextUpCar[carid] = Create3DTextLabel(TextCar, 0xFFFFFFAA ,0,0,0,20.0,0); Attach3DTextLabelToVehicle(TextUpCar[carid],carid,0.0,0.0,0.0); } else if(VehicleSystem[carid][owned]==0) { Delete3DTextLabel(TextUpCar[carid]); format(TextCar,sizeof(TextCar),"Ez a kocsi eladó ennyiért: %d",VehicleSystem[GetCreatorID(carid)][preis]); TextUpCar[carid] = Create3DTextLabel(TextCar, 0xFFFFFFAA ,0,0,0,20.0,0); Attach3DTextLabelToVehicle(TextUpCar[carid],carid,0.0,0.0,0.0); } return 1; } stock ini_GetKey( line[] ) { new keyRes[256]; keyRes[0] = 0; if ( strfind( line , "=" , true ) == -1 ) return keyRes; strmid( keyRes , line , 0 , strfind( line , "=" , true ) , sizeof( keyRes) ); return keyRes; } stock ini_GetValue( line[] ) { new valRes[256]; valRes[0]=0; if ( strfind( line , "=" , true ) == -1 ) return valRes; strmid( valRes , line , strfind( line , "=" , true )+1 , strlen( line ) , sizeof( valRes ) ); return valRes; } AntiDeAMX() { new antideamx[][] = { "Unarmed (Fist)", "Brass K" }; #pragma unused antideamx }