PARTNERI:
-UPOZORENJE-

Samo registrovani članovi mogu da vide/koriste forum u celini.
Prijavite se ili registrujte nalog na Balkan SA-MP forumu.


Autor Tema: [Pomoc] kreirajstan  (Pročitano 194 puta)

0 članova i 1 gost pregledaju ovu temu.

Van mreže 🅢🅘🅜🅔🅒

  • Transformer
  • *
  • Poruke: 70
  • Pol: Muškarac
  • Carpe diem!
kreirajstan
« poslato: Novembar 18, 2017, 11:09:26 pre podne »
Skripta koju koristim: Mod od 0
Detaljan opis problema: kada kreiram stan pise id 0 i nece dalje, samo prebacuje label sa mesta na mesto a trebalo bi da ide 0,1,2,3.... al nece
Dio skripte: Dole je
Neke slike/video za lakse dobivanje pomoci(neobavezno): //


YCMD:kreirajstan(playerid, params[], help)
{
#pragma unused help
    if((PlayerInfo[playerid][pAdmin] < 6) || (PlayerInfo[playerid][pAdmin] == 9999)) return SCM(playerid, BOJA_CRVENA, "GRESKA: Niste ovlasceni da koristite ovu komandu!");
    new price, id, Int, VW, InInt;
    if(sscanf(params, "ii", price, InInt)) return SCM(playerid, BOJA_PLAVA, "KORISCENJE: /kreirajstan [cena] [interior]");
    for(new a = 1; a < sizeof(ApartmentInfo); a++)
    {
        if(ApartmentInfo[a][aPrice] == 0)
        {
            id = a;
            break;
        }
    }
    switch(InInt)
{
    case 0: // CJ House
{
        ApartmentInfo[id][aInInt] = 3;
ApartmentInfo[id][aExitX] = 2496.05;
    ApartmentInfo[id][aExitY] = -1692.73;
    ApartmentInfo[id][aExitZ] = 1015.75;
}
        case 1: // Safe House 1
{
        ApartmentInfo[id][aInInt] = 1;
ApartmentInfo[id][aExitX] = 223.04;
    ApartmentInfo[id][aExitY] = 1287.26;
    ApartmentInfo[id][aExitZ] = 1083.2;
}
case 2: // Safe House 2
{
    ApartmentInfo[id][aInInt] = 4;
ApartmentInfo[id][aExitX] = 260.98;
    ApartmentInfo[id][aExitY] = 1284.55;
    ApartmentInfo[id][aExitZ] = 1081.3;
}
case 3: // Safe House 3
{
    ApartmentInfo[id][aInInt] = 5;
ApartmentInfo[id][aExitX] = 140.18;
    ApartmentInfo[id][aExitY] = 1366.58;
    ApartmentInfo[id][aExitZ] = 1084.97;
}
case 4: // Safe House 4
{
    ApartmentInfo[id][aInInt] = 9;
ApartmentInfo[id][aExitX] = 82.95;
    ApartmentInfo[id][aExitY] = 1322.44;
    ApartmentInfo[id][aExitZ] = 1084.99;
}
case 7:  // Safe House 7
{
    ApartmentInfo[id][aInInt] = 8;
ApartmentInfo[id][aExitX] = -42.85;
    ApartmentInfo[id][aExitY] = 1405.61;
    ApartmentInfo[id][aExitZ] = 1085.5;
}
case 8: // Safe House 8
{
    ApartmentInfo[id][aInInt] = 6;
ApartmentInfo[id][aExitX] = -68.69;
    ApartmentInfo[id][aExitY] = 1351.97;
    ApartmentInfo[id][aExitZ] = 1081.28;
}
case 9: // Safe House 9
{
    ApartmentInfo[id][aInInt] = 6;
ApartmentInfo[id][aExitX] = 2333.11;
    ApartmentInfo[id][aExitY] = -1077.1;
    ApartmentInfo[id][aExitZ] = 1050.04;
}
case 10: // Safe House 10
{
    ApartmentInfo[id][aInInt] = 5;
ApartmentInfo[id][aExitX] = 2233.8;
    ApartmentInfo[id][aExitY] = -1115.36;
    ApartmentInfo[id][aExitZ] = 1051.91;
}
case 11: // Safe House 11
{
    ApartmentInfo[id][aInInt] = 8;
ApartmentInfo[id][aExitX] = 2365.3;
    ApartmentInfo[id][aExitY] = -1134.92;
    ApartmentInfo[id][aExitZ] = 1051.91;
}
case 12: // Safe House 12
{
    ApartmentInfo[id][aInInt] = 11;
ApartmentInfo[id][aExitX] = 2282.91;
    ApartmentInfo[id][aExitY] = -1140.29;
    ApartmentInfo[id][aExitZ] = 1051.91;
}
  case 13: // Safe House 13
{
    ApartmentInfo[id][aInInt] = 6;
ApartmentInfo[id][aExitX] = 2196.79;
    ApartmentInfo[id][aExitY] = -1204.35;
    ApartmentInfo[id][aExitZ] = 1050.05;
}
case 14: // Safe House 14
{
    ApartmentInfo[id][aInInt] = 10;
ApartmentInfo[id][aExitX] = 2270.39;
    ApartmentInfo[id][aExitY] = -1210.45;
    ApartmentInfo[id][aExitZ] = 1048.57;
}
case 15: // Safe House 15
{
    ApartmentInfo[id][aInInt] = 6;
ApartmentInfo[id][aExitX] = 2308.79;
    ApartmentInfo[id][aExitY] = -1212.88;
    ApartmentInfo[id][aExitZ] = 1050.3;
}
case 16: // Safe House 16
{
    ApartmentInfo[id][aInInt] = 1;
ApartmentInfo[id][aExitX] = 2217.54;
    ApartmentInfo[id][aExitY] = -1076.29;
    ApartmentInfo[id][aExitZ] = 1051.52;
}
case 17: // Safe House 17
{
    ApartmentInfo[id][aInInt] = 2;
ApartmentInfo[id][aExitX] = 2237.59;
    ApartmentInfo[id][aExitY] = -1080.97;
    ApartmentInfo[id][aExitZ] = 1050.07;
}
case 18: // Safe House 18
{
    ApartmentInfo[id][aInInt] = 9;
ApartmentInfo[id][aExitX] = 2317.82;
    ApartmentInfo[id][aExitY] = -1026.75;
    ApartmentInfo[id][aExitZ] = 1051.21;
}
case 19: // Budget Inn Motel Room
{
    ApartmentInfo[id][aInInt] = 12;
ApartmentInfo[id][aExitX] = 447.52;
    ApartmentInfo[id][aExitY] = 511.49;
    ApartmentInfo[id][aExitZ] = 1001.42;
}
case 20: // Abandon House
{
    ApartmentInfo[id][aInInt] = 10;
ApartmentInfo[id][aExitX] = 422.16;
    ApartmentInfo[id][aExitY] = 2536.52;
    ApartmentInfo[id][aExitZ] = 11.01;
}

}
    new Float:X,Float:Y,Float:Z,Float:A;
    GetPlayerPos(playerid, X, Y, Z);
    GetPlayerFacingAngle(playerid, A);
    Int = GetPlayerInterior(playerid);
    VW = GetPlayerVirtualWorld(playerid);

    ApartmentInfo[id][aOwned] = 0;
    ApartmentInfo[id][aPrice] = price;
    ApartmentInfo[id][aEnterX] = X;
    ApartmentInfo[id][aEnterY] = Y;
    ApartmentInfo[id][aEnterZ] = Z;
    ApartmentInfo[id][aEnterA] = A;
    ApartmentInfo[id][aLocked] = 1;

    ApartmentInfo[id][aInt] = Int;
    ApartmentInfo[id][aVW] = VW;
    ApartmentInfo[id][aInVW] = id;
    ApartmentInfo[id][aID] = id;

ApartmentInfo[id][aSlot1] = 9999;
ApartmentInfo[id][aSlot1Ammo] = 0;
ApartmentInfo[id][aSlot2] = 9999;
ApartmentInfo[id][aSlot2Ammo] = 0;
ApartmentInfo[id][aSlot3] = 9999;
ApartmentInfo[id][aSlot3Ammo] = 0;
ApartmentInfo[id][aMats] = 0;
ApartmentInfo[id][aDrug] = 0;

    if(ApartmentInfo[id][aIcon]) DestroyPickup(ApartmentInfo[id][aIcon]);
    ApartmentInfo[id][aIcon] = CreatePickup(1273, 1, ApartmentInfo[id][aEnterX], ApartmentInfo[id][aEnterY], ApartmentInfo[id][aEnterZ], ApartmentInfo[id][aVW]);
SaveApartment(id);

new apartment3dtext[256];
format(apartment3dtext, sizeof(apartment3dtext), ""BELA" Ovaj stan nema vlasnika vlasnika !\n "PLAVA"ID stana"BELA": %d \n "PLAVA"Cena stana"BELA": %d \n "PLAVA"Da kupite ovaj stan \n kucajte /buyapartment", ApartmentInfo[id][aID], ApartmentInfo[id][aPrice]);
    ApartmentLabelArray[id] = Create3DTextLabel(apartment3dtext, -1, ApartmentInfo[id][aEnterX], ApartmentInfo[id][aEnterY], ApartmentInfo[id][aEnterZ], 20.0, ApartmentInfo[id][aVW]);
    return 1;
}
Old Express