[pomoc]Bug sa poslom

Započeo dane_1, Januar 04, 2012, 23:42:14 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Skripta koju koristim:LARP
Detaljan opis problema:Znaci pravio sam svoj posao gradevinara,komanda /work i dobro krene znaci stavi mu prvi CP ali dalje nece..Evo sto sam koristio..
Dio skripte:

if(PlayerIsVozib[playerid] == 1)
{
if(IsPlayerInRangeOfPoint(playerid,5.2,2848.3582,-2181.7900,6.3902))
{
DisablePlayerCheckpoint(playerid);
PlayerIsVozib[playerid] = 2;
    SetPlayerCheckpoint(playerid, 2841.9373,-2144.3010,8.8989,5);
}
}
if(PlayerIsVozib[playerid] == 2)
{
if(IsPlayerInRangeOfPoint(playerid,5.2,2841.9373,-2144.3010,8.8989))
{
    DisablePlayerCheckpoint(playerid);
    PlayerIsVozib[playerid] = 3;
    SetPlayerCheckpoint(playerid, 2837.0498,-2177.3713,10.8271,5);
}
}
if(PlayerIsVozib[playerid] == 3)
{
if(IsPlayerInRangeOfPoint(playerid,5.2,2837.0498,-2177.3713,10.8271))
{
    DisablePlayerCheckpoint(playerid);
PlayerIsVozib[playerid] = 4;
    SetPlayerCheckpoint(playerid, 2832.4480,-2140.4182,11.3788,5);
}
}
if(PlayerIsVozib[playerid] == 4)
{
if(IsPlayerInRangeOfPoint(playerid,5.2,2832.4480,-2140.4182,11.3788))
{
    DisablePlayerCheckpoint(playerid);
PlayerIsVozib[playerid] = 5;
    SetPlayerCheckpoint(playerid, 2830.9219,-2174.0139,11.3617,5);
}
}
if(PlayerIsVozib[playerid] == 5)
{
if(IsPlayerInRangeOfPoint(playerid,5.2,2830.9219,-2174.0139,11.3617))
{
    DisablePlayerCheckpoint(playerid);
    PlayerIsVozib[playerid] = 6;
    SetPlayerCheckpoint(playerid, 2831.4207,-2150.7180,10.2734,5);
}
} if(PlayerIsVozib[playerid] == 6)
{
if(IsPlayerInRangeOfPoint(playerid,5.2,2824.8943,-2232.8936,1.9691))
{
    new cash=(random(100)+5);
    DisablePlayerCheckpoint(playerid);
        SendClientMessage(playerid, COLOR_LIGHTBLUE, "==============================================");
        SendClientMessage(playerid, COLOR_LIGHTBLUE, " ** Zavrsio si sa ravnanjem,dobio si  $%d ! " , cash);
        SafeGivePlayerMoney(playerid, cash);
}
}

if(!strcmp(cmdtext, "/work", true))
    {
if(IsPlayerConnected(playerid))
{
    if(PlayerInfo[playerid][pJob] != 24)
    {
        SendClientMessage(playerid, COLOR_GREY, "   Nisi Gradjevinar ! ");
        return 1;
    }
    if(PlayerIsVozib[playerid] == 1)
    {
        SendClientMessage(playerid, COLOR_GREY, "   Vec si na poslu ! ");
        return 1;
    }
    if(JobDuty[playerid] == 0)
    {
        SendClientMessage(playerid, COLOR_GREY, "   Nemas Skin Gradjevinara ! ");
        return 1;
    }
    if(IsABager(idcar))
    {
        PlayerIsVozib[playerid] = 1;
        TogglePlayerControllable(playerid, 1);
        SetPlayerCheckpoint(playerid, 2848.3582,-2181.7900,6.3902, 5.0);
        SendClientMessage(playerid, COLOR_LIGHTBLUE, "INFO:Zapoceo si posao na gradilistu.Poravnaj bagerom ovaj teren.");
new y, m, d;
new h,mi,s;
getdate(y,m,d);
gettime(h,mi,s);
format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s [CMD] -> /work",d,m,y,h,mi,s,sendername);
CommandLog(string);
            }

}
return 1;
    }


Znaci to sam koristio,kad krenem komanda /work,krene znaci pokaze prvi cp kao sto pise u komandi /work ali kad udem u taj cp nece da nastave sljedeci cpovi..

Citat: dane_1 poslato Januar 04, 2012, 23:42:14 POSLE PODNE

if(PlayerIsVozib[playerid] == 1)
{
if(IsPlayerInRangeOfPoint(playerid,5.2,2848.3582,-2181.7900,6.3902))
{
DisablePlayerCheckpoint(playerid);
PlayerIsVozib[playerid] = 2;
    SetPlayerCheckpoint(playerid, 2841.9373,-2144.3010,8.8989,5);
}
}
if(PlayerIsVozib[playerid] == 2)
{
if(IsPlayerInRangeOfPoint(playerid,5.2,2841.9373,-2144.3010,8.8989))
{
    DisablePlayerCheckpoint(playerid);
    PlayerIsVozib[playerid] = 3;
    SetPlayerCheckpoint(playerid, 2837.0498,-2177.3713,10.8271,5);
}
}
if(PlayerIsVozib[playerid] == 3)
{
if(IsPlayerInRangeOfPoint(playerid,5.2,2837.0498,-2177.3713,10.8271))
{
    DisablePlayerCheckpoint(playerid);
PlayerIsVozib[playerid] = 4;
    SetPlayerCheckpoint(playerid, 2832.4480,-2140.4182,11.3788,5);
}
}
if(PlayerIsVozib[playerid] == 4)
{
if(IsPlayerInRangeOfPoint(playerid,5.2,2832.4480,-2140.4182,11.3788))
{
    DisablePlayerCheckpoint(playerid);
PlayerIsVozib[playerid] = 5;
    SetPlayerCheckpoint(playerid, 2830.9219,-2174.0139,11.3617,5);
}
}
if(PlayerIsVozib[playerid] == 5)
{
if(IsPlayerInRangeOfPoint(playerid,5.2,2830.9219,-2174.0139,11.3617))
{
    DisablePlayerCheckpoint(playerid);
    PlayerIsVozib[playerid] = 6;
    SetPlayerCheckpoint(playerid, 2831.4207,-2150.7180,10.2734,5);
}
} if(PlayerIsVozib[playerid] == 6)
{
if(IsPlayerInRangeOfPoint(playerid,5.2,2824.8943,-2232.8936,1.9691))
{
    new cash=(random(100)+5);
    DisablePlayerCheckpoint(playerid);
        SendClientMessage(playerid, COLOR_LIGHTBLUE, "==============================================");
        SendClientMessage(playerid, COLOR_LIGHTBLUE, " ** Zavrsio si sa ravnanjem,dobio si  $%d ! " , cash);
        SafeGivePlayerMoney(playerid, cash);
}
}


Prvo, ovo if(IsPlayerInRangeOfPoint(playerid,5.2,2824.8943,-2232.8936,1.9691)) ti je bespotrebno, on nemoze da udje u CP a da se nenalazi u njemu... ili si to radio zbog bug abbusera... ?
Svejedno, jel si stavio taj deo pod public OnPlayerEnterCheckpoint ??

Sredeno,lock ,im prou :)
Poslednja Izmena: Januar 05, 2012, 17:20:58 POSLE PODNE od dane_1