[Pomoc] Kreiranje biznisa na mestu kucanja komande

Započeo Bugi, Jun 13, 2013, 15:13:23 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Skripta koju koristim: Moja od 0
Detaljan opis problema: Pa kako da napravim da mi ova komanda msm da mi bude da kad kucam /makebiz na tom mestu na kom sam kucao da mi se pojavi onaj pickup i 3DTEXTLABel evo moje komande sa kojom zelim da uradim ono sto sam naveo gore
Deo skripte:
CMD:makebiz(playerid, params[])
{
if(!IsPlayerAdmin(playerid)) return SCM(playerid, COLOR_GREY, "You aren't authorized to use this command!");

    new price, type, level, id, int, world, string[128], Float:Xi, Float:Yi, Float:Zi, inti;
    if(sscanf(params, "dddd", price, type, level, id)) return SendClientMessage(playerid, COLOR_GREY, "Koriscenje: /makebiz [cena] [vrsta] [level]");
   
    if(level < 0 || level > 14) return SendClientMessage(playerid, COLOR_GREY, "YCMD: Type cannot go below 0, or above 10.");

    if(price < 10000) return SendClientMessage(playerid, COLOR_GREY, "YCMD: Price cannot go below $10,000.");

    for(new h = 1;h < sizeof(BizInfo);h++)
    {
        if(BizInfo[h][bPrice] == 0)
        {
            id = h;
            break;
        }
    }
    new Float:X,Float:Y,Float:Z,Float:A;
    GetPlayerPos(playerid, X, Y, Z);
    GetPlayerFacingAngle(playerid, A);
    int = GetPlayerInterior(playerid);
    world = GetPlayerVirtualWorld(playerid);
    BizInfo[id][bInsideInt] = inti;
    BizInfo[id][bExitX] = Xi;
    BizInfo[id][bExitY] = Yi;
    BizInfo[id][bExitZ] = Zi;

    BizInfo[id][bOwned] = 0;
    BizInfo[id][bPrice] = price;
    BizInfo[id][bType] = type;
    BizInfo[id][bLevel] = level;
    BizInfo[id][bEntranceX] = X;
    BizInfo[id][bEntranceY] = Y;
    BizInfo[id][bEntranceZ] = Z;
    BizInfo[id][bEntranceA] = A;
    BizInfo[id][bLocked] = 1;

    BizInfo[id][bInt] =int;
    BizInfo[id][bWorld] =world;
    BizInfo[id][bInsideWorld] =id;
   
    new vrsta[64];
    if(BizInfo[id][bType] == 1) { vrsta = "Butik"; }
    else if(BizInfo[id][bType] == 2) { vrsta = "Prodavnica"; }
    else if(BizInfo[id][bType] == 3) { vrsta = "Picerija"; }
    else if(BizInfo[id][bType] == 4) { vrsta = "Kafic"; }
    else if(BizInfo[id][bType] == 5) { vrsta = "Restoran"; }
    else if(BizInfo[id][bType] == 6) { vrsta = "Cvecara"; }
    else if(BizInfo[id][bType] == 7) { vrsta = "Auto Salon"; }
    else if(BizInfo[id][bType] == 8) { vrsta = "Moto Salon"; }
    else if(BizInfo[id][bType] == 9) { vrsta = "Brod Salon"; }
    else if(BizInfo[id][bType] == 10) { vrsta = "Avio/Heli Salon"; }
    else if(BizInfo[id][bType] == 11) { vrsta = "Salon Bicikala"; }
    else if(BizInfo[id][bType] == 12) { vrsta = "Auto Skola"; }
    else if(BizInfo[id][bType] == 13) { vrsta = "Glavni Burg"; }
    else if(BizInfo[id][bType] == 14) { vrsta = "Mali Burg"; }
    if(type == 1) // BUTIK
{
        BizInfo[id][bExitX] = 204.332992;
    BizInfo[id][bExitY] = -166.694992;
    BizInfo[id][bExitZ] = 1000.523437;
    BizInfo[id][bInt] = 1;
    strmid(BizInfo[id][bType],"Butik",0,strlen("Butik"),255);
}
else if(type == 2) // PRODAVNICA
{
        BizInfo[id][bExitX] = 6.091179;
    BizInfo[id][bExitY] = -29.271898;
    BizInfo[id][bExitZ] = 1003.549438;
    BizInfo[id][bInt] = 2;
    strmid(BizInfo[id][bType],"Prodavnica",0,strlen("Prodavnica"),255);
}
else if(type == 3) // PIZZERIJA
{
        BizInfo[id][bExitX] = 373.825653;
    BizInfo[id][bExitY] = -117.270904;
    BizInfo[id][bExitZ] = 1001.499511;
    BizInfo[id][bInt] = 3;
    strmid(BizInfo[id][bType],"Pizzerija",0,strlen("Pizzerija"),255);
}
else if(type == 4) // KAFIC
{
        BizInfo[id][bExitX] = 681.557861;
    BizInfo[id][bExitY] = -455.680053;
    BizInfo[id][bExitZ] = -25.609874;
    BizInfo[id][bInt] = 2;
    strmid(BizInfo[id][bType],"Kafic",0,strlen("Kafic"),255);
}
else if(type == 5) // RESTORAN
{
        BizInfo[id][bExitX] = 452.489990;
    BizInfo[id][bExitY] = -18.179698;
    BizInfo[id][bExitZ] = 1001.132812;
    BizInfo[id][bInt] = 3;
    strmid(BizInfo[id][bType],"Restoran",0,strlen("Restoran"),255);
}
else if(type == 12) // AUTO SKOLA
{
        BizInfo[id][bExitX] = 373.825653;
    BizInfo[id][bExitY] = -117.270904;
    BizInfo[id][bExitZ] = 1001.499511;
    BizInfo[id][bInt] = 3;
    strmid(BizInfo[id][bType],"Auto Skola",0,strlen("Auto Skola"),255);
}
else if(type == 14) // MALI BURG
{
        BizInfo[id][bExitX] = 375.962463;
    BizInfo[id][bExitY] = -65.816848;
    BizInfo[id][bExitZ] = 1001.507812;
    BizInfo[id][bInt] = 3;
    strmid(BizInfo[id][bType],"Mali Burg",0,strlen("Mali Burg"),255);
}
    format(string,sizeof(string),""SPLAVA"Firma na prodaju!\nVrsta: "BELA"%s\n"SPLAVA"Cena: "BELA"%d\n"SPLAVA"Level: "BELA"%d\n"SPLAVA"ID Firme: "BELA"%d\n"SPLAVA"Za kupovinu /kupifirmu",vrsta,BizInfo[id][bPrice],BizInfo[id][bLevel],id);
    BizLabel[id] = Create3DTextLabel(string ,0x33CCFFAA,Xi,Yi,Zi,25,0,1);

    /*format(string, sizeof(string), "None");
    strmid(BizInfo[id][bName], string, 0, strlen(string), 255);*/

    if(BizInfo[id][bOutsideIcon]) DestroyDynamicPickup(BizInfo[id][bOutsideIcon]);
    if(BizInfo[id][bInsideIcon]) DestroyDynamicPickup(BizInfo[id][bInsideIcon]);
    BizInfo[id][bOutsideIcon] = CreateDynamicPickup(1272, 1, BizInfo[id][bEntranceX], BizInfo[id][bEntranceY], BizInfo[id][bEntranceZ], BizInfo[id][bWorld]);
    BizInfo[id][bInsideIcon] = CreateDynamicPickup(1272, 1, BizInfo[id][bExitX], BizInfo[id][bExitY], BizInfo[id][bExitZ], BizInfo[id][bInsideWorld]);
    new file4[40];
    format(file4, sizeof(file4), BPATH, id);
    new INI:File = INI_Open(file4);
    INI_SetTag(File,"data");
    INI_WriteInt(File,"bOwned", BizInfo[id][bOwned]);
    INI_WriteInt(File,"bPrice", BizInfo[id][bPrice]);
    INI_WriteString(File,"bOwner", BizInfo[id][bOwner]);
    INI_WriteInt(File,"bType", BizInfo[id][bType]);
    INI_WriteInt(File,"bLocked", BizInfo[id][bLocked]);
    INI_WriteInt(File,"bMoney", BizInfo[id][bMoney]);
    INI_WriteFloat(File,"bEntranceX", BizInfo[id][bEntranceX]);
    INI_WriteFloat(File,"bEntranceY", BizInfo[id][bEntranceY]);
    INI_WriteFloat(File,"bEntranceZ", BizInfo[id][bEntranceZ]);
    INI_WriteFloat(File,"bEntranceA", BizInfo[id][bEntranceA]);
    INI_WriteFloat(File,"bExitX", BizInfo[id][bExitX]);
    INI_WriteFloat(File,"bExitY", BizInfo[id][bExitY]);
    INI_WriteFloat(File,"bExitZ", BizInfo[id][bExitZ]);
    INI_WriteFloat(File,"bExitA", BizInfo[id][bExitA]);
    INI_WriteInt(File,"bInt", BizInfo[id][bInt]);
    INI_WriteInt(File,"bWorld", BizInfo[id][bWorld]);
    INI_WriteInt(File,"bInsideInt", BizInfo[id][bInsideInt]);
    INI_WriteInt(File,"bInsideWorld", BizInfo[id][bInsideWorld]);
    INI_WriteString(File,"bName", BizInfo[id][bName]);
    INI_Close(File);
    return 1;
}
//////////////////////////////////////////////////////////////////
CMD:deletebiz(playerid, params[])
{
    if(!IsPlayerAdmin(playerid)) return 1;

    new id;

    if(sscanf(params, "d", id)) return SendClientMessage(playerid, COLOR_GREY, "YCMD: /deletebiz [id]");
    if(BizInfo[id][bOwned] == 1) return SCM(playerid, COLOR_GREY, "{FFFF00}[LZ]{AFAFAF} Ova firma ima vlasnika");
       
    BizInfo[id][bOwned] = 0;
    BizInfo[id][bPrice] = 0;
    BizInfo[id][bOwner] = 0;
    BizInfo[id][bType] = 0;
    BizInfo[id][bLocked] = 0;
    BizInfo[id][bName] = 0;
    BizInfo[id][bMoney] = 0;
    BizInfo[id][bEntranceX] = 0;
    BizInfo[id][bEntranceY] = 0;
    BizInfo[id][bEntranceZ] = 0;
    BizInfo[id][bEntranceA] = 0;
    BizInfo[id][bExitX] = 0;
    BizInfo[id][bExitY] = 0;
    BizInfo[id][bExitZ] = 0;
    BizInfo[id][bExitA] = 0;
    BizInfo[id][bInt] = 0;
    BizInfo[id][bWorld] = 0;
   
Delete3DTextLabel(BizLabel[id]);

    if(BizInfo[id][bOutsideIcon]) DestroyDynamicPickup(BizInfo[id][bOutsideIcon]);
    new string[128];

    format(string, sizeof(string), BPATH, id);
    fremove(string);
    return 1;
}


Neke slike/video: /////////////
Poslednja Izmena: Jun 13, 2013, 15:13:50 POSLE PODNE od |LZ| Bugi
RESPECT: Blaeks, Yui_Sang, Gagi, Kapetan Husein, Luksa, Slay, Denis_Lapi, Zoran(Dude)

Programski jezici koje koristim: C, C#, Visual Basic, HTML, CSS, PHP (tek ucim).


Pa sad ga nema uopste ni 3DTEXTA ni pickupa  :-[ a ja bi da mi gde sam kucao /makebiz postavi oba i 3dtext i pickup
RESPECT: Blaeks, Yui_Sang, Gagi, Kapetan Husein, Luksa, Slay, Denis_Lapi, Zoran(Dude)

Programski jezici koje koristim: C, C#, Visual Basic, HTML, CSS, PHP (tek ucim).


Citat: David (Sabljak) A.k.A SABO(T) poslato Jun 13, 2013, 16:10:34 POSLE PODNE
pa u komandi pise da ga kreira :S

Pa kreira verovatno al negde u sljos nurabudzosima :D
RESPECT: Blaeks, Yui_Sang, Gagi, Kapetan Husein, Luksa, Slay, Denis_Lapi, Zoran(Dude)

Programski jezici koje koristim: C, C#, Visual Basic, HTML, CSS, PHP (tek ucim).


Citat: David (Sabljak) A.k.A SABO(T) poslato Jun 13, 2013, 17:23:13 POSLE PODNE
hmm nebi trebalo jer hvata float x,y,z

jel imas port do firme koju si kreirao da provjeris?

Neam zivotami :D a nesto me zbunjuje sa ovom Xi Yi Zi i X Y Z tako da nzm dal treba getplayerpos(Xi,Yi,Zi) ili je Xi,Yi,Zi zlaz iz enterijera nzm
RESPECT: Blaeks, Yui_Sang, Gagi, Kapetan Husein, Luksa, Slay, Denis_Lapi, Zoran(Dude)

Programski jezici koje koristim: C, C#, Visual Basic, HTML, CSS, PHP (tek ucim).


E slusaj 'vako lebovi, nes sam dzarao al samo mi se pojavi 3Dtextlabel na mestu na kom sam kucao /makebiz a ovaj pickup njega nema a sad nasao sam na onim koordinatama znate na onoj farmi kao sto ima njiva msm da su to 0,0,0 koordinate... E i tu mi se kreira nekolko pickupova jedan ispod drugog pa rekoh da nije to nesto sto vam pomogne :P kako da resim i sto se ne pojavi pickup na mestu kucanja /makebiz
RESPECT: Blaeks, Yui_Sang, Gagi, Kapetan Husein, Luksa, Slay, Denis_Lapi, Zoran(Dude)

Programski jezici koje koristim: C, C#, Visual Basic, HTML, CSS, PHP (tek ucim).


Nista aj nema veze uzecu gredijev house system pa cu napraviti system firmi mozes lock posto ovome nema pomoci...
RESPECT: Blaeks, Yui_Sang, Gagi, Kapetan Husein, Luksa, Slay, Denis_Lapi, Zoran(Dude)

Programski jezici koje koristim: C, C#, Visual Basic, HTML, CSS, PHP (tek ucim).