[POMOC]/kupifirmu(bug)

Započeo VZ||Skripter||, Jun 08, 2012, 22:28:36 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Ime moda  kojeg koristim:NX
Dio skripte:COMMAND:kupifirmu(playerid, params[])
{
#pragma unused params
new string[ 128 ], stringt[64];
new bouse = PlayerInfo[playerid][pPbiskey];
if( bouse != 255 || PlayerInfo[playerid][pPsbiskey] != 255)
{
SendClientMessage( playerid, WHITE, "Vec posjedujes firmu." );
return 1;
}
if( bouse == 255 || PlayerInfo[playerid][pPsbiskey] == 255)
{
for(new b = 0; b < sizeof(Businesses); b++)
{
    if(IsPlayerInRangeOfPoint( playerid, 5, Businesses[b][bExteriorX], Businesses[b][bExteriorY], Businesses[b][bExteriorZ]) )
    {
        if(strcmp(Businesses[b][bOwner1], "Niko", true) == 0 )
{
if(Businesses[b][bPrice] == -1)
{
    SendClientMessage( playerid, WHITE, "Zao nam je ova firma nije na prodaji." );
}
else
{
    if( GetPlayerCash(playerid) >= Businesses[b][bPrice] && PlayerInfo[playerid][pLevel] >= Businesses[b][bLevel])
    {
new sendername[MAX_PLAYER_NAME];
        GetPlayerName(playerid, sendername, sizeof(sendername));
strmid(Businesses[b][bOwner1], sendername, 0, strlen(sendername), 255);
        GivePlayerCash(playerid, -Businesses[b][bPrice]);
KCijena[playerid] = TextDrawCreate(186.000000, 202.000000, "Kupili ste kucu za: -$");
TextDrawBackgroundColor(KCijena[playerid], 255);
TextDrawFont(KCijena[playerid], 1);
TextDrawLetterSize(KCijena[playerid], 0.600000, 4.199999);
TextDrawColor(KCijena[playerid], -1);
TextDrawSetOutline(KCijena[playerid], 1);
TextDrawSetProportional(KCijena[playerid], 1);
format( stringt, sizeof( stringt ), "~y~Kupili ste firmu za: ~g~%d$", Businesses[b][bPrice]);
TextDrawSetString(KCijena[playerid], stringt);
TextDrawShowForPlayer(playerid, Cestitka);
TextDrawShowForPlayer(playerid, KCijena[playerid]);
SetTimerEx("UnistikucaTxT",8000, false, "i", playerid);
        PlayerInfo[playerid][pPbiskey] = b;
Businesses[b][bOwnedd] = 1;
OnPropTextdrawUpdate();
SacuvajIgraca(playerid);
SaveBusiness( b );

  if(Businesses[b][bType] == 1)
{
ShowPlayerDialog(playerid, PRODAVNICAMENU, DIALOG_STYLE_LIST, "{FF0000}Odaberi Interijer - {FFFF00}24/7 Supermarket","{0080C0}Interijer 1\n{0080C0}Interijer 2\n{0080C0}Interijer 3", "Odaberi", "Ponisti");
return 1;
}
if(Businesses[b][bType] == 2)
{
ShowPlayerDialog(playerid, CLOTHMENU, DIALOG_STYLE_LIST, "Odaberi interijer - {FFFF00}Clothes Shop","{0080C0}Binco\n{0080C0}Didier Sachs\n{0080C0}Sub Urban\n{0080C0}Victim \n{0080C0}ZIP", "Odaberi", "Ponisti");
return 1;
}
if(Businesses[b][bType] == 7)
{
ShowPlayerDialog(playerid, 4891, DIALOG_STYLE_LIST, "{FF0000}Odaberi Interijer - {FFFF00}Gun Shop","{0080C0}Interijer 1\n{0080C0}Interijer 2\n{0080C0}Interijer 3\n{0080C0}Interijer 4", "Odaberi", "Ponisti");
return 1;
}
if(Businesses[b][bType] == 10)
{
ShowPlayerDialog(playerid, 5105, DIALOG_STYLE_LIST, "{FF0000}Odaberi Interijer - {FFFF00}Teretana","{0080C0}Interijer 1\n{0080C0}Interijer 2\n{0080C0}Interijer 3", "Odaberi", "Ponisti");
return 1;
}
if(Businesses[b][bType] == 3)
{
ShowPlayerDialog(playerid, 8504, DIALOG_STYLE_LIST, "{FF0000}Odaberi Interijer - Kafana","{0080C0}Interijer 1\n{0080C0}Interijer 2\n{0080C0}Interijer 3", "Odaberi", "Ponisti");
return 1;
}
if(Businesses[b][bType] == 4)
{
ShowPlayerDialog(playerid, 8958, DIALOG_STYLE_LIST, "{FF0000}Odaberi Interijer - {FFFF00}Restoran","{0080C0}Interijer 1\n{0080C0}Interijer 2", "Odaberi", "Ponisti");
return 1;
}
if(Businesses[b][bType] == 5)
{
Businesses[b][bInteriorX] = - 100.42053222656;
Businesses[b][bInteriorY] = -24.546438217163;
Businesses[b][bInteriorZ] = 1000.71875;
Businesses[b][bInteriorID] = 3;
SaveBusiness( b );
return 1;
}
if(Businesses[b][bType] == 6)
{
Businesses[b][bInteriorX] = 363.72998046875;
Businesses[b][bInteriorY] = -74.745864868164;
Businesses[b][bInteriorZ] = 1001.5078125;
Businesses[b][bInteriorID] = 10;
SaveBusiness( b );
return 1;
}
if(Businesses[b][bType] == 8)
{
Businesses[b][bInteriorX] = 365.03305053711;
Businesses[b][bInteriorY] = -11.412439346313;
Businesses[b][bInteriorZ] = 1001.8515625;
Businesses[b][bInteriorID] = 9;
SaveBusiness( b );
return 1;
}
if(Businesses[b][bType] == 9)
{
Businesses[b][bInteriorX] = 493.4958190918;
Businesses[b][bInteriorY] = -24.089570999146;
Businesses[b][bInteriorZ] = 1000.6796875;
Businesses[b][bInteriorID] = 17;
SaveBusiness( b );
return 1;
}
        SaveBusiness( b );

    }
    else
    {
        SendClientMessage( playerid, WHITE, "Nemas dovoljno novca da kupis ovu firmu ili nemas dovoljno veliki level." );
    }
    }
}
    }
}
for(new b = 0; b < sizeof(SBusinesses); b++)
{
    if(IsPlayerInRangeOfPoint( playerid, 5, SBusinesses[b][sbExteriorX], SBusinesses[b][sbExteriorY], SBusinesses[b][sbExteriorZ]) )
    {
        if(strcmp(SBusinesses[b][sbOwner1], "Niko", true) == 0 )
{
if(SBusinesses[b][sbPrice] == -1)
{
    SendClientMessage( playerid, WHITE, "Zao nam je ova firma nije na prodaji." );
}
else
{
    if( GetPlayerCash(playerid) >= SBusinesses[b][sbPrice] && PlayerInfo[playerid][pLevel] >= SBusinesses[b][sbLevel])
    {
new sendername[MAX_PLAYER_NAME];
KCijena[playerid] = TextDrawCreate(186.000000, 202.000000, "Kupili ste kucu za: -$");
TextDrawBackgroundColor(KCijena[playerid], 255);
TextDrawFont(KCijena[playerid], 1);
TextDrawLetterSize(KCijena[playerid], 0.600000, 4.199999);
TextDrawColor(KCijena[playerid], -1);
TextDrawSetOutline(KCijena[playerid], 1);
TextDrawSetProportional(KCijena[playerid], 1);
format( stringt, sizeof( stringt ), "~y~Kupili ste firmu za: ~g~%d$", SBusinesses[b][sbPrice]);
TextDrawSetString(KCijena[playerid], stringt);
TextDrawShowForPlayer(playerid, Cestitka);
TextDrawShowForPlayer(playerid, KCijena[playerid]);
        GetPlayerName(playerid, sendername, sizeof(sendername));
strmid(SBusinesses[b][sbOwner1], sendername, 0, strlen(sendername), 255);
        GivePlayerCash(playerid, -SBusinesses[b][sbPrice]);
        format( string, sizeof( string ), "Cestitamo! Sada ste vlasnik: %s.", SBusinesses[b][sbName] );
SetTimerEx("UnistikucaTxT",8000, false, "i", playerid);
        SendClientMessage( playerid, ANNOUNCEMENT, string);
        PlayerInfo[playerid][pPsbiskey] = b;
SBusinesses[b][sbOwnedd] = 1;
OnPropTextdrawUpdate();
SacuvajIgraca(playerid);
SaveSBusiness( b );
    }
    else
    {
        SendClientMessage( playerid, WHITE, "Nemas dovoljno novca da kupis ovu firmu ili nemas dovoljno veliki level." );
    }
    }
}
else
{
    SendClientMessage( playerid, WHITE, "Zao nam je ova firma nije na prodaji!" );
}
    }
}
}
return 1;
}

Problem:Eh sada imam problem kada neku firmu mislim to su rentovi itd.. neke firme  nisu sve

pise mi Zao nam je ova firma nije na prodaji mozetel mi pomoci jer imam super mod al nece da radi to molim vas da popravite to mozda ja znam ali neda mi se imam vaznijeg posla popravljat druge bugove a ne taj ako mozete brzo...
Trazite skriptera !! Na pravom ste mjestu!! Samo mi posaljite PM i javim vam se naj brze !!!

Jeftine cjene :)

Jel ti ne vidis sta pise u opisu ovog PDFa?
Prijava smodu !