Skripta koju koristim: gta rp
Detaljan opis problema: dodavo sam posao vozaca busa ali stavio sam ono da te freza na 10 sec ali on freza nece poslije 10 sec da unfreza..
Dio skripte:
CP-ovi
if(PlayerInfo[playerid][pLinija1] > 0)
{
//--------linija1-----------------------------------------
if(PlayerToPoint(4.0, playerid,1818.7645,-1921.2404,13.3778))//cp1
{
if(PlayerInfo[playerid][pLinija1] == 1)//
{
new Veh = GetPlayerVehicleID(playerid);
if(Veh == 13)//tu stavite id od vozila za Oranje
{
SetTimerEx("busroutestoptimer", 10000, false, "i", playerid);
TogglePlayerControllable(playerid, false);
PlayerInfo[playerid][pLinija1] = 2;// dodajemo vrijednost da se slucajno ne pogodi isti cp, ovo nije potrebno
SetPlayerCheckpoint(playerid,2048.9685,-1939.8480,13.3349,4.0);//
}
}
}
if(PlayerToPoint(4.0, playerid,2048.9685,-1939.8480,13.3349))//cp2
{
if(PlayerInfo[playerid][pLinija1] == 2)//
{
new Veh = GetPlayerVehicleID(playerid);
if(Veh == 13)
{
SetTimerEx("busroutestoptimer", 10000, false, "i", playerid);
TogglePlayerControllable(playerid, false);
PlayerInfo[playerid][pLinija1] = 3;//
SetPlayerCheckpoint(playerid,2090.0051,-1772.6156,13.3828,4.0);//
}
}
}
if(PlayerToPoint(4.0, playerid,2090.0051,-1772.6156,13.3828))//cp3
{
if(PlayerInfo[playerid][pLinija1] == 3)//
{
new Veh = GetPlayerVehicleID(playerid);
if(Veh == 13)
{
SetTimerEx("busroutestoptimer", 10000, false, "i", playerid);
TogglePlayerControllable(playerid, false);
PlayerInfo[playerid][pLinija1] = 4;//
SetPlayerCheckpoint(playerid,2215.4885,-1471.3298,23.8281,4.0);//
}
}
}
if(PlayerToPoint(4.0, playerid,2215.4885,-1471.3298,23.8281))//cp4
{
if(PlayerInfo[playerid][pLinija1] == 4)//
{
new Veh = GetPlayerVehicleID(playerid);
if(Veh == 13)
{
SetTimerEx("busroutestoptimer", 10000, false, "i", playerid);
TogglePlayerControllable(playerid, false);
PlayerInfo[playerid][pLinija1] = 5;//
SetPlayerCheckpoint(playerid,2373.5283,-1285.8362,23.8323,4.0);//
}
}
}
if(PlayerToPoint(4.0, playerid,2373.5283,-1285.8362,23.8323))//cp5
{
if(PlayerInfo[playerid][pLinija1] == 5)//
{
new Veh = GetPlayerVehicleID(playerid);
if(Veh == 13)
{
SetTimerEx("busroutestoptimer", 10000, false, "i", playerid);
TogglePlayerControllable(playerid, false);
PlayerInfo[playerid][pLinija1] = 6;//
SetPlayerCheckpoint(playerid,2151.4807,-1217.5153,23.8098,4.0);//
}
}
}
if(PlayerToPoint(4.0, playerid,2151.4807,-1217.5153,23.8098))//cp6
{
if(PlayerInfo[playerid][pLinija1] == 6)//
{
new Veh = GetPlayerVehicleID(playerid);
if(Veh == 13)
{
SetTimerEx("busroutestoptimer", 10000, false, "i", playerid);
TogglePlayerControllable(playerid, false);
PlayerInfo[playerid][pLinija1] = 7;//
SetPlayerCheckpoint(playerid,1843.7114,-1298.4398,13.3828,4.0);//
}
}
}
if(PlayerToPoint(4.0, playerid,1843.7114,-1298.4398,13.3828))//cp7
{
if(PlayerInfo[playerid][pLinija1] == 7)//
{
new Veh = GetPlayerVehicleID(playerid);
if(Veh == 13)
{
SetTimerEx("busroutestoptimer", 10000, false, "i", playerid);
TogglePlayerControllable(playerid, false);
PlayerInfo[playerid][pLinija1] = 8;//
SetPlayerCheckpoint(playerid,1819.7913,-1918.8513,13.3807,4.0);//
}
}
}
if(PlayerToPoint(4.0, playerid,1819.7913,-1918.8513,13.3807))//cp n-zi
{
if(PlayerInfo[playerid][pLinija1] == 16)//
{
new Veh = GetPlayerVehicleID(playerid);
if(Veh == 13)
{
SetTimerEx("busroutestoptimer", 10000, false, "i", playerid);
TogglePlayerControllable(playerid, false);
PlayerInfo[playerid][pLinija1] = 0;//
DisablePlayerCheckpoint(playerid);
SendClientMessage(playerid, COLOR_GREEN ,"*Voznja uspjesno zavrsena");
//---------------------------------------------------------------ovo ispod nije potrebno
GivePlayerMoney(playerid, 100);
SendClientMessage(playerid, COLOR_GREEN ,"Zarada = 100$");
}
}
}
}
forward
forward busroutestoptimer(playerid);
public
public busroutestoptimer(playerid)
{
if(IsPlayerConnected(playerid))
{
new newcar = GetPlayerVehicleID(playerid);
if(IsABus(newcar))
{
TogglePlayerControllable(playerid, 1);
SendClientMessage(playerid, TEAM_AZTECAS_COLOR, "Mozes da ides sada!");
}
}
}
Neke slike/video za lakse dobivanje pomoci(neobavezno): //
U svim ovim zameni TogglePlayerControllable u TogglePlayerControllable(playerid, 0);
if(PlayerInfo[playerid][pLinija1] > 0)
{
//--------linija1-----------------------------------------
if(PlayerToPoint(4.0, playerid,1818.7645,-1921.2404,13.3778))//cp1
{
if(PlayerInfo[playerid][pLinija1] == 1)//
{
new Veh = GetPlayerVehicleID(playerid);
if(Veh == 13)//tu stavite id od vozila za Oranje
{
SetTimerEx("busroutestoptimer", 10000, false, "i", playerid);
TogglePlayerControllable(playerid,0);
PlayerInfo[playerid][pLinija1] = 2;// dodajemo vrijednost da se slucajno ne pogodi isti cp, ovo nije potrebno
SetPlayerCheckpoint(playerid,2048.9685,-1939.8480,13.3349,4.0);//
}
}
}
if(PlayerToPoint(4.0, playerid,2048.9685,-1939.8480,13.3349))//cp2
{
if(PlayerInfo[playerid][pLinija1] == 2)//
{
new Veh = GetPlayerVehicleID(playerid);
if(Veh == 13)
{
SetTimerEx("busroutestoptimer", 10000, false, "i", playerid);
TogglePlayerControllable(playerid, 0);
PlayerInfo[playerid][pLinija1] = 3;//
SetPlayerCheckpoint(playerid,2090.0051,-1772.6156,13.3828,4.0);//
}
}
}
if(PlayerToPoint(4.0, playerid,2090.0051,-1772.6156,13.3828))//cp3
{
if(PlayerInfo[playerid][pLinija1] == 3)//
{
new Veh = GetPlayerVehicleID(playerid);
if(Veh == 13)
{
SetTimerEx("busroutestoptimer", 10000, false, "i", playerid);
TogglePlayerControllable(playerid, 0);
PlayerInfo[playerid][pLinija1] = 4;//
SetPlayerCheckpoint(playerid,2215.4885,-1471.3298,23.8281,4.0);//
}
}
}
if(PlayerToPoint(4.0, playerid,2215.4885,-1471.3298,23.8281))//cp4
{
if(PlayerInfo[playerid][pLinija1] == 4)//
{
new Veh = GetPlayerVehicleID(playerid);
if(Veh == 13)
{
SetTimerEx("busroutestoptimer", 10000, false, "i", playerid);
TogglePlayerControllable(playerid, 0);
PlayerInfo[playerid][pLinija1] = 5;//
SetPlayerCheckpoint(playerid,2373.5283,-1285.8362,23.8323,4.0);//
}
}
}
if(PlayerToPoint(4.0, playerid,2373.5283,-1285.8362,23.8323))//cp5
{
if(PlayerInfo[playerid][pLinija1] == 5)//
{
new Veh = GetPlayerVehicleID(playerid);
if(Veh == 13)
{
SetTimerEx("busroutestoptimer", 10000, false, "i", playerid);
TogglePlayerControllable(playerid, 0);
PlayerInfo[playerid][pLinija1] = 6;//
SetPlayerCheckpoint(playerid,2151.4807,-1217.5153,23.8098,4.0);//
}
}
}
if(PlayerToPoint(4.0, playerid,2151.4807,-1217.5153,23.8098))//cp6
{
if(PlayerInfo[playerid][pLinija1] == 6)//
{
new Veh = GetPlayerVehicleID(playerid);
if(Veh == 13)
{
SetTimerEx("busroutestoptimer", 10000, false, "i", playerid);
TogglePlayerControllable(playerid, 0);
PlayerInfo[playerid][pLinija1] = 7;//
SetPlayerCheckpoint(playerid,1843.7114,-1298.4398,13.3828,4.0);//
}
}
}
if(PlayerToPoint(4.0, playerid,1843.7114,-1298.4398,13.3828))//cp7
{
if(PlayerInfo[playerid][pLinija1] == 7)//
{
new Veh = GetPlayerVehicleID(playerid);
if(Veh == 13)
{
SetTimerEx("busroutestoptimer", 10000, false, "i", playerid);
TogglePlayerControllable(playerid, 0);
PlayerInfo[playerid][pLinija1] = 8;//
SetPlayerCheckpoint(playerid,1819.7913,-1918.8513,13.3807,4.0);//
}
}
}
if(PlayerToPoint(4.0, playerid,1819.7913,-1918.8513,13.3807))//cp n-zi
{
if(PlayerInfo[playerid][pLinija1] == 16)//
{
new Veh = GetPlayerVehicleID(playerid);
if(Veh == 13)
{
SetTimerEx("busroutestoptimer", 10000, false, "i", playerid);
TogglePlayerControllable(playerid, 0);
PlayerInfo[playerid][pLinija1] = 0;//
DisablePlayerCheckpoint(playerid);
SendClientMessage(playerid, COLOR_GREEN ,"*Voznja uspjesno zavrsena");
//---------------------------------------------------------------ovo ispod nije potrebno
GivePlayerMoney(playerid, 100);
SendClientMessage(playerid, COLOR_GREEN ,"Zarada = 100$");
}
}
}
}
prvo mi je to i bilo pa sam zamjenio u ovo ali ni onda nije radilo..