Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /////////////////////////////////////////////////////
- YCMD:prevozdrva(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_DRVOSECA) return SCM(playerid,-1,"UP:RP | "CRVENA"Niste drvoseca!");
- if(PosaoOprema[playerid] == 0) return SCM(playerid,-1,""SPLAVA"[UP:RP] "BELA"Niste uzeli opremu za posao (/oprema)!");
- if(PrevozDrva[playerid] != 0) return SCM(playerid,-1,""CRVENA"[UP:RP] "SIVA"Vec imas aktiviran posao!");
- if(GetPlayerVehicleID(playerid) >= vdrvoseca[0] && GetPlayerVehicleID(playerid) <= vdrvoseca[4])
- {
- SetPlayerCheckpoint(playerid, -2267.9983,-2221.3130,30.0496, 5.0); PrevozDrva[playerid] = 1;
- SCM(playerid,-1,"UP:RP | "SPLAVA"Krenuli ste sa prevozom drva, otidjite u sumu da utovarite drva!");
- }
- else return SCM(playerid,-1,"UP:RP | "CRVENA"Niste u kamionu!");
- return 1;
- }
- /////////////////////////////////////////////////////
- /////////////////////////////////PREVOZ DRVA DRVOSECA/////////////////////////////////
- if(PrevozDrva[playerid] == 1 && CID >= vdrvoseca[0] && CID <= vdrvoseca[4] && GetPlayerState(playerid) == 2)
- {
- if(IsPlayerInRangeOfPoint(playerid, 3.0, -2267.9983,-2221.3130,30.0496))
- {
- GameTextForPlayer(playerid, "~b~nastavite...", 5000, 3);
- SetPlayerCheckpoint(playerid, -2288.2998,-2157.0940,48.2991, 3.0);
- PrevozDrva[playerid] = 2;
- }
- }
- if(PrevozDrva[playerid] == 2 && CID >= vdrvoseca[0] && CID <= vdrvoseca[4] && GetPlayerState(playerid) == 2)
- {
- if(IsPlayerInRangeOfPoint(playerid, 3.0, -2288.2998,-2157.0940,48.2991))
- {
- GameTextForPlayer(playerid, "~b~nastavite...", 5000, 3);
- SetPlayerCheckpoint(playerid, -2101.9932,-1886.5752,110.5258, 3.0);
- PrevozDrva[playerid] = 3;
- }
- }
- if(PrevozDrva[playerid] == 3 && CID >= vdrvoseca[0] && CID <= vdrvoseca[4] && GetPlayerState(playerid) == 2)
- {
- if(IsPlayerInRangeOfPoint(playerid, 3.0, -2101.9932,-1886.5752,110.5258))
- {
- GameTextForPlayer(playerid, "~b~nastavite...", 5000, 3);
- SetPlayerCheckpoint(playerid, -2196.9807,-2017.9189,119.5026, 3.0);
- PrevozDrva[playerid] = 4;
- }
- }
- if(PrevozDrva[playerid] == 4 && CID >= vdrvoseca[0] && CID <= vdrvoseca[4] && GetPlayerState(playerid) == 2)
- {
- if(IsPlayerInRangeOfPoint(playerid, 3.0, -2196.9807,-2017.9189,119.5026))
- {
- GameTextForPlayer(playerid, "~b~nastavite...", 5000, 3);
- SetPlayerCheckpoint(playerid, -2477.5439,-2078.4978,124.9543, 3.0);
- PrevozDrva[playerid] = 5;
- }
- }
- if(PrevozDrva[playerid] == 5 && CID >= vdrvoseca[0] && CID <= vdrvoseca[4] && GetPlayerState(playerid) == 2)
- {
- if(IsPlayerInRangeOfPoint(playerid, 3.0, -2477.5439,-2078.4978,124.9543))
- {
- GameTextForPlayer(playerid, "~b~nastavite...", 5000, 3);
- SetPlayerCheckpoint(playerid, -2665.0898,-1922.7791,131.2359, 3.0);
- PrevozDrva[playerid] = 6;
- }
- }
- if(PrevozDrva[playerid] == 6 && CID >= vdrvoseca[0] && CID <= vdrvoseca[4] && GetPlayerState(playerid) == 2)
- {
- if(IsPlayerInRangeOfPoint(playerid, 3.0, -2665.0898,-1922.7791,131.2359))
- {
- TogglePlayerControllable(playerid, 0);
- utovar[playerid] = SetTimerEx("preposta", 5000, false, "d", playerid);
- GameTextForPlayer(playerid, "~b~utovar drva...", 5000, 3);
- SetPlayerCheckpoint(playerid, -2816.2312,-1512.2799,139.2891, 3.0);
- PrevozDrva[playerid] = 7;
- }
- }
- if(PrevozDrva[playerid] == 7 && CID >= vdrvoseca[0] && CID <= vdrvoseca[4] && GetPlayerState(playerid) == 2)
- {
- if(IsPlayerInRangeOfPoint(playerid, 3.0, -2816.2312,-1512.2799,139.2891))
- {
- GameTextForPlayer(playerid, "~b~nastavite...", 5000, 3);
- SetPlayerCheckpoint(playerid, -2037.0625,-2380.2134,30.6250, 3.0);
- PrevozDrva[playerid] = 8;
- }
- }
- if(PrevozDrva[playerid] == 8 && CID >= vdrvoseca[0] && CID <= vdrvoseca[4] && GetPlayerState(playerid) == 2)
- {
- if(IsPlayerInRangeOfPoint(playerid, 3.0, -2037.0625,-2380.2134,30.6250))
- {
- new bonus = random(30), string[120];
- g_NovacPlus(playerid, 750+bonus);
- format(string,sizeof(string),""SPLAVA"Uspesno ste zavrsili prevoz drva!\n\n"BELA"Plata: "SPLAVA"750$\n"BELA"Bonus: "SPLAVA"%d$",bonus);
- ShowPlayerDialog(playerid,DIALOG_ISPLATA,DIALOG_STYLE_MSGBOX,"Kraj prevoza drva",string,"Ok","");
- PrevozDrva[playerid] = 0; DisablePlayerCheckpoint(playerid);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement