Problema Checkpoint
#1

Lo que pasa esque al ir a un checkpoint va todo bien, pero cuando me lanza al siguiente, solo me lanza el siguiente GameTextForPlayer y no se marca en el minimapa el siguiente checkpoint,es en el job de piloto.
Aqui el cуdigo.
Код:
        zcmd(ruta, playerid, params[])
		{
            new idcar = GetPlayerVehicleID(playerid);
             if(Info[playerid][pJob] == 16)
		{
		    if(IsAPiloto(idcar))
		    {
		        if(Plane_Route[playerid] > 0) return SendClientMessageEx(playerid, COLOR_GRAD2, "Ya estбs en ruta!");
                Plane_Route[playerid] = 1;
		        SendClientMessageEx(playerid, COLOR_GRAD2, "Aterriza en los diferentes aereopuertos de San Andreas.");
		        SetPlayerCheckpoint(playerid,1481.7509,1557.6327,11.7434, 15.0);
		        OOCNews(0xCA0065FF, "Aereolнneas de San Andreas - Despegando.");
		        GameTextForPlayer(playerid, "~w~Proximo destino:~n~~r~Aereopuerto de Las venturas", 5000, 1);
		        TogglePlayerControllable(playerid, 1);
		        return 1;
		    }
		    else return SendClientMessageEx(playerid, COLOR_GRAD2, "No estбs en un aviуn!");
		}
		return 1;
     }
Aqui el public
Код:
public OnPlayerEnterCheckpoint(playerid)
{
        new carid = GetPlayerVehicleID(playerid), string[128];
   	    if(Info[playerid][pJob] == 16 && Plane_Route[playerid] > 0)
	{
	    if(!IsPlayerInAnyVehicle(playerid)) { SendClientMessageEx(playerid, COLOR_GRAD2, "No estбs en un aviуn!");  return 1; }
	    if(Plane_Route[playerid] == 1)
	    {
            SetPlayerCheckpoint(playerid, 211.2588,2502.7649,17.4063, 15.0);
	        GameTextForPlayer(playerid, "~w~proximo destino: ~n~~r~Verdant Meadows", 5000, 1);
	        Plane_Route[playerid] = 2;
	    }
	    else if(Plane_Route[playerid] == 2)
	    {
            GameTextForPlayer(playerid, "~w~proximo destino: ~n~~r~san fierro", 5000, 1);
	        Plane_Route[playerid] = 3;
	        SetPlayerCheckpoint(playerid, -1378.8790,113.1982,15.0826, 15.0);
	    }
	    else if(Plane_Route[playerid] == 3)
	    {
            GameTextForPlayer(playerid, "~w~proximo destino: ~n~~r~LAX airport", 5000, 1);
	        Plane_Route[playerid] = 4;
	        SetPlayerCheckpoint(playerid, 2004.8916,-2593.5776,14.4709, 15.0);
	    }
	    else if(Plane_Route[playerid] == 4)
	    {
            GameTextForPlayer(playerid, "~w~estaciona la nave", 5000, 1);
	        Plane_Route[playerid] = 5;
	        SetPlayerCheckpoint(playerid, 1563.2407,-2458.6262,16.6014, 15.0);
	    }
	    else if(Plane_Route[playerid] == 5)
	    {
            GameTextForPlayer(playerid, "~w~final del recorrido~n~~g~250$ ganados", 5000, 1);
	        Plane_Route[playerid] = 0;
	        GivePlayerCash(playerid, 250);
			SetVehicleToRespawn(carid);
			
	    }
   }
Reply
#2

No estoy seguro, pero proba utilizando "DisablePlayerCheckpoint(playerid)" en el principio del callback
Reply
#3

Quote:
Originally Posted by spell
Посмотреть сообщение
No estoy seguro, pero proba utilizando "DisablePlayerCheckpoint(playerid)" en el principio del callback
Eso me faltaba tambien ,ni cuenta me di,pero sigue sin funcionar.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)