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] kreirajfirmu pomoc  (Pročitano 255 puta)

0 članova i 1 gost pregledaju ovu temu.

Van mreže 🅢🅘🅜🅔🅒

  • Transformer
  • *
  • Poruke: 70
  • Pol: Muškarac
  • Carpe diem!
kreirajfirmu pomoc
« poslato: Novembar 14, 2017, 17:04:08 posle podne »
Kada kreiram firme nece da se kreira kako treba ni bizz ni da se unutra kuca /shop evo kodovi:
pomagajtee :D
stock BusinessType(b)
{
    new string[30];
    switch(BusinessInfo[b][bType])
    {
       case 1: string = "24/7";
       case 2: string = "24/7";
       case 3: string = "24/7";
       case 4: string = "24/7";
       case 5: string = "24/7";
       case 6: string = "24/7";
       case 7: string = "Ammunation 1";
       case 8: string = "Ammunation 2";
       case 9: string = "Ammunation 3";
       case 10: string = "Ammunation 4";
       case 11: string = "Ammunation 5";
       case 12: string = "Binco";
       case 13: string = "DS";
       case 14: string = "ProLaps";
       case 15: string = "Suruban";
       case 16: string = "Victim";
       case 17: string = "ZIP";
       case 18: string = "Burg";
       case 19: string = "Cluckin'Bell";
       case 20: string = "Well Stacked Pizza";
       case 21: string = "Rusty Brown Donuts";
       case 22: string = "Dillimore Gas Station";
       case 23: string = "Club";
       case 24: string = "Bar";
       case 25: string = "Lil' probe inn";
       case 26: string = "Jay's diner";
       case 27: string = "Gant bridge diner";
       case 28: string = "World of coq";
       case 29: string = "Welcome pump";
       case 30: string = "Big spread ranch";
    }
    return string;
}

YCMD:kreirajfirmu(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, type, id, Int, VW, string[128], InInt;
    if(sscanf(params, "iii", price, type, InInt)) return SCM(playerid, BOJA_PLAVA, "KORISCENJE: /kreirajfirmu [cena] [tip] [interior]");
    for(new b = 1; b < sizeof(BusinessInfo); b++)
    {
        if(BusinessInfo[b][bPrice] == 0)
        {
            id = b;
            break;
        }
    }
    switch(InInt)
    {
        case 1: // 24/7 1
{
        BusinessInfo[id][bInInt] = 17;
BusinessInfo[id][bExitX] = -25.884499;
    BusinessInfo[id][bExitY] = -185.868988;
    BusinessInfo[id][bExitZ] = 1003.549988;
    format(string, sizeof(string), "24/7");
    strmid(BusinessInfo[id][bName], string, 0, strlen(string), 128);
}
case 2: // 24/7 2
{
    BusinessInfo[id][bInInt] = 10;
BusinessInfo[id][bExitX] = 6.091180;
    BusinessInfo[id][bExitY] = -29.271898;
    BusinessInfo[id][bExitZ] = 1003.549988;
    format(string, sizeof(string), "24/7");
    strmid(BusinessInfo[id][bName], string, 0, strlen(string), 128);
}
case 3: // 24/7 3
{
    BusinessInfo[id][bInInt] = 18;
BusinessInfo[id][bExitX] = -30.946699;
    BusinessInfo[id][bExitY] = -89.609596;
    BusinessInfo[id][bExitZ] = 1003.549988;
    format(string, sizeof(string), "24/7");
    strmid(BusinessInfo[id][bName], string, 0, strlen(string), 128);
}
case 4: // 24/7 4
{
    BusinessInfo[id][bInInt] = 16;
BusinessInfo[id][bExitX] = -25.132599;
    BusinessInfo[id][bExitY] = -139.066986;
    BusinessInfo[id][bExitZ] = 1003.549988;
    format(string, sizeof(string), "24/7");
    strmid(BusinessInfo[id][bName], string, 0, strlen(string), 128);
}
case 5: // 24/7 5
{
    BusinessInfo[id][bInInt] = 4;
BusinessInfo[id][bExitX] = -27.312300;
    BusinessInfo[id][bExitY] = -29.277599;
    BusinessInfo[id][bExitZ] = 1003.549988;
    format(string, sizeof(string), "24/7");
    strmid(BusinessInfo[id][bName], string, 0, strlen(string), 128);
}
case 6: // 24/7 6
{
    BusinessInfo[id][bInInt] = 6;
BusinessInfo[id][bExitX] = -26.691599;
    BusinessInfo[id][bExitY] = -55.714897;
    BusinessInfo[id][bExitZ] = 1003.549988;
    format(string, sizeof(string), "24/7");
    strmid(BusinessInfo[id][bName], string, 0, strlen(string), 128);
}
case 7: // Ammunation 1
{
    BusinessInfo[id][bInInt] = 1;
BusinessInfo[id][bExitX] = 286.148987;
    BusinessInfo[id][bExitY] = -40.644398;
    BusinessInfo[id][bExitZ] = 1001.569946;
    format(string, sizeof(string), "Ammunation");
    strmid(BusinessInfo[id][bName], string, 0, strlen(string), 128);
}
case 8: // Ammunation 2
{
    BusinessInfo[id][bInInt] = 4;
BusinessInfo[id][bExitX] = 286.800995;
    BusinessInfo[id][bExitY] = -82.547600;
    BusinessInfo[id][bExitZ] = 1001.539978;
    format(string, sizeof(string), "Ammunation");
    strmid(BusinessInfo[id][bName], string, 0, strlen(string), 128);
}
case 9: // Ammunation 3
{
    BusinessInfo[id][bInInt] = 6;
BusinessInfo[id][bExitX] = 296.919983;
    BusinessInfo[id][bExitY] = -108.071999;
    BusinessInfo[id][bExitZ] = 1001.569946;
    format(string, sizeof(string), "Ammunation");
    strmid(BusinessInfo[id][bName], string, 0, strlen(string), 128);
}
case 10: // Ammunation 4 (2 floors)
{
    BusinessInfo[id][bInInt] = 7;
BusinessInfo[id][bExitX] = 314.820984;
    BusinessInfo[id][bExitY] = -141.431992;
    BusinessInfo[id][bExitZ] = 999.661987;
    format(string, sizeof(string), "Ammunation");
    strmid(BusinessInfo[id][bName], string, 0, strlen(string), 128);
}
case 11: // Ammunation 5
{
    BusinessInfo[id][bInInt] = 6;
BusinessInfo[id][bExitX] = 316.524994;
    BusinessInfo[id][bExitY] = -167.706985;
    BusinessInfo[id][bExitZ] = 999.661987;
    format(string, sizeof(string), "Ammunation");
    strmid(BusinessInfo[id][bName], string, 0, strlen(string), 128);
}
case 12: // Binco
{
    BusinessInfo[id][bInInt] = 15;
BusinessInfo[id][bExitX] = 207.737991;
    BusinessInfo[id][bExitY] = -109.019996;
    BusinessInfo[id][bExitZ] = 1005.132812;
    format(string, sizeof(string), "Binco");
    strmid(BusinessInfo[id][bName], string, 0, strlen(string), 128);
}
case 13: // DS (Didier Sachs)
{
    BusinessInfo[id][bInInt] = 14;
BusinessInfo[id][bExitX] = 204.332992;
    BusinessInfo[id][bExitY] = -166.694992;
    BusinessInfo[id][bExitZ] = 1000.523437;
    format(string, sizeof(string), "DS (Didier Sachs)");
    strmid(BusinessInfo[id][bName], string, 0, strlen(string), 128);
}
case 14: // Prolaps
{
    BusinessInfo[id][bInInt] = 3;
BusinessInfo[id][bExitX] = 207.054992;
    BusinessInfo[id][bExitY] = -138.804992;
    BusinessInfo[id][bExitZ] = 1003.507812;
    format(string, sizeof(string), "Prolaps");
    strmid(BusinessInfo[id][bName], string, 0, strlen(string), 128);
}
case 15: // Suburban
{
    BusinessInfo[id][bInInt] = 1;
BusinessInfo[id][bExitX] = 203.777999;
    BusinessInfo[id][bExitY] = -48.492397;
    BusinessInfo[id][bExitZ] = 1001.804687;
    format(string, sizeof(string), "Suburban");
    strmid(BusinessInfo[id][bName], string, 0, strlen(string), 128);
}
case 16: // Victim
{
    BusinessInfo[id][bInInt] = 5;
BusinessInfo[id][bExitX] = 226.293991;
    BusinessInfo[id][bExitY] = -7.431529;
    BusinessInfo[id][bExitZ] = 1002.210937;
    format(string, sizeof(string), "Victim");
    strmid(BusinessInfo[id][bName], string, 0, strlen(string), 128);
}
case 17: // ZIP
{
    BusinessInfo[id][bInInt] = 18;
BusinessInfo[id][bExitX] = 161.391006;
    BusinessInfo[id][bExitY] = -93.159156;
    BusinessInfo[id][bExitZ] = 1001.804687;
    format(string, sizeof(string), "ZIP");
    strmid(BusinessInfo[id][bName], string, 0, strlen(string), 128);
}
case 18: // Burg
{
    BusinessInfo[id][bInInt] = 10;
BusinessInfo[id][bExitX] = 364.0647;
    BusinessInfo[id][bExitY] = -73.8064;
    BusinessInfo[id][bExitZ] = 1001.507812;
    format(string, sizeof(string), "Burg");
    strmid(BusinessInfo[id][bName], string, 0, strlen(string), 128);
}
case 19: // Cluckin'Bell
{
    BusinessInfo[id][bInInt] = 9;
BusinessInfo[id][bExitX] = 375.962463;
    BusinessInfo[id][bExitY] = -65.816848;
    BusinessInfo[id][bExitZ] = 1001.507812;
    format(string, sizeof(string), "Cluckin'Bell");
    strmid(BusinessInfo[id][bName], string, 0, strlen(string), 128);
}
case 20: // Well Stacked Pizza
{
    BusinessInfo[id][bInInt] = 5;
BusinessInfo[id][bExitX] = 372.2830;
    BusinessInfo[id][bExitY] = -132.2032;
    BusinessInfo[id][bExitZ] = 1001.4922;
    format(string, sizeof(string), "Well Stacked Pizza");
    strmid(BusinessInfo[id][bName], string, 0, strlen(string), 128);
}
case 21: // Rusty Brown Donuts
{
    BusinessInfo[id][bInInt] = 17;
BusinessInfo[id][bExitX] = 377.0696;
    BusinessInfo[id][bExitY] = -191.9550;
    BusinessInfo[id][bExitZ] = 1000.632812;
    format(string, sizeof(string), "Rusty Brown Donuts");
    strmid(BusinessInfo[id][bName], string, 0, strlen(string), 128);
}
case 22: // Dillimore Gas Station
{
    BusinessInfo[id][bInInt] = 0;
BusinessInfo[id][bExitX] = 663.836242;
    BusinessInfo[id][bExitY] = -575.605407;
    BusinessInfo[id][bExitZ] = 16.343263;
    format(string, sizeof(string), "Dillimore Gas Station");
    strmid(BusinessInfo[id][bName], string, 0, strlen(string), 128);
}
case 23: // Club
{
    BusinessInfo[id][bInInt] = 17;
BusinessInfo[id][bExitX] = 493.390991;
    BusinessInfo[id][bExitY] = -22.722799;
    BusinessInfo[id][bExitZ] = 1000.679687;
    format(string, sizeof(string), "Club");
    strmid(BusinessInfo[id][bName], string, 0, strlen(string), 128);
}
case 24: // Bar
{
    BusinessInfo[id][bInInt] = 11;
BusinessInfo[id][bExitX] = 501.980987;
    BusinessInfo[id][bExitY] = -69.150199;
    BusinessInfo[id][bExitZ] = 998.757812;
    format(string, sizeof(string), "Bar");
    strmid(BusinessInfo[id][bName], string, 0, strlen(string), 128);
}
case 25: // Lil' probe inn
{
    BusinessInfo[id][bInInt] = 18;
BusinessInfo[id][bExitX] = -227.027999;
    BusinessInfo[id][bExitY] = 1401.229980;
    BusinessInfo[id][bExitZ] = 27.765625;
    format(string, sizeof(string), "Lil' probe inn");
    strmid(BusinessInfo[id][bName], string, 0, strlen(string), 128);
}
case 26: // Jay's diner
{
    BusinessInfo[id][bInInt] = 4;
BusinessInfo[id][bExitX] = 457.304748;
    BusinessInfo[id][bExitY] = -88.428497;
    BusinessInfo[id][bExitZ] = 999.554687;
    format(string, sizeof(string), "Jay's diner");
    strmid(BusinessInfo[id][bName], string, 0, strlen(string), 128);
}
case 27: // Gant bridge diner
{
    BusinessInfo[id][bInInt] = 5;
BusinessInfo[id][bExitX] = 454.973937;
    BusinessInfo[id][bExitY] = -110.104995;
    BusinessInfo[id][bExitZ] = 1000.077209;
    format(string, sizeof(string), "Gant bridge diner");
    strmid(BusinessInfo[id][bName], string, 0, strlen(string), 128);
}
case 28: // World of coq
{
    BusinessInfo[id][bInInt] = 1;
BusinessInfo[id][bExitX] = 452.489990;
    BusinessInfo[id][bExitY] = -18.179698;
    BusinessInfo[id][bExitZ] = 1001.132812;
    format(string, sizeof(string), "World of coq");
    strmid(BusinessInfo[id][bName], string, 0, strlen(string), 128);
}
case 29: // Welcome pump
{
    BusinessInfo[id][bInInt] = 1;
BusinessInfo[id][bExitX] = 681.557861;
    BusinessInfo[id][bExitY] = -455.680053;
    BusinessInfo[id][bExitZ] = -25.609874;
    format(string, sizeof(string), "Welcome pump");
    strmid(BusinessInfo[id][bName], string, 0, strlen(string), 128);
}
case 30: // Big spread ranch
{
    BusinessInfo[id][bInInt] = 3;
BusinessInfo[id][bExitX] = 1212.019897;
    BusinessInfo[id][bExitY] = -28.663099;
    BusinessInfo[id][bExitZ] = 1000.953125;
    format(string, sizeof(string), "Big spread ranch");
    strmid(BusinessInfo[id][bName], string, 0, strlen(string), 128);
}
}
    new Float:X,Float:Y,Float:Z,Float:A;
    GetPlayerPos(playerid, X, Y, Z);
    GetPlayerFacingAngle(playerid, A);
    Int = GetPlayerInterior(playerid);
    VW = GetPlayerVirtualWorld(playerid);

    BusinessInfo[id][bOwned] = 0;
    BusinessInfo[id][bPrice] = price;
    BusinessInfo[id][bEnterFee] = 0;
    BusinessInfo[id][bMoney] = 0;
    BusinessInfo[id][bType] = type;
    BusinessInfo[id][bEnterX] = X;
    BusinessInfo[id][bEnterY] = Y;
    BusinessInfo[id][bEnterZ] = Z;
    BusinessInfo[id][bEnterA] = A;
    BusinessInfo[id][bLocked] = 0;

    BusinessInfo[id][bInt] = Int;
    BusinessInfo[id][bVW] = VW;
    BusinessInfo[id][bInVW] = id;
BusinessInfo[id][bID] = id;

    format(string, sizeof(string), "Nema");
    strmid(BusinessInfo[id][bOwner], string, 0, strlen(string), 128);

    if(BusinessInfo[id][bExitIcon]) DestroyPickup(BusinessInfo[id][bExitIcon]);
    if(BusinessInfo[id][bIcon]) DestroyPickup(BusinessInfo[id][bIcon]);
    BusinessInfo[id][bIcon] = CreatePickup(1274, 1, BusinessInfo[id][bEnterX], BusinessInfo[id][bEnterY], BusinessInfo[id][bEnterZ], BusinessInfo[id][bVW]);

    new business3dtext[256];
  format(business3dtext, sizeof(business3dtext), ""BELA" Ovaj biznis vlasnika !\n "PLAVA"Cena biznisa"BELA": %d \n "PLAVA"ID"BELA": %d \n Da kupite ovaj biznis \n kucajte "PLAVA"/bizz buy", BusinessInfo[id][bPrice], BusinessInfo[id][bID]);
    BusinessLabelArray[id] = Create3DTextLabel(business3dtext, -1, BusinessInfo[id][bEnterX], BusinessInfo[id][bEnterY], BusinessInfo[id][bEnterZ], 20.0, BusinessInfo[id][bVW]);

    SaveBizz(id);
    return 1;
}


case DIALOG_SHOP:
{
    if(response)
{
switch(listitem)
{
    case 0:
    {
        if(BusinessInfo[InBusiness[playerid]][bType] != 2) return SCM(playerid, BOJA_CRVENA, "GRESKA: Niste u prodavnici!");
if(PlayerInfo[playerid][pMobile] != 9999) return SCM(playerid, BOJA_CRVENA, "GRESKA: Vec imate mobilni!");
if(GetPlayerMoney(playerid) < 100) return SCM(playerid, BOJA_CRVENA, "GRESKA: Nemate dovoljno novca da kupite mobilni! (50$)");

                        PlayerInfo[playerid][pMoney] -= 100;
GivePlayerMoney(playerid, -100);
PlayerInfo[playerid][pMobile] = 1;
SavePlayer(playerid);

BusinessInfo[InBusiness[playerid]][bMoney] += 100;
SaveBizz(InBusiness[playerid]);

SCM(playerid, BOJA_ZELENA, "Kupili ste mobilni.");
}
case 1:
{
new str[128];
new number = 100000 + random(899999);
if(BusinessInfo[InBusiness[playerid]][bType] != 2) return SCM(playerid, BOJA_CRVENA, "GRESKA: Niste u prodavnici!");
if(PlayerInfo[playerid][pMobileNumber] != 0) return SCM(playerid, BOJA_CRVENA, "GRESKA: Vec imate SIM karticu!");
if(GetPlayerMoney(playerid) < 25) return SCM(playerid, BOJA_CRVENA, "GRESKA: Nemate dovoljno novca da kupite SIM karticu! (25$)");

                        PlayerInfo[playerid][pMoney] -= 25;
GivePlayerMoney(playerid, -25);
PlayerInfo[playerid][pMobileNumber] = number;
SavePlayer(playerid);

BusinessInfo[InBusiness[playerid]][bMoney] += 25;
SaveBizz(InBusiness[playerid]);

format(str, sizeof(str), "Kupili ste SIM karticu. Vas broj je %d", number);
SCM(playerid, BOJA_ZELENA, str);
}
case 2:
{
    if(BusinessInfo[InBusiness[playerid]][bType] != 2) return SCM(playerid, BOJA_CRVENA, "GRESKA: Niste u prodavnici!");
    SPD(playerid, DIALOG_CREDIT, DIALOG_STYLE_INPUT, "DOPUNA", "Unesite iznos koliko kredita zelite da uplatite", "U redu", "Izadji");
}
case 3:
{
    if(BusinessInfo[InBusiness[playerid]][bType] != 2) return SCM(playerid, BOJA_CRVENA, "GRESKA: Niste u prodavnici!");
    if(PlayerInfo[playerid][pAddressBook] != 9999) return SCM(playerid, BOJA_CRVENA, "GRESKA: Vec imate imenik!");
    if(GetPlayerMoney(playerid) < 50) return SCM(playerid, BOJA_CRVENA, "GRESKA: Nemate dovoljno novca da kupite imenik!");
                        PlayerInfo[playerid][pMoney] -= 50;
GivePlayerMoney(playerid, -50);
PlayerInfo[playerid][pAddressBook] = 1;
SavePlayer(playerid);

BusinessInfo[InBusiness[playerid]][bMoney] += 100;
SaveBizz(InBusiness[playerid]);

SCM(playerid, BOJA_ZELENA, "Kupili ste imenik. /broj");
}
}
return 1;
}
}

case DIALOG_CREDIT:
{
    if(response)
    {
        new credit, str[128];
        credit = strval(inputtext);
if(BusinessInfo[InBusiness[playerid]][bType] != 2) return SCM(playerid, BOJA_CRVENA, "GRESKA: Niste u prodavnici!");
if(GetPlayerMoney(playerid) < credit*2) return SCM(playerid, BOJA_CRVENA, "GRESKA: Nemate dovoljno novca da uplatite kredit!(kreditx2)");
                PlayerInfo[playerid][pMoney] -= credit*2;
GivePlayerMoney(playerid, -(credit*2));
PlayerInfo[playerid][pMobileCredit] += credit;
SavePlayer(playerid);
BusinessInfo[InBusiness[playerid]][bMoney] += 25;
SaveBizz(InBusiness[playerid]);
format(str, sizeof(str), "Dopunili ste vas kredit za %d", credit);
SCM(playerid, BOJA_ZELENA, str);
return 1;
}
}
Old Express
 

Van mreže Ł[email protected]

Odg: kreirajfirmu pomoc
« Odgovor #1 poslato: Novembar 14, 2017, 17:14:19 posle podne »
pravila
heroin rap - Moskri u kuci, od sledece lajne glava ce mi puci