Jump to content

[REZOLVAT] Problema Include Garage EdisonTuts


NoPulseJrrs
 Share

Recommended Posts

  • Username: NoPulseJrrs
  • Problema întălnită: Problema la include-ul garage a lui EdisonTuts
  • Detalii despre problemă: Atunci cand dau compilare la gamemode imi da eroare de la cmd_park.. si nu stiu sa o fac.
  • Ce ai încercat să faci înainte să postezi?: toate posibile si neposibile..
  • Cod sursă (recomandat pastebin.com) : https://pastebin.com/1NCKMdJU
  • Alte detalii: Mersi.
Link to comment
Share on other sites

Acum 2 minute, L0K3D_Hokage a spus:

Am mentionat, tot ce este in comanda:

 

eo nu le am ma ajutii tu..

 

asta e comanda mea: 

CMD:park(playerid, params[]) {
    new car = GetPlayerVehicleID(playerid);
    if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_GREY, "Nu esti in vehiculul tau.");
    if(GetVehicles(playerid) == 0) return SendClientMessage(playerid, COLOR_GREY, "Nu ai un vehicul personal!");
    if(PersonalCar(playerid) == -1) return SCM(playerid, COLOR_LGREEN, "Eroare: Nu esti in unul dintre vehiculele tale personale!");
    if(GetPlayerState(playerid) != 2) return SCM(playerid, COLOR_LGREEN, "* Trebuie sa fii la volan pentru a putea folosi aceasta comanda!");
    new idd = PersonalCar(playerid);
    new Float: vhp;
    GetVehicleHealth(car, vhp);
    if(vhp < 800) return SendClientMessage(playerid, COLOR_GREY, "Nu poti parca masina cand are sub 800 'viata'!");
    if(PlayerToPoint(150.0, playerid, 1716.9065,-1902.4526,13.5661)) return SCM(playerid, -1, "Nu poti parca o masina in jurul spawn-ului.");
    new Float:x, Float:y, Float:z, Float:a;
    CheckVehicle(CarInfo[idd][Spawned]);
    saveTuning(playerid, CarInfo[idd][Spawned]);
    GetVehiclePos(car, x, y, z);
    GetVehicleZAngle(car, a);

    CarInfo[idd][cVirtual] = 0;
    if(GetPVarInt(playerid, "inGarage") != 0) {
        if(garage_slot(playerid, 0) == -1) x = 481.85, y = -405.426, z = 2758.0046;
        else if(garage_slot(playerid, 1) == -1) x = 481.85, y = -410.9, z = 2758.0046;
        else if(garage_slot(playerid, 2) == -1) x = 481.85, y = -416.301, z = 2758.0046;
        else if(garage_slot(playerid, 3) == -1) x = 481.85, y = -421.104, z = 2758.0046;
        else if(garage_slot(playerid, 4) == -1) x = 481.85, y = -425.924, z = 2758.0046;                        
        else if(garage_slot(playerid, 5) == -1) x = 493.998, y = -405.426, z = 2758.0046;
        else if(garage_slot(playerid, 6) == -1) x = 493.998, y = -410.9, z = 2758.0046;
        else if(garage_slot(playerid, 7) == -1) x = 493.998, y = -416.301, z = 2758.0046;
        else if(garage_slot(playerid, ???? == -1) x = 493.998, y = -421.104, z = 2758.0046;
        else if(garage_slot(playerid, 9) == -1) x = 493.998, y = -425.924, z = 2758.0046;
        if(x == 481.85) a = -131.1600;
        if(x == 493.998) a = 131.1600;

        CarInfo[idd][cVirtual] = GetPVarInt(playerid, "inGarage");
        SCM(playerid, COLOR_GRAD3, "Your vehicle was parked in the garage.");
    }

    CarInfo[idd][cLocationx] = x;
    CarInfo[idd][cLocationy] = y;
    CarInfo[idd][cLocationz] = z;
    

    CarInfo[idd][cAngle] = a;
    VehicleOwned[CarInfo[idd][Spawned]] = 0;
    VehicleSQL[CarInfo[idd][Spawned]] = 0;
    
    DestroyVehicle(car);
    
    if(CarInfo[idd][cNeon] != 0) {
        DestroyDynamicObject(neon[0][CarInfo[idd][Spawned]]);
        DestroyDynamicObject(neon[1][CarInfo[idd][Spawned]]);
        neon[0][CarInfo[idd][Spawned]] = 0;
        neon[1][CarInfo[idd][Spawned]] = 0;    
    }
    if(strlen(CarInfo[idd][cText]) >= 3) {
        DestroyDynamicObject(nameobject[CarInfo[idd][Spawned]]);
    }        
    CarInfo[idd][Spawned] = CreateVehicleEx(CarInfo[idd][cModel],CarInfo[idd][cLocationx],CarInfo[idd][cLocationy],CarInfo[idd][cLocationz],CarInfo[idd][cAngle],CarInfo[idd][cColorOne],CarInfo[idd][cColorTwo],-1);
    SetVehicleVirtualWorld(CarInfo[idd][Spawned], CarInfo[idd][cVirtual]);
    VehicleOwned[CarInfo[idd][Spawned]] = CarInfo[idd][Spawned];
    VehicleSQL[CarInfo[idd][Spawned]] = idd;    
    if(CarInfo[idd][cNeon] != 0) {
        new h = CarInfo[idd][Spawned];
        if(CarInfo[idd][cNeon] == 1)
        {
            neon[0][h] = CreateDynamicObject(18648,0,0,0,0,0,0);
            neon[1][h] = CreateDynamicObject(18648,0,0,0,0,0,0);
        }
        else if(CarInfo[idd][cNeon] == 2)
        {
            neon[0][h] = CreateDynamicObject(18649,0,0,0,0,0,0);
            neon[1][h] = CreateDynamicObject(18649,0,0,0,0,0,0);
        }
        else if(CarInfo[idd][cNeon] == 3)
        {
            neon[0][h] = CreateDynamicObject(18650,0,0,0,0,0,0);
            neon[1][h] = CreateDynamicObject(18650,0,0,0,0,0,0);
        }
        else if(CarInfo[idd][cNeon] == 4)
        {
            neon[0][h] = CreateDynamicObject(18652,0,0,0,0,0,0);
            neon[1][h] = CreateDynamicObject(18652,0,0,0,0,0,0);
        }
        else if(CarInfo[idd][cNeon] == 5)
        {
            neon[0][h] = CreateDynamicObject(18651,0,0,0,0,0,0);
            neon[1][h] = CreateDynamicObject(18651,0,0,0,0,0,0);
        }
        else if(CarInfo[idd][cNeon] == 6)
        {
            neon[0][h] = CreateDynamicObject(18647,0,0,0,0,0,0);
            neon[1][h] = CreateDynamicObject(18647,0,0,0,0,0,0);
        }
        AttachDynamicObjectToVehicle(neon[0][h], h, -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
        AttachDynamicObjectToVehicle(neon[1][h], h, 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    }                                    
    attach_vip_text(idd);
    
    SetTunning(idd);
    SetVehicleNumberPlate(CarInfo[idd][Spawned], CarInfo[idd][cLicense]);
    saveCar(idd);
    new Float: Pos[3];
    GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
    CarInfo[idd][cLastPos][0] = Pos[0];
    CarInfo[idd][cLastPos][1] = Pos[1];
    CarInfo[idd][cLastPos][2] = Pos[2];    
    return 1;
}
 

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

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