Pomoc oko AutoSalona


Započeo c0x, Maj 07, 2019, 00:03:26 PRE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

c0x

*

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:
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

02

*

Pokusaj ovo i vidi hoce li izbaciti u server logu  DEBUG - Igrac je kliknuo textdraw kupi

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.
002

c0x

*

Citat: 02 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

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..