PARTNERI:

* Marketing

-UPOZORENJE-

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


Autor Tema: [Pomoć] Pomoc oko AutoSalona  (Pročitano 64 puta)

0 članova i 1 gost pregledaju ovu temu.

Van mreže c0x

Pomoc oko AutoSalona
« poslato: Maj 07, 2019, 00:03:26 pre podne »
Problem(error/warning): Ovako, otvorio sam server da testiramo sve bugove i sve sa prijateljima... I sada ja otisao u salon kupio sebi auto i sve je ok.. A drug kad je dosao da kupi auto, kuca /katalog izbaci mu kategorije, izabere, i kad treba da klikne na "kupi" njemu ne reaguje nista.. Pa napravim bratu acc i on ne moze da kupi, isti slucaj.. Udjem ponovo na moj acc nick "Cox" onda je sve u redu, znaci moze da lista vozila i sve ali kad treba da klikne "Kupi" ili "Odustani" onda ne reaguje.. Ako mozes pomoc sto pre.. Hvala :)
Deo skripte:
Pawno Code: [Izaberi]
new Text:Autosalon7[BROJ_SLOTOVA] = {Text:INVALID_TEXT_DRAW, ...};
new Text:Autosalon8[BROJ_SLOTOVA] = {Text:INVALID_TEXT_DRAW, ...};
tdAutosalon7,
tdAutosalon8,
else if(clickedid == Autosalon7[playerid])// AUTOSALON - KUPI
{
if(BiraVozilo[playerid] > 0 && BiraHaCe[playerid] == 0)
{
    SPD(playerid, 222, DIALOG_STYLE_LIST, "Kupovina vozila", "Plati novcem\nPlati GOLD-om", "Odaberi", "Nazad");
}
if(BiraVozilo[playerid] > 0 && BiraHaCe[playerid] > 0)
{
    SPD(playerid, 320, DIALOG_STYLE_LIST, "Kupovina HC", "Plati novcem\nPlati GOLD-om", "Odaberi", "Nazad");
}
}
else if(clickedid == Autosalon8[playerid])// AUTOSALON - ODUSTANI
{
if(BiraVozilo[playerid] > 0 && BiraVozilo[playerid] < 7 && BiraHaCe[playerid] == 0)
{
SetPlayerPos_H(playerid, 1584.3516,-1247.8795,17.5806);
    SetCameraBehindPlayer(playerid);
h_TogglePlayerControllable(playerid, 1);
    AutosalonTD(playerid, 0);
BiraVozilo[playerid] = 0;
BiraHaCe[playerid] = 0;
SetPlayerVirtualWorld(playerid, 0);
SetPlayerInterior(playerid, 0);
DestroyVehicle(IzlozbenoVozilo[playerid]);
CancelSelectTextDraw(playerid);
////KratkiStats(playerid, 1);
}
if(BiraVozilo[playerid] > 0 && BiraHaCe[playerid] > 0)
{
    SetPlayerPos_H(playerid, -1656.9479,1210.0630,7.2500);
    SetPlayerFacingAngle(playerid, 249.2160);
    SetCameraBehindPlayer(playerid);
h_TogglePlayerControllable(playerid, 1);
    AutosalonTD(playerid, 0);
BiraVozilo[playerid] = 0;
BiraHaCe[playerid] = 0;
SetPlayerVirtualWorld(playerid, 0);
SetPlayerInterior(playerid, 0);
DestroyVehicle(IzlozbenoVozilo[playerid]);
CancelSelectTextDraw(playerid);
////KratkiStats(playerid, 1);
}
if(BiraVozilo[playerid] == 7 && BiraHaCe[playerid] == 0)//marmun
{
    SetPlayerPos_H(playerid, 1868.9415,-2284.3955,13.5469);
    SetPlayerFacingAngle(playerid, 249.2160);
    SetCameraBehindPlayer(playerid);
h_TogglePlayerControllable(playerid, 1);
    AutosalonTD(playerid, 0);
BiraVozilo[playerid] = 0;
BiraHaCe[playerid] = 0;
SetPlayerVirtualWorld(playerid, 0);
SetPlayerInterior(playerid, 0);
DestroyVehicle(IzlozbenoVozilo[playerid]);
CancelSelectTextDraw(playerid);
////KratkiStats(playerid, 1);
}
if(BiraVozilo[playerid] == 8 && BiraHaCe[playerid] == 0)//marmun
{
    SetPlayerPos_H(playerid, 1368.3949,-1899.2482,13.6037);
    SetPlayerFacingAngle(playerid, 249.2160);
    SetCameraBehindPlayer(playerid);
h_TogglePlayerControllable(playerid, 1);
    AutosalonTD(playerid, 0);
BiraVozilo[playerid] = 0;
BiraHaCe[playerid] = 0;
SetPlayerVirtualWorld(playerid, 0);
SetPlayerInterior(playerid, 0);
DestroyVehicle(IzlozbenoVozilo[playerid]);
CancelSelectTextDraw(playerid);
////KratkiStats(playerid, 1);
}
if(BiraVozilo[playerid] == 9 && BiraHaCe[playerid] == 0)//marmun
{
    SetPlayerPos_H(playerid, -75.1918,-1573.7819,2.6900);
    SetPlayerFacingAngle(playerid, 249.2160);
    SetCameraBehindPlayer(playerid);
h_TogglePlayerControllable(playerid, 1);
    AutosalonTD(playerid, 0);
BiraVozilo[playerid] = 0;
BiraHaCe[playerid] = 0;
SetPlayerVirtualWorld(playerid, 0);
SetPlayerInterior(playerid, 0);
DestroyVehicle(IzlozbenoVozilo[playerid]);
CancelSelectTextDraw(playerid);
////KratkiStats(playerid, 1);
}
if(BiraVozilo[playerid] == 10 && BiraHaCe[playerid] == 0)//marmun
{
    SetPlayerPos_H(playerid, 1296.6454,-1869.5609,14.3170);
    SetPlayerFacingAngle(playerid, 249.2160);
    SetCameraBehindPlayer(playerid);
h_TogglePlayerControllable(playerid, 1);
    AutosalonTD(playerid, 0);
BiraVozilo[playerid] = 0;
BiraHaCe[playerid] = 0;
SetPlayerVirtualWorld(playerid, 0);
SetPlayerInterior(playerid, 0);
DestroyVehicle(IzlozbenoVozilo[playerid]);
CancelSelectTextDraw(playerid);
////KratkiStats(playerid, 1);
}
}

if(TDInfo[playerid][tdAutosalon7] == 0)
    {
            Autosalon7[playerid] = TextDrawCreate(520.000000, 268.000000, "~y~~h~kupi");
TextDrawBackgroundColor(Autosalon7[playerid], 255);
TextDrawFont(Autosalon7[playerid], 3);
TextDrawLetterSize(Autosalon7[playerid], 0.400000, 1.100000);
TextDrawColor(Autosalon7[playerid], -1);
TextDrawSetOutline(Autosalon7[playerid], 1);
TextDrawSetProportional(Autosalon7[playerid], 1);
TextDrawSetSelectable(Autosalon7[playerid], 1);
    TDInfo[playerid][tdAutosalon7] = 1;
    }
    if(TDInfo[playerid][tdAutosalon8] == 0)
    {
Autosalon8[playerid] = TextDrawCreate(573.000000, 268.000000, "~r~~h~~h~~h~odustani");
TextDrawBackgroundColor(Autosalon8[playerid], 255);
TextDrawFont(Autosalon8[playerid], 3);
TextDrawLetterSize(Autosalon8[playerid], 0.400000, 1.100000);
TextDrawColor(Autosalon8[playerid], -1);
TextDrawSetOutline(Autosalon8[playerid], 1);
TextDrawSetProportional(Autosalon8[playerid], 1);
TextDrawSetSelectable(Autosalon8[playerid], 1);
    TDInfo[playerid][tdAutosalon8] = 1;
    }
Debug iz server_log(ukoliko je u pitanju crashanje servera - crashdetect log): Nema
Respect: [email protected] - Basovski - Xunder
"Nista nije tako lose, da ne moze biti gore."

 

Van mreže 02

Odg: Pomoc oko AutoSalona
« Odgovor #1 poslato: Maj 07, 2019, 00:17:47 pre podne »
Pokusaj ovo i vidi hoce li izbaciti u server logu  DEBUG - Igrac je kliknuo textdraw kupi

Pawno Code: [Izaberi]
else if(clickedid == Autosalon7[playerid])// AUTOSALON - KUPI
{
if(BiraVozilo[playerid] > 0 && BiraHaCe[playerid] == 0)
{
    SPD(playerid, 222, DIALOG_STYLE_LIST, "Kupovina vozila", "Plati novcem\nPlati GOLD-om", "Odaberi", "Nazad");
}
if(BiraVozilo[playerid] > 0 && BiraHaCe[playerid] > 0)
{
    SPD(playerid, 320, DIALOG_STYLE_LIST, "Kupovina HC", "Plati novcem\nPlati GOLD-om", "Odaberi", "Nazad");
}
}
else if(clickedid == Autosalon8[playerid])// AUTOSALON - ODUSTANI
{
if(BiraVozilo[playerid] > 0 && BiraVozilo[playerid] < 7 && BiraHaCe[playerid] == 0)
{
SetPlayerPos_H(playerid, 1584.3516,-1247.8795,17.5806);
    SetCameraBehindPlayer(playerid);
h_TogglePlayerControllable(playerid, 1);
    AutosalonTD(playerid, 0);
BiraVozilo[playerid] = 0;
BiraHaCe[playerid] = 0;
SetPlayerVirtualWorld(playerid, 0);
SetPlayerInterior(playerid, 0);
DestroyVehicle(IzlozbenoVozilo[playerid]);
CancelSelectTextDraw(playerid);
////KratkiStats(playerid, 1);
}
if(BiraVozilo[playerid] > 0 && BiraHaCe[playerid] > 0)
{
    SetPlayerPos_H(playerid, -1656.9479,1210.0630,7.2500);
    SetPlayerFacingAngle(playerid, 249.2160);
    SetCameraBehindPlayer(playerid);
h_TogglePlayerControllable(playerid, 1);
    AutosalonTD(playerid, 0);
BiraVozilo[playerid] = 0;
BiraHaCe[playerid] = 0;
SetPlayerVirtualWorld(playerid, 0);
SetPlayerInterior(playerid, 0);
DestroyVehicle(IzlozbenoVozilo[playerid]);
CancelSelectTextDraw(playerid);
////KratkiStats(playerid, 1);
}
if(BiraVozilo[playerid] == 7 && BiraHaCe[playerid] == 0)//marmun
{
    SetPlayerPos_H(playerid, 1868.9415,-2284.3955,13.5469);
    SetPlayerFacingAngle(playerid, 249.2160);
    SetCameraBehindPlayer(playerid);
h_TogglePlayerControllable(playerid, 1);
    AutosalonTD(playerid, 0);
BiraVozilo[playerid] = 0;
BiraHaCe[playerid] = 0;
SetPlayerVirtualWorld(playerid, 0);
SetPlayerInterior(playerid, 0);
DestroyVehicle(IzlozbenoVozilo[playerid]);
CancelSelectTextDraw(playerid);
////KratkiStats(playerid, 1);
}
if(BiraVozilo[playerid] == 8 && BiraHaCe[playerid] == 0)//marmun
{
    SetPlayerPos_H(playerid, 1368.3949,-1899.2482,13.6037);
    SetPlayerFacingAngle(playerid, 249.2160);
    SetCameraBehindPlayer(playerid);
h_TogglePlayerControllable(playerid, 1);
    AutosalonTD(playerid, 0);
BiraVozilo[playerid] = 0;
BiraHaCe[playerid] = 0;
SetPlayerVirtualWorld(playerid, 0);
SetPlayerInterior(playerid, 0);
DestroyVehicle(IzlozbenoVozilo[playerid]);
CancelSelectTextDraw(playerid);
////KratkiStats(playerid, 1);
}
if(BiraVozilo[playerid] == 9 && BiraHaCe[playerid] == 0)//marmun
{
    SetPlayerPos_H(playerid, -75.1918,-1573.7819,2.6900);
    SetPlayerFacingAngle(playerid, 249.2160);
    SetCameraBehindPlayer(playerid);
h_TogglePlayerControllable(playerid, 1);
    AutosalonTD(playerid, 0);
BiraVozilo[playerid] = 0;
BiraHaCe[playerid] = 0;
SetPlayerVirtualWorld(playerid, 0);
SetPlayerInterior(playerid, 0);
DestroyVehicle(IzlozbenoVozilo[playerid]);
CancelSelectTextDraw(playerid);
////KratkiStats(playerid, 1);
}
if(BiraVozilo[playerid] == 10 && BiraHaCe[playerid] == 0)//marmun
{
    SetPlayerPos_H(playerid, 1296.6454,-1869.5609,14.3170);
    SetPlayerFacingAngle(playerid, 249.2160);
    SetCameraBehindPlayer(playerid);
h_TogglePlayerControllable(playerid, 1);
    AutosalonTD(playerid, 0);
BiraVozilo[playerid] = 0;
BiraHaCe[playerid] = 0;
SetPlayerVirtualWorld(playerid, 0);
SetPlayerInterior(playerid, 0);
DestroyVehicle(IzlozbenoVozilo[playerid]);
CancelSelectTextDraw(playerid);
////KratkiStats(playerid, 1);
}
        print("DEBUG - Igrac je kliknuo textdraw kupi");
}

if(TDInfo[playerid][tdAutosalon7] == 0)
    {
            Autosalon7[playerid] = TextDrawCreate(520.000000, 268.000000, "~y~~h~kupi");
TextDrawBackgroundColor(Autosalon7[playerid], 255);
TextDrawFont(Autosalon7[playerid], 3);
TextDrawLetterSize(Autosalon7[playerid], 0.400000, 1.100000);
TextDrawColor(Autosalon7[playerid], -1);
TextDrawSetOutline(Autosalon7[playerid], 1);
TextDrawSetProportional(Autosalon7[playerid], 1);
TextDrawSetSelectable(Autosalon7[playerid], 1);
    TDInfo[playerid][tdAutosalon7] = 1;
    }
    if(TDInfo[playerid][tdAutosalon8] == 0)
    {
Autosalon8[playerid] = TextDrawCreate(573.000000, 268.000000, "~r~~h~~h~~h~odustani");
TextDrawBackgroundColor(Autosalon8[playerid], 255);
TextDrawFont(Autosalon8[playerid], 3);
TextDrawLetterSize(Autosalon8[playerid], 0.400000, 1.100000);
TextDrawColor(Autosalon8[playerid], -1);
TextDrawSetOutline(Autosalon8[playerid], 1);
TextDrawSetProportional(Autosalon8[playerid], 1);
TextDrawSetSelectable(Autosalon8[playerid], 1);
    TDInfo[playerid][tdAutosalon8] = 1;
    }
Ukoliko ti bude izbacilo taj text znaci da ti je problem do funkcije ako ne onda ti uopste nije ocitalo da je igrac kliknuo td.
 

Van mreže c0x

Odg: Pomoc oko AutoSalona
« Odgovor #2 poslato: Maj 07, 2019, 12:49:42 posle podne »
Pokusaj ovo i vidi hoce li izbaciti u server logu  DEBUG - Igrac je kliknuo textdraw kupi

Pawno Code: [Izaberi]
else if(clickedid == Autosalon7[playerid])// AUTOSALON - KUPI
{
if(BiraVozilo[playerid] > 0 && BiraHaCe[playerid] == 0)
{
    SPD(playerid, 222, DIALOG_STYLE_LIST, "Kupovina vozila", "Plati novcem\nPlati GOLD-om", "Odaberi", "Nazad");
}
if(BiraVozilo[playerid] > 0 && BiraHaCe[playerid] > 0)
{
    SPD(playerid, 320, DIALOG_STYLE_LIST, "Kupovina HC", "Plati novcem\nPlati GOLD-om", "Odaberi", "Nazad");
}
}
else if(clickedid == Autosalon8[playerid])// AUTOSALON - ODUSTANI
{
if(BiraVozilo[playerid] > 0 && BiraVozilo[playerid] < 7 && BiraHaCe[playerid] == 0)
{
SetPlayerPos_H(playerid, 1584.3516,-1247.8795,17.5806);
    SetCameraBehindPlayer(playerid);
h_TogglePlayerControllable(playerid, 1);
    AutosalonTD(playerid, 0);
BiraVozilo[playerid] = 0;
BiraHaCe[playerid] = 0;
SetPlayerVirtualWorld(playerid, 0);
SetPlayerInterior(playerid, 0);
DestroyVehicle(IzlozbenoVozilo[playerid]);
CancelSelectTextDraw(playerid);
////KratkiStats(playerid, 1);
}
if(BiraVozilo[playerid] > 0 && BiraHaCe[playerid] > 0)
{
    SetPlayerPos_H(playerid, -1656.9479,1210.0630,7.2500);
    SetPlayerFacingAngle(playerid, 249.2160);
    SetCameraBehindPlayer(playerid);
h_TogglePlayerControllable(playerid, 1);
    AutosalonTD(playerid, 0);
BiraVozilo[playerid] = 0;
BiraHaCe[playerid] = 0;
SetPlayerVirtualWorld(playerid, 0);
SetPlayerInterior(playerid, 0);
DestroyVehicle(IzlozbenoVozilo[playerid]);
CancelSelectTextDraw(playerid);
////KratkiStats(playerid, 1);
}
if(BiraVozilo[playerid] == 7 && BiraHaCe[playerid] == 0)//marmun
{
    SetPlayerPos_H(playerid, 1868.9415,-2284.3955,13.5469);
    SetPlayerFacingAngle(playerid, 249.2160);
    SetCameraBehindPlayer(playerid);
h_TogglePlayerControllable(playerid, 1);
    AutosalonTD(playerid, 0);
BiraVozilo[playerid] = 0;
BiraHaCe[playerid] = 0;
SetPlayerVirtualWorld(playerid, 0);
SetPlayerInterior(playerid, 0);
DestroyVehicle(IzlozbenoVozilo[playerid]);
CancelSelectTextDraw(playerid);
////KratkiStats(playerid, 1);
}
if(BiraVozilo[playerid] == 8 && BiraHaCe[playerid] == 0)//marmun
{
    SetPlayerPos_H(playerid, 1368.3949,-1899.2482,13.6037);
    SetPlayerFacingAngle(playerid, 249.2160);
    SetCameraBehindPlayer(playerid);
h_TogglePlayerControllable(playerid, 1);
    AutosalonTD(playerid, 0);
BiraVozilo[playerid] = 0;
BiraHaCe[playerid] = 0;
SetPlayerVirtualWorld(playerid, 0);
SetPlayerInterior(playerid, 0);
DestroyVehicle(IzlozbenoVozilo[playerid]);
CancelSelectTextDraw(playerid);
////KratkiStats(playerid, 1);
}
if(BiraVozilo[playerid] == 9 && BiraHaCe[playerid] == 0)//marmun
{
    SetPlayerPos_H(playerid, -75.1918,-1573.7819,2.6900);
    SetPlayerFacingAngle(playerid, 249.2160);
    SetCameraBehindPlayer(playerid);
h_TogglePlayerControllable(playerid, 1);
    AutosalonTD(playerid, 0);
BiraVozilo[playerid] = 0;
BiraHaCe[playerid] = 0;
SetPlayerVirtualWorld(playerid, 0);
SetPlayerInterior(playerid, 0);
DestroyVehicle(IzlozbenoVozilo[playerid]);
CancelSelectTextDraw(playerid);
////KratkiStats(playerid, 1);
}
if(BiraVozilo[playerid] == 10 && BiraHaCe[playerid] == 0)//marmun
{
    SetPlayerPos_H(playerid, 1296.6454,-1869.5609,14.3170);
    SetPlayerFacingAngle(playerid, 249.2160);
    SetCameraBehindPlayer(playerid);
h_TogglePlayerControllable(playerid, 1);
    AutosalonTD(playerid, 0);
BiraVozilo[playerid] = 0;
BiraHaCe[playerid] = 0;
SetPlayerVirtualWorld(playerid, 0);
SetPlayerInterior(playerid, 0);
DestroyVehicle(IzlozbenoVozilo[playerid]);
CancelSelectTextDraw(playerid);
////KratkiStats(playerid, 1);
}
        print("DEBUG - Igrac je kliknuo textdraw kupi");
}

if(TDInfo[playerid][tdAutosalon7] == 0)
    {
            Autosalon7[playerid] = TextDrawCreate(520.000000, 268.000000, "~y~~h~kupi");
TextDrawBackgroundColor(Autosalon7[playerid], 255);
TextDrawFont(Autosalon7[playerid], 3);
TextDrawLetterSize(Autosalon7[playerid], 0.400000, 1.100000);
TextDrawColor(Autosalon7[playerid], -1);
TextDrawSetOutline(Autosalon7[playerid], 1);
TextDrawSetProportional(Autosalon7[playerid], 1);
TextDrawSetSelectable(Autosalon7[playerid], 1);
    TDInfo[playerid][tdAutosalon7] = 1;
    }
    if(TDInfo[playerid][tdAutosalon8] == 0)
    {
Autosalon8[playerid] = TextDrawCreate(573.000000, 268.000000, "~r~~h~~h~~h~odustani");
TextDrawBackgroundColor(Autosalon8[playerid], 255);
TextDrawFont(Autosalon8[playerid], 3);
TextDrawLetterSize(Autosalon8[playerid], 0.400000, 1.100000);
TextDrawColor(Autosalon8[playerid], -1);
TextDrawSetOutline(Autosalon8[playerid], 1);
TextDrawSetProportional(Autosalon8[playerid], 1);
TextDrawSetSelectable(Autosalon8[playerid], 1);
    TDInfo[playerid][tdAutosalon8] = 1;
    }
Ukoliko ti bude izbacilo taj text znaci da ti je problem do funkcije ako ne onda ti uopste nije ocitalo da je igrac kliknuo td.

Brate, dodao sam ovo i udjem na bratov ACC i kupim auto sve ok, u server_logu ne ispisuje nista.. Videcu kad dodju prijatelji pa da probam sa njima... Ali za sada radi.. Hvala ti..
Respect: [email protected] - Basovski - Xunder
"Nista nije tako lose, da ne moze biti gore."