Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define POSAO_BOJA "{00C0FF}"
- #define DIALOG_PLET 1
- // onplayerconnect staviti na 0 posaoprema
- new PosaoOprema[MAX_PLAYERS];
- //takodjer staviti na 0 onplayerconnect
- new LetSF[MAX_PLAYERS];
- new LetLV[MAX_PLAYERS];
- //
- #define POSAO_PILOT 1
- //
- new ppilot;
- //
- new vpilot[5];
- //
- vpilot[0] = AddStaticVehicleEx(519,1992.3000488,-2315.3000488,14.5000000,90.0000000,-1,-1,1000); //Shamal
- vpilot[1] = AddStaticVehicleEx(519,1992.3000488,-2381.8000488,14.5000000,90.0000000,-1,-1,1000); //Shamal
- vpilot[2] = AddStaticVehicleEx(553,1889.8000488,-2626.5000000,15.6000004,0.0000000,106,1,1000); //Nevada
- vpilot[3] = AddStaticVehicleEx(553,1754.0999756,-2625.8000488,15.6000004,0.0000000,106,1,1000); //Nevada
- vpilot[4] = AddStaticVehicleEx(553,1617.0999756,-2625.8999023,15.6000004,0.0000000,106,1,1000); //Nevada
- //
- ppilot = CreateDynamicPickup(1274, 1, 1892.8370,-2328.5259,13.5469); //posao pilot
- // ovo pod komandu /komande
- if (PlayerInfo[playerid][pPosao] == POSAO_PILOT)
- {
- strcat(info, ""POSAO_BOJA"- Komande posla: /let /oprema\n\n", sizeof(info));
- }
- return 1;
- //
- else if(IsPlayerInRangeOfPoint(playerid, 5.0, 1892.8370,-2328.5259,13.5469))
- {
- PlayerInfo[playerid][pPosao] = POSAO_PILOT;
- SCM(playerid, -1, ""POSAO_BOJA"Uspesno ste se zaposlili kao pilot!");
- SCM(playerid, -1, ""POSAO_BOJA"Komande posla: /let");
- }
- return 1;
- //
- YCMD:let(playerid, params[], help)
- {
- #pragma unused help
- #pragma unused params
- if(PlayerInfo[playerid][pPosao] != POSAO_PILOT) return SCM(playerid,-1,""POSAO_BOJA"Niste pilot!");
- if(PosaoOprema[playerid] == 0) return SCM(playerid,-1,""POSAO_BOJA"Niste uzeli opremu za posao (/oprema)!");
- if(LetSF[playerid] != 0 || LetLV[playerid] != 0) return SCM(playerid,-1,""POSAO_BOJA"Vec imas aktiviran posao!");
- if(!PilotVozila(GetPlayerVehicleID(playerid))) return SCM(playerid,-1,""POSAO_BOJA"Niste u avionu!");
- SPD(playerid, DIALOG_PLET, DIALOG_STYLE_LIST, ""POSAO_BOJA"Let", ""POSAO_BOJA"(1). "POSAO_BOJA"Let LS - SF\n"POSAO_BOJA"(2). "POSAO_BOJA"Let LS - LV", "Odaberi", "Izlaz");
- return 1;
- }
- //pod komandu /oprema
- else if(PlayerInfo[playerid][pPosao] == POSAO_PILOT)
- {
- if(PosaoOprema[playerid] == 0)
- {
- SetPlayerSkin(playerid, 61);
- SCM(playerid,-1,""POSAO_BOJA"Uzeli ste opremu za posao, da je skinte kucajte ponovo /oprema!");
- PosaoOprema[playerid] = 1;
- }
- else if(PosaoOprema[playerid] == 1)
- {
- if(LetSF[playerid] != 0 || LetLV[playerid] != 0) return SCM(playerid, -1, ""POSAO_BOJA""POSAO_BOJA"Imas aktiviran posao!");
- SetPlayerSkin(playerid, PlayerInfo[playerid][pSkin]);
- SCM(playerid,-1,""POSAO_BOJA"Skinuli ste opremu za vas posao!");
- PosaoOprema[playerid] = 0;
- }
- }
- //pod komandu /prekiniposao
- else if(PlayerInfo[playerid][pPosao] == POSAO_PILOT)
- {
- if(LetSF[playerid] != 0 || LetLV[playerid] != 0)
- {
- LetSF[playerid] = 0; LetLV[playerid] = 0;
- DisablePlayerCheckpoint(playerid);
- SCM(playerid,-1,""POSAO_BOJA"Prekinuli ste sa poslom!");
- }
- else return SCM(playerid,-1,""POSAO_BOJA"Niste zapoceli sa poslom!");
- }
- //ovo ako udje u vozilo a nije pilot da ga izbaci
- if(PilotVozila(vozilo))
- {
- if(PlayerInfo[playerid][pPosao] != POSAO_PILOT)
- {
- SCM(playerid, -1, ""POSAO_BOJA"Niste zaposleni kao pilot!");
- RemovePlayerFromVehicle(playerid);
- }
- else return SCM(playerid, -1, ""POSAO_BOJA"Komande posla: /let /oprema");
- }
- //on player enter checkpoint
- ////////////////////////////////PILOT LET LV/////////////////////////////////////////
- if(LetLV[playerid] == 1 && PilotVozila(CID) && GetPlayerState(playerid) == 2)
- {
- if(IsPlayerInRangeOfPoint(playerid, 5.0, 1847.4221,-2414.0798,13.5547))
- {
- TogglePlayerControllable(playerid, 0);
- GameTextForPlayer(playerid, "~b~sacekajte...", 5000, 3);
- utovar[playerid] = SetTimerEx("preposta", 5000, false, "d", playerid);
- SetPlayerCheckpoint(playerid, 1477.5233,1395.1841,10.8203, 5.0);
- LetLV[playerid] = 2;
- }
- }
- if(LetLV[playerid] == 2 && PilotVozila(CID) && GetPlayerState(playerid) == 2)
- {
- if(IsPlayerInRangeOfPoint(playerid, 5.0, 1477.5233,1395.1841,10.8203))
- {
- TogglePlayerControllable(playerid, 0);
- GameTextForPlayer(playerid, "~b~sacekajte...", 5000, 3);
- utovar[playerid] = SetTimerEx("preposta", 5000, false, "d", playerid);
- SetPlayerCheckpoint(playerid, 1879.6438,-2493.6636,13.5547, 5.0);
- LetLV[playerid] = 3;
- }
- }
- if(LetLV[playerid] == 3 && PilotVozila(CID) && GetPlayerState(playerid) == 2)
- {
- if(IsPlayerInRangeOfPoint(playerid, 5.0, 1879.6438,-2493.6636,13.5547))
- {
- new bonus = random(400), string[120];
- g_NovacPlus(playerid, 1600+bonus);
- format(string,sizeof(string),""POSAO_BOJA"Uspesno ste zavrsili prevoz putnika!\n\n"POSAO_BOJA"Plata: "POSAO_BOJA"1500$\n"POSAO_BOJA"Bonus: "POSAO_BOJA"%d$",bonus);
- ShowPlayerDialog(playerid,DIALOG_ISPLATA,DIALOG_STYLE_MSGBOX,"Kraj prevoza putnika",string,"Ok","");
- LetLV[playerid] = 0; DisablePlayerCheckpoint(playerid);
- }
- }
- ///////////////////////////////PILOT LET SF/////////////////////////////////////////
- if(LetSF[playerid] == 1 && PilotVozila(CID) && GetPlayerState(playerid) == 2)
- {
- if(IsPlayerInRangeOfPoint(playerid, 5.0, 1847.4221,-2414.0798,13.5547))
- {
- TogglePlayerControllable(playerid, 0);
- GameTextForPlayer(playerid, "~b~sacekajte...", 5000, 3);
- utovar[playerid] = SetTimerEx("preposta", 5000, false, "d", playerid);
- SetPlayerCheckpoint(playerid, -1506.8629,-14.1312,14.1409, 5.0);
- LetSF[playerid] = 2;
- }
- }
- if(LetSF[playerid] == 2 && PilotVozila(CID) && GetPlayerState(playerid) == 2)
- {
- if(IsPlayerInRangeOfPoint(playerid, 5.0, -1506.8629,-14.1312,14.1409))
- {
- TogglePlayerControllable(playerid, 0);
- GameTextForPlayer(playerid, "~b~sacekajte...", 5000, 3);
- utovar[playerid] = SetTimerEx("preposta", 5000, false, "d", playerid);
- SetPlayerCheckpoint(playerid, 1879.6438,-2493.6636,13.5547, 5.0);
- LetSF[playerid] = 3;
- }
- }
- if(LetSF[playerid] == 3 && PilotVozila(CID) && GetPlayerState(playerid) == 2)
- {
- if(IsPlayerInRangeOfPoint(playerid, 5.0, 1879.6438,-2493.6636,13.5547))
- {
- new bonus = random(200), string[120];
- g_NovacPlus(playerid, 1500+bonus);
- format(string,sizeof(string),""POSAO_BOJA"Uspesno ste zavrsili prevoz putnika!\n\n"POSAO_BOJA"Plata: "POSAO_BOJA"1500$\n"POSAO_BOJA"Bonus: "POSAO_BOJA"%d$",bonus);
- ShowPlayerDialog(playerid,DIALOG_ISPLATA,DIALOG_STYLE_MSGBOX,"Kraj prevoza putnika",string,"Ok","");
- LetSF[playerid] = 0; DisablePlayerCheckpoint(playerid);
- }
- }
- //dialog
- if(dialogid == DIALOG_PLET)
- {
- if(!response) return 1;
- switch(listitem)
- {
- case 0:
- {
- if(PilotVozila(GetPlayerVehicleID(playerid)))
- {
- SetPlayerCheckpoint(playerid, 1847.4221,-2414.0798,13.5547, 5.0);
- LetSF[playerid] = 1; SCM(playerid,-1,""POSAO_BOJA"Krenuli ste sa poslom, prevozite putnike u SF!");
- }
- else return SCM(playerid,-1,""POSAO_BOJA"Niste u avionu!");
- }
- case 1:
- {
- if(PilotVozila(GetPlayerVehicleID(playerid)))
- {
- SetPlayerCheckpoint(playerid, 1847.4221,-2414.0798,13.5547, 5.0);
- LetLV[playerid] = 1; SCM(playerid,-1,""POSAO_BOJA"Krenuli ste sa poslom, prevozite putnike u LV!");
- }
- else return SCM(playerid,-1,""POSAO_BOJA"Niste u avionu!");
- }
- }
- }
- //
- stock PosaoIme(id)
- {
- new posao[32];
- if(id == 0) posao = "Nezaposlen";
- else if(id == 1) posao = "Pilot";
- return posao;
- }
- //
- stock PilotVozila(carid)
- {
- for(new i = 0; i < sizeof(vpilot); i++)
- {
- if(carid == vpilot[i]) return 1;
- }
- return 0;
- }
- //
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement