Problem oko ulaz u garazu

Započeo Hunter.#, Jul 26, 2019, 11:37:52 PRE PODNE

prethodna tema - sledeća tema

0 članova i 3 gostiju pregledaju ovu temu.

Problem(error/warning): Stavio sam u garazu da moze da se ulazi kad kliknem SPACE ali ja kliknem jednom i to mi udje i odma samo izadje u cemu je problem?
Deo skripte:
        if(!IsPlayerInAnyVehicle(playerid))
	{
		for(new i; i < MAX_GARAZE; i++)
		{
			if(IsPlayerInRangeOfPoint(playerid, 1.0, GarazaInfo[i][gUlazX], GarazaInfo[i][gUlazY], GarazaInfo[i][gUlazZ]))
			{
				if(PlayerInfo[playerid][pPosedovanjeGaraze] == i || GarazaInfo[i][gZatvoreno] == 0)
    		   	{
    		   	    new idgaraze,fgaraze[80];
			    SetPlayerPos(playerid, GarazaInfo[i][gIzlazX], GarazaInfo[i][gIzlazY], GarazaInfo[i][gIzlazZ]);
			    SetPlayerVirtualWorld(playerid, GarazaInfo[i][gVW]);
			    TogglePlayerControllable(playerid, 0);
			    freeze[playerid] =  SetTimerEx("Freeze",3000, false, "i", playerid);
                 	    format(fgaraze, sizeof(fgaraze), GARAZA_FILE, idgaraze);
        
                }
                else
                {
                    GameTextForPlayer(playerid,"~w~Garaza ~r~zakljucana",5000,3);
                    return 1;
                }
 		 	}
   		 	if(IsPlayerInRangeOfPoint(playerid, 2.0, GarazaInfo[i][gIzlazX], GarazaInfo[i][gIzlazY], GarazaInfo[i][gIzlazZ]) && 
                        GetPlayerVirtualWorld(playerid) == GarazaInfo[i][gVW])
		 	{
				SetPlayerPos(playerid, GarazaInfo[i][gUlazX], GarazaInfo[i][gUlazY], GarazaInfo[i][gUlazZ]);
				SetPlayerVirtualWorld(playerid, 0);
				TogglePlayerControllable(playerid, 0);
			        freeze[playerid] =  SetTimerEx("Freeze",3000, false, "i", playerid);
             	                return 1;
			}
		}
	}
 	if(IsPlayerInAnyVehicle(playerid))
	{
		for(new i; i < MAX_GARAZE; i++)
		{
			if(IsPlayerInRangeOfPoint(playerid, 1.0, GarazaInfo[i][gUlazX], GarazaInfo[i][gUlazY], GarazaInfo[i][gUlazZ]))
			{
				if(PlayerInfo[playerid][pPosedovanjeGaraze] == i || GarazaInfo[i][gZatvoreno] == 0)
    		   	{
    		   	    new idgaraze,fgaraze[80];
			    SetVehiclePos(GetPlayerVehicleID(playerid), GarazaInfo[i][gIzlazX], GarazaInfo[i][gIzlazY], GarazaInfo[i][gIzlazZ]);
			    SetPlayerVirtualWorld(playerid, GarazaInfo[i][gVW]);
			    SetVehicleVirtualWorld(GetPlayerVehicleID(playerid), GarazaInfo[i][gVW]);
			    freeze[playerid] =  SetTimerEx("Freeze",3000, false, "i", playerid);
                 	    format(fgaraze, sizeof(fgaraze), GARAZA_FILE, idgaraze);
    		}
                else
                {
                    GameTextForPlayer(playerid,"~w~Garaza ~r~zakljucana",5000,3);
                    return 1;
                }
			}
   			if(IsPlayerInRangeOfPoint(playerid, 2.0, GarazaInfo[i][gIzlazX], GarazaInfo[i][gIzlazY], GarazaInfo[i][gIzlazZ]) && GetPlayerVirtualWorld(playerid) == GarazaInfo[i][gVW])
			{
				SetVehiclePos(GetPlayerVehicleID(playerid), GarazaInfo[i][gUlazX], GarazaInfo[i][gUlazY], GarazaInfo[i][gUlazZ]);
				SetPlayerVirtualWorld(playerid, 0);
				SetVehicleVirtualWorld(GetPlayerVehicleID(playerid), 0);
				TogglePlayerControllable(playerid, 0);
			        freeze[playerid] =  SetTimerEx("Freeze",3000, false, "i", playerid);
				return 1;
 			}
		}
	}

Debug iz server_log(ukoliko je u pitanju crashanje servera - crashdetect log): NEMA
Slika/video ingame problema(obavezno ako je ingame problem): NEMA
Poslednja Izmena: Jul 26, 2019, 11:42:41 PRE PODNE od Legend..

Probaj da stavis na Y ili neko drugo dugme i je l isto?

credits: Xunder, Ino420, Muma

Citat: Pottus;3903994
SetPlayerPos("dreni1998", 666.666, 666.666, 666.666, 666.666);    ///// GO IN HELL MOTHERFUCKER

https://i.imgur.com/XHLx9oj.gif
https://i.ibb.co/ZJqQKWT/NXRX.gif


Pokusaj da stavis tajmer kad klikne dugme posle 2 sekunde da mu udje u garazu

credits: Xunder, Ino420, Muma

Citat: Pottus;3903994
SetPlayerPos("dreni1998", 666.666, 666.666, 666.666, 666.666);    ///// GO IN HELL MOTHERFUCKER

https://i.imgur.com/XHLx9oj.gif
https://i.ibb.co/ZJqQKWT/NXRX.gif

Citat: âš"️♟ᗪå,ä¹,♟âš"️ poslato Jul 26, 2019, 12:59:25 POSLE PODNE
Pokusaj da stavis tajmer kad klikne dugme posle 2 sekunde da mu udje u garazu
Imam jedan mod Ukleta Kuca na tom modu je imalo system za garazu isto je ovako bilo i tamo kad kliknem SPACE i udjem sve radi normanlo i radio sam isto po to ali ponovo ne radi
Poslednja Izmena: Jul 26, 2019, 13:05:09 POSLE PODNE od Legend..

Joy

*

Da probaš stavit else ispred ovoga:
if(IsPlayerInRangeOfPoint(playerid, 2.0, GarazaInfo[i][gIzlazX], GarazaInfo[i][gIzlazY], GarazaInfo[i][gIzlazZ]) && GetPlayerVirtualWorld(playerid) == GarazaInfo[i][gVW])


Tj. umjesto
if(IsPlayerInRangeOfPoint(playerid, 2.0, GarazaInfo[i][gIzlazX], GarazaInfo[i][gIzlazY], GarazaInfo[i][gIzlazZ]) && GetPlayerVirtualWorld(playerid) == GarazaInfo[i][gVW])
stavit
else if(IsPlayerInRangeOfPoint(playerid, 2.0, GarazaInfo[i][gIzlazX], GarazaInfo[i][gIzlazY], GarazaInfo[i][gIzlazZ]) && GetPlayerVirtualWorld(playerid) == GarazaInfo[i][gVW])


I za vozilo i za onfoot.