Problem with RP job!!! Help! - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Problem with RP job!!! Help! (
/showthread.php?tid=536550)
Problem with RP job!!! Help! -
ivanmangta - 10.09.2014
I have problem with checkpoints, when i enter /razvrstaj i sends me ch marker and works good, but second one doesnt work, see, i wnt to make that player goes to one ch and waits there 5 seconds and when he finishes other ch shows when you got there you done job. But second one doestn work code:
This one works good
Код:
YCMD:razvrstaj(playerid, params[], help)
{
#pragma unused help
#pragma unused params
if(UlogovanProvera[playerid] == 0) return SCM(playerid,-1,"UP:RP | "CRVENA"Moras se ulogovati da bi koristio ovu komandu!");
if(PlayerInfo[playerid][pPosao] != POSAO_SKLADISTAR) return SCM(playerid,-1,"UP:RP | "CRVENA"Niste skladistar!");
if(PosaoOprema[playerid] == 0) return SCM(playerid,-1,""SPLAVA"[UP:RP] "BELA"Niste uzeli opremu za posao (/oprema)!");
if(GrobarLinija[playerid] != 0) return SCM(playerid,-1,""SPLAVA"[UP:RP] "BELA"Vec imas aktiviran posao!");
SetPlayerCheckpoint(playerid, 2797.83716, -2493.89404, 13.54670, 2.0);
RazvrstavanjeKutija[playerid] = 1;
SCM(playerid,-1,""ZUTA"Krenuli ste sa poslom otidjite na lokaciju oznacenu"CRVENA"(crveno) "ZUTA"pokupite kutiju!");
return 1;
}
THIS ONE DOESNT WORK DOWN HERE!!!!!!!!!!!!
Код:
if(RazvrstavanjeKutija[playerid] == 1 && GetPlayerState(playerid) == 1)
{
TogglePlayerControllable(playerid, 0);
utovar[playerid] = SetTimerEx("preposta", 5000, false, "d", playerid);
GameTextForPlayer(playerid, "~b~Uzimas kutije...", 5000, 3);
SetPlayerCheckpoint(playerid, 2798.37305, -2417.80078, 13.58770, 2.0);
GrobarLinija[playerid] = 2;
}
if(RazvrstavanjeKutija[playerid] == 2 && GetPlayerState(playerid) == 1)
{
if(IsPlayerInRangeOfPoint(playerid, 2.0, 2798.37305, -2417.80078, 13.58770))
{
new bonus = random(50), string[120];
g_NovacPlus(playerid, 350+bonus);
format(string,sizeof(string),""SPLAVA"Uspesno ste razvrstali kutije!\n\n"BELA"Plata: "SPLAVA"350$\n"BELA"Bonus: "SPLAVA"%d$",bonus);
ShowPlayerDialog(playerid,DIALOG_ISPLATA,DIALOG_STYLE_MSGBOX,"Kraj dovoza",string,"Ok","");
GrobarLinija[playerid] = 0; DisablePlayerCheckpoint(playerid);
}
}
Help me i will be greatfull!!!! Everything is defined!