Skripta koju koristim: UP
Detaljan opis problema: pa ovako stavio sam novu poziciju posla kamiondzija i nove cp u sad kad pokrenem posao pojavi mi se cp za utovar i ja dodjem na njega i pojavi mi se na ekranu "UTOVAR" i posle odredjenog vremena mogu opet krenuti e sad problem je u tome sto se taj CP ne skloni a drugi se ne pojavi
Dio skripte:
evo sve
if(TuraLV[playerid] == 1 && KamiondzijaVozila(CID) && GetPlayerState(playerid) == 2)
{
if(IsPlayerInRangeOfPoint(playerid, 4.0, -187.3324,-278.0262,1.4297))
{
if(IsTrailerAttachedToVehicle(CID))
{
TogglePlayerControllable(playerid, 0);
GameTextForPlayer(playerid, "~b~utovar...", 5000, 3);
utovar[playerid] = SetTimerEx("preposta", 5000, false, "d", playerid);
SetPlayerCheckpoint(playerid, -187.3324,-278.0262,1.4297, 4.0);
TuraLV[playerid] = 2;
}
}
}
if(TuraLV[playerid] == 2 && KamiondzijaVozila(CID) && GetPlayerState(playerid) == 2)
{
if(IsPlayerInRangeOfPoint(playerid, 4.0, -1867.9160,1415.0774,7.1875))
{
if(IsTrailerAttachedToVehicle(CID))
{
TogglePlayerControllable(playerid, 0);
GameTextForPlayer(playerid, "~b~istovar...", 5000, 3);
utovar[playerid] = SetTimerEx("preposta", 5000, false, "d", playerid);
SetPlayerCheckpoint(playerid, -1867.9160,1415.0774,7.1875, 4.0);
TuraLV[playerid] = 3;
}
}
}
if(TuraLV[playerid] == 3 && KamiondzijaVozila(CID) && GetPlayerState(playerid) == 2)
{
if(IsPlayerInRangeOfPoint(playerid, 4.0, -1558.4552,-2742.9285,48.5416))
{
if(IsTrailerAttachedToVehicle(CID))
{
TogglePlayerControllable(playerid, 0);
GameTextForPlayer(playerid, "~b~istovar...", 5000, 3);
utovar[playerid] = SetTimerEx("preposta", 5000, false, "d", playerid);
SetPlayerCheckpoint(playerid, -1558.4552,-2742.9285,48.5416, 4.0);
TuraLV[playerid] = 4;
}
}
}
if(TuraLV[playerid] == 4 && KamiondzijaVozila(CID) && GetPlayerState(playerid) == 2)
{
if(IsPlayerInRangeOfPoint(playerid, 4.0, 1036.9463,-1912.9376,13.1056))
{
if(IsTrailerAttachedToVehicle(CID))
{
TogglePlayerControllable(playerid, 0);
GameTextForPlayer(playerid, "~b~istovar...", 5000, 3);
utovar[playerid] = SetTimerEx("preposta", 5000, false, "d", playerid);
SetPlayerCheckpoint(playerid, 1036.9463,-1912.9376,13.1056, 4.0);
TuraLV[playerid] = 4;
}
}
}
if(TuraLV[playerid] == 5 && KamiondzijaVozila(CID) && GetPlayerState(playerid) == 2)
{
if(IsPlayerInRangeOfPoint(playerid, 4.0, -187.3324,-278.0262,1.4297))
{
if(IsTrailerAttachedToVehicle(CID))
{
new bonus = random(400), string[120];
g_NovacPlus(playerid, 10000+bonus);
format(string,sizeof(string),""SPLAVA"Uspesno ste zavrsili prevoz robe!\n\n"BELA"Plata: "SPLAVA"10000$\n"BELA"Bonus: "SPLAVA"%d$",bonus);
ShowPlayerDialog(playerid,DIALOG_ISPLATA,DIALOG_STYLE_MSGBOX,"Kraj prevoza robe",string,"Ok","");
TuraLV[playerid] = 0; DisablePlayerCheckpoint(playerid); FirmaNovac(103, 1000);
}
}
}
a evo samo deo za utovar
if(TuraLV[playerid] == 1 && KamiondzijaVozila(CID) && GetPlayerState(playerid) == 2)
{
if(IsPlayerInRangeOfPoint(playerid, 4.0, -187.3324,-278.0262,1.4297))
{
if(IsTrailerAttachedToVehicle(CID))
{
TogglePlayerControllable(playerid, 0);
GameTextForPlayer(playerid, "~b~utovar...", 5000, 3);
utovar[playerid] = SetTimerEx("preposta", 5000, false, "d", playerid);
SetPlayerCheckpoint(playerid, -187.3324,-278.0262,1.4297, 4.0);
TuraLV[playerid] = 2;
}
}
}
Neke slike/video za lakse dobivanje pomoci(neobavezno): ako treba dodacu
pa nisi dobre kordinate unio na drugom cp-u
oznacio sam ti gde ti je greska...
if(TuraLV[playerid] == 1 && KamiondzijaVozila(CID) && GetPlayerState(playerid) == 2)
{
if(IsPlayerInRangeOfPoint(playerid, 4.0, -187.3324,-278.0262,1.4297))
{
if(IsTrailerAttachedToVehicle(CID))
{
TogglePlayerControllable(playerid, 0);
GameTextForPlayer(playerid, "~b~utovar...", 5000, 3);
utovar[playerid] = SetTimerEx("preposta", 5000, false, "d", playerid);
SetPlayerCheckpoint(playerid, -187.3324,-278.0262,1.4297, 4.0);
TuraLV[playerid] = 2;
}
}
}
if(TuraLV[playerid] == 2 && KamiondzijaVozila(CID) && GetPlayerState(playerid) == 2)
{
if(IsPlayerInRangeOfPoint(playerid, 4.0, -1867.9160,1415.0774,7.1875))
{
if(IsTrailerAttachedToVehicle(CID))
{
TogglePlayerControllable(playerid, 0);
GameTextForPlayer(playerid, "~b~istovar...", 5000, 3);
utovar[playerid] = SetTimerEx("preposta", 5000, false, "d", playerid);
SetPlayerCheckpoint(playerid, -1867.9160,1415.0774,7.1875, 4.0);
TuraLV[playerid] = 3;
}
}
}
takoÄ'e primetio sam da si i ostale pogreÅ¡no stavio
Sad sve dobro ide do 4 CP-a sad nece 4 CP a namestio sam da se ugasi
if(TuraLV[playerid] == 4 && KamiondzijaVozila(CID) && GetPlayerState(playerid) == 2)
{
if(IsPlayerInRangeOfPoint(playerid, 4.0, -1558.4552,-2742.9285,48.5416))
{
if(IsTrailerAttachedToVehicle(CID))
{
TogglePlayerControllable(playerid, 0);
GameTextForPlayer(playerid, "~b~istovar...", 5000, 3);
utovar[playerid] = SetTimerEx("preposta", 5000, false, "d", playerid);
SetPlayerCheckpoint(playerid, 1036.9463,-1912.9376,13.1056, 4.0);
TuraLV[playerid] = 4;
}
}
}
if(TuraLV[playerid] == 5 && KamiondzijaVozila(CID) && GetPlayerState(playerid) == 2)
{
if(IsPlayerInRangeOfPoint(playerid, 4.0, 1036.9463,-1912.9376,13.1056))
{
if(IsTrailerAttachedToVehicle(CID))
{
new bonus = random(400), string[120];
g_NovacPlus(playerid, 23000+bonus);
format(string,sizeof(string),""SPLAVA"Uspesno ste zavrsili prevoz robe!\n\n"BELA"Plata: "SPLAVA"23000$\n"BELA"Bonus: "SPLAVA"%d$",bonus);
ShowPlayerDialog(playerid,DIALOG_ISPLATA,DIALOG_STYLE_MSGBOX,"Kraj prevoza robe",string,"Ok","");
TuraLV[playerid] = 0; DisablePlayerCheckpoint(playerid); FirmaNovac(103, 1000);
}
}
}
stavio si varijablu turalv = 4, a u sljedecoj provjeri si stavio da ako je turalv 5 da zavrsi.. tako da samo u turi 4 stavi varijablu na 5
if(TuraLV[playerid] == 4 && KamiondzijaVozila(CID) && GetPlayerState(playerid) == 2)
{
if(IsPlayerInRangeOfPoint(playerid, 4.0, -1558.4552,-2742.9285,48.5416))
{
if(IsTrailerAttachedToVehicle(CID))
{
TogglePlayerControllable(playerid, 0);
GameTextForPlayer(playerid, "~b~istovar...", 5000, 3);
utovar[playerid] = SetTimerEx("preposta", 5000, false, "d", playerid);
SetPlayerCheckpoint(playerid, 1036.9463,-1912.9376,13.1056, 4.0);
TuraLV[playerid] = 4;
}
}
}
if(TuraLV[playerid] == 5 && KamiondzijaVozila(CID) && GetPlayerState(playerid) == 2)
{
if(IsPlayerInRangeOfPoint(playerid, 4.0, 1036.9463,-1912.9376,13.1056))
{
if(IsTrailerAttachedToVehicle(CID))
{
new bonus = random(400), string[120];
g_NovacPlus(playerid, 23000+bonus);
format(string,sizeof(string),""SPLAVA"Uspesno ste zavrsili prevoz robe!\n\n"BELA"Plata: "SPLAVA"23000$\n"BELA"Bonus: "SPLAVA"%d$",bonus);
ShowPlayerDialog(playerid,DIALOG_ISPLATA,DIALOG_STYLE_MSGBOX,"Kraj prevoza robe",string,"Ok","");
TuraLV[playerid] = 0; DisablePlayerCheckpoint(playerid); FirmaNovac(103, 1000);
}
}
Evo tb to pa podebljaj sta treba ja sam probao mesto 4 staviti 5 ali opet isto ti mn podebljaj i pa cu ja zamenit, hvala
http://pastebin.com/Z326EJJL zamjeni to za ovo, ako nece daj od pocetka tog posla do place..
Too majstore raddiii hvalaa moze lock