Problem with plowing
#1

hy guys, i have command plowing here is:
Код:
CMD:oranje(playerid, params[])
{
	if(PlayerInfo[playerid][pPosao] != 8) return SCM(playerid, GRAD2, "  (greska) Niste zaposleni kao seljak/farmer!");
	if(hOranje[playerid] != 0) return SCM(playerid, GRAD2, "  (greska) Vec imate aktivirano oranje! (koristite /ponisti)");
	if(hVrsenje[playerid] != 0) return SCM(playerid, GRAD2, "  (greska) Vec imate aktivirano vrsenje! (koristite /ponisti)");
	if(hMleko[playerid] != 0) return SCM(playerid, GRAD2, "  (greska) Vec imate aktiviranu dostavu mleka! (koristite /ponisti)");
	//if(!IsTrailerAttachedToVehicle(GetPlayerVehicleID(playerid))) return SCM(playerid, GRAD2, "(greska) Morate zakaciti plugove!");
	if(GetPlayerVehicleID(playerid) >= Farma[2] && GetPlayerVehicleID(playerid) <= Farma[9])
	{
        hOranje[playerid] = 2;
        SetPlayerCheckpoint(playerid, -126.2096,58.7920,3.0848, 5.0);
        SCM(playerid, ZUTA, "(posao) Aktivirali ste oranje njive.");
        SCM(playerid, LTPINK,  "	Vozite po oznacenim mestima i orite njivu.");
        SCM(playerid, LTPINK,  "	Posle zavrsene voznje dobicete zasluzenu svotu novca za odradjeni posao.");
	}
	else return SCM(playerid, GRAD2, "  (greska) Ne nalazite se u traktoru!");
	return 1;
}
and there is SetPlayerCheckpoint(playerid, -126.2096,58.7920,3.0848, 5.0);

and i added on OnPlayerEnterCheckpoint this:
Код:
 	if(IsPlayerInRangeOfPoint(playerid, 5.0, -126.2096, 58.7920, 3.0848))
    {
        if(hOranje[playerid] == 2 && PlayerInfo[playerid][pPosao] == 8)
        {
            hOranje[playerid] = 3;
            SetPlayerCheckpoint(playerid, -182.9007, -79.6655, 2.6783, 5.0);
        }
    }
    if(IsPlayerInRangeOfPoint(playerid, 5.0, -182.9007, -79.6655, 2.6783))
    {
        if(hOranje[playerid] == 3 && PlayerInfo[playerid][pPosao] == 8)
        {
            hOranje[playerid] = 4;
            SetPlayerCheckpoint(playerid, -226.2186, -80.0838, 2.6790, 5.0);
        }
    }
and when i reach this first check point dont wonna to create new check point...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)