Jump to content

Problema spawnare vehicule.


xMariusNoDye
 Share

Recommended Posts

Username: xMariusNoDye
Problema întălnită: Spawnarea masinilor cumparate de la dealership
Detalii despre problemă: Cand imi cumpar o masina, si se spawneaza, nu mi-o arata la checkpoint-ul pus defapt, si nici daca dau /gotocar nu o gasesc.. trebuie sa dau eu /getcar
Ce ai încercat să faci înainte să postezi?: Sa caut coordonatele, poate este intr-un virtualworld, dar in zadar, nimic.
Cod sursă (recomandat pastebin.com) : Nu stiu exact ce ar trebui sa va dau.
Alte detalii: Un videoclip cu problema: 

 

Link to comment
Share on other sites

Acum 35 minute, Gabi23 a spus:

Dă-ne funcția Insertcar.

function InsertCars(playerid, model, price, dsstock) {
    new i = cache_insert_id();
    DSModels[dID] = i;
    DSModels[dModel] = model;
    DSModels[dPrice] = price;
    DSModels[dStock] = dsstock;    
    dsvehs ++;
    SelectedCar[playerid][dsvehs] = DSModels[dID];
    TotalDealerCars[playerid] = dsvehs;
    gString[0] = EOS;
    format(gString, sizeof(gString), "(/insertcar) {8E0000}(Admin Info): {FFFFFF}Admin %s a insearat un vehicul in dealership %s, price %s.", GetName(playerid), aVehicleNames[model-400], FormatNumbers(price));
    SendAdminMessage(COLOR_LGREEN, gString, 6);
    return true;
}

Link to comment
Share on other sites

Chiar acum, Gabi23 a spus:

Atunci vezi la buycar ce funcție ai să-ți insereze mașina.

YCMD:buycar(playerid, params[], help) {
    if(PlayerInfo[playerid][pLevel] < 3) return SCM(playerid, COLOR_GREY, "{008080}(Error): {FFFFFF}You don't have level 3!");
    if(InDealer[playerid] != 0) return 1;
    if(!PlayerToPoint(3,playerid,1487.0498,-2287.2930,13.7529)) return SCM(playerid, COLOR_GREY, "{008080}(Error): {FFFFFF}You are not at the DealerShip.");
    if(TestingModel[playerid] == 1) return true;
    LoadDsVehs(playerid);
    if(PlayerInfo[playerid][pWantedLevel] > 0) return SCM(playerid, -1, "{008080}(Error): {FFFFFF}You have wanted, you can't use this command.");
    TestingModel[playerid] = 0;
    DealerCarType[playerid] = 1;
    InDealer[playerid] = 1;
    TogglePlayerControllable(playerid, 0);
    SetPlayerVirtualWorld(playerid, playerid+1);
    SetPlayerInterior(playerid, 0);
    DealerID[playerid] = 1;
    DealerCarColor1[playerid] = 1;
    DealerCarColor2[playerid] = 1;
    DealerCar[playerid] = CreateVehicleEx(DSModels[DealerID[playerid]][dModel],1463.3318,-2299.0806,13.6845,281.2260,DealerCarColor1[playerid],DealerCarColor2[playerid], -1, 0);
    SetVehicleVirtualWorld(DealerCar[playerid],playerid+1);
    LinkVehicleToInterior(DealerCar[playerid], 0);
    PlayerTextDrawSetPreviewModel(playerid, DSTds[4], DSModels[DealerID[playerid]][dModel]);
    PlayerTextDrawShow(playerid, DSTds[4]);
    ShowDealershipTextdraws(playerid);
    SelectTextDraw(playerid, 0x15B864FF);
    ShowCamera(playerid);    
    return true;
}

Link to comment
Share on other sites

Chiar acum, Gabi23 a spus:

Dmn, e clar cu tine..

Dă-mi TD-urile pentru DS.

Uite float-urile, daca ai nevoie de ceva, m-am uitat sa vad daca seteaza masina intr-un virtualworld, si nu e..

new Float: DealerCarPos[34][4] = {
{1441.2734,-2224.8093,13.2740,179.4625},{1447.6174,-2225.2344,13.2740,180.0775},{1457.7729,-2225.1973,13.2740,178.9312},{1495.6588,-2211.5061,13.2757,178.8022},
{1505.4369,-2211.8225,13.2778,178.7448},{1512.1740,-2211.8308,13.2778,178.5274},{1518.5363,-2211.7400,13.2817,180.4461},{1529.4902,-2211.4417,13.2817,179.7449},
{1536.2568,-2211.5039,13.2817,180.0051},{1542.9261,-2211.6558,13.2817,181.0608},{1549.3169,-2211.5176,13.2817,179.4744},{1560.7589,-2237.7512,13.2744,91.2762},
{1560.3783,-2244.2268,13.2748,91.6340},{1560.4049,-2250.9280,13.2748,88.9586},{1560.2371,-2257.3584,13.2747,90.5259},{1560.6239,-2264.1594,13.2738,89.3386},
{1560.4745,-2328.5295,13.2759,89.5027},{1560.5192,-2321.9229,13.2758,91.2465},{1560.6782,-2315.3286,13.2749,89.1229},{1560.2701,-2308.4749,13.2726,90.8419},
{1560.3086,-2335.0269,13.2739,90.0393},{1552.8674,-2360.8315,13.2817,0.8747},{1546.1908,-2361.0525,13.2817,359.5896},{1539.5558,-2361.2266,13.2817,0.4531},
{1505.6609,-2361.1614,13.2778,1.7197},{1512.1021,-2361.2539,13.2778,359.3044},{1518.7278,-2361.1372,13.2805,359.3376},{1529.8168,-2361.1741,13.2817,0.7694},
{1495.6238,-2361.1960,13.2736,0.0703},{1458.0022,-2347.6514,13.2740,359.3102},{1451.4670,-2347.6658,13.2740,359.5402},{1444.7390,-2347.3774,13.2740,359.0860},
{1398.2257,-2347.8931,13.2661,359.4724},{1407.8877,-2347.3940,13.2661,0.8884}
};
new Float: DealerCarPos1[8][4] = {
{-1843.7559,1294.2961,59.9107,198.8924},{-1835.2655,1297.2742,59.8975,199.2954},{-1835.2655,1297.2742,59.8975,199.2954},{-1827.8151,1299.3569,59.9086,197.2848},
{-1816.9409,1303.0677,59.9116,190.2576},{-1816.9409,1303.0677,59.9116,190.2577},{-1806.0881,1303.3514,59.9100,181.4281},{-1794.0687,1303.6813,59.8991,173.3053}
};
new Float: DealerCarPos2[5][4] = {
{-1416.3143,-20.0038,15.0739,0.0630},{-1416.3143,-20.0038,15.0739,0.0630},{-1302.5134,84.2867,15.0662,359.9970},{-1507.8579,-106.1037,15.0845,359.9987},{-1638.9340,-239.4042,15.0781,359.9972}
};

Link to comment
Share on other sites

  • 577777 locked this topic
Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...