Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static Text:Quarry[4], PlayerText:PlayerQuarry[5];
- static CarSkillQuarry[7];
- static QuarryCP[MAX_PLAYERS], CP[MAX_PLAYERS];
- static checkcar[MAX_PLAYERS];
- new Iterator:Quarryplayers<MAX_PLAYERS>;
- enum pInfo
- {
- pSkill, pLoads, pEarned, pTure, pJob
- }
- new PlayerInfo[MAX_PLAYERS][pInfo];
- AddStaticPickup(1239, 20, 816.6284,856.8055,12.7891, 0); // Muncitor de cariera //
- Create3DTextLabel("Muncitor de cariera\nType /getjob to get this job", -1, 816.6284,856.8055,12.7891, 10.0, 0);
- stock LOADTD()
- {
- Quarry[0] = TextDrawCreate(425.200073, 348.293273, "Go into the checkpoint to start working.");
- TextDrawLetterSize(Quarry[0], 0.359200, 1.301333);
- TextDrawAlignment(Quarry[0], 3);
- TextDrawColor(Quarry[0], -1);
- TextDrawSetShadow(Quarry[0], 0);
- TextDrawBackgroundColor(Quarry[0], 255);
- TextDrawFont(Quarry[0], 1);
- TextDrawSetProportional(Quarry[0], 1);
- Quarry[1] = TextDrawCreate(416.400024, 325.893310, "box");
- TextDrawLetterSize(Quarry[1], 0.000000, 2.160001);
- TextDrawTextSize(Quarry[1], 625.000000, 0.000000);
- TextDrawAlignment(Quarry[1], 1);
- TextDrawColor(Quarry[1], -1);
- TextDrawUseBox(Quarry[1], 1);
- TextDrawBoxColor(Quarry[1], 159);
- TextDrawSetShadow(Quarry[1], 0);
- TextDrawBackgroundColor(Quarry[1], 255);
- TextDrawFont(Quarry[1], 1);
- TextDrawSetProportional(Quarry[1], 1);
- Quarry[2] = TextDrawCreate(458.800048, 359.493225, "Masina este incarcata.Mergi inapoi pentru a primii banii");
- TextDrawLetterSize(Quarry[2], 0.359200, 1.301333);
- TextDrawAlignment(Quarry[2], 3);
- TextDrawColor(Quarry[2], -1);
- TextDrawSetShadow(Quarry[2], 0);
- TextDrawBackgroundColor(Quarry[2], 255);
- TextDrawFont(Quarry[2], 1);
- TextDrawSetProportional(Quarry[2], 1);
- Quarry[3] = TextDrawCreate(282.000091, 119.813308, "~y~332$");
- TextDrawLetterSize(Quarry[3], 0.572000, 2.473598);
- TextDrawAlignment(Quarry[3], 1);
- TextDrawColor(Quarry[3], -1);
- TextDrawSetShadow(Quarry[3], 0);
- TextDrawBackgroundColor(Quarry[3], 255);
- TextDrawFont(Quarry[3], 2);
- TextDrawSetProportional(Quarry[3], 1);
- return 1;
- }
- public OnPlayerEnterCheckpoint(playerid)
- {
- if(CP[playerid] == 1){
- CP[playerid] = 2;
- DisablePlayerCheckpoint(playerid);
- return 1;
- }
- if(QuarryCP[playerid] == 1)
- {
- QuarryCP[playerid] = 2;
- SetPlayerCheckpoint(playerid, 638.9249,857.2787,-40.2326, 5);
- TextDrawHideForPlayer(playerid, Quarry[0]);
- return 1;
- }
- if(QuarryCP[playerid] == 2)
- {
- QuarryCP[playerid] = 3;
- SetPlayerCheckpoint(playerid, 839.2156,885.3904,13.3516, 5);
- TextDrawShowForPlayer(playerid, Quarry[2]);
- return 1;
- }
- if(QuarryCP[playerid] == 3)
- {
- new info[100];
- QuarryCP[playerid] = 4;
- new vehnev, Float:GetVehHp;
- GetVehicleHealth(playerid, GetVehHp);
- new rand = 200+ random(300);
- GivePlayerCash(playerid, rand);
- PlayerInfo[playerid][pMoney] += rand;
- format(info, sizeof(info), "~y~%d$", rand);
- PlayerInfo[playerid][pTure] += 1;
- PlayerInfo[playerid][pEarned] += rand;
- PlayerInfo[playerid][pLoads] += 1;
- TextDrawSetString(Quarry[3], info);
- SetPlayerCheckpoint(playerid, 537.5002,846.5444,-42.1651, 5);
- TextDrawShowForPlayer(playerid, Quarry[3]);
- TextDrawHideForPlayer(playerid, Quarry[2]);
- vehnev = 0;
- SCMF(playerid, COLOR_GREY, "Castig:%d$", rand);
- if(GetVehHp > 990.0)
- {
- vehnev = 1;
- PlayerInfo[playerid][pMoney] += 100;
- SCM(playerid, COLOR_GREY, "Bonus vehicul nelovit:100$");
- GivePlayerCash(playerid, 100);
- }
- if(GetVehHp < 990.0)
- {
- vehnev = 0;
- SCM(playerid, COLOR_GREY, "Bonus vehicule nelovit:0$");
- }
- if(vehnev == 1){
- SCMF(playerid, COLOR_GREY, "Total:%d", rand+100);}
- if(vehnev == 0){
- SCMF(playerid, COLOR_GREY, "Total:%d", rand);}
- defer HideMoney(playerid);
- if(PlayerInfo[playerid][pTure] == 30)
- {
- PlayerInfo[playerid][pSkill] = 2;
- SendClientMessage(playerid, COLOR_YELLOW, "Felicitari, ai atins skill-ul 2 la jobul muncitor de cariera!");
- }
- if(PlayerInfo[playerid][pTure] == 60)
- {
- PlayerInfo[playerid][pSkill] = 2;
- SendClientMessage(playerid, COLOR_YELLOW, "Felicitari, ai atins skill-ul 3 la jobul muncitor de cariera!");
- }
- return 1;
- }
- if(QuarryCP[playerid] == 4)
- {
- QuarryCP[playerid] = 5;
- TextDrawHideForPlayer(playerid, Quarry[2]);
- SetPlayerCheckpoint(playerid, 575.1714,926.8302,-42.9609, 5);
- return 1;
- }
- if(QuarryCP[playerid] == 5)
- {
- QuarryCP[playerid] = 6;
- TextDrawShowForPlayer(playerid, Quarry[2]);
- SetPlayerCheckpoint(playerid, 839.2156,885.3904,13.3516, 5);
- return 1;
- }
- if(QuarryCP[playerid] == 6)
- {
- new info[100];
- QuarryCP[playerid] = 1;
- new rand = 200+ random(300);
- new vehnev, Float:GetVehHp;
- new carcheck = GetPlayerVehicleID(playerid);
- if(carcheck == CarSkillQuarry[1] || CarSkillQuarry[2] || CarSkillQuarry[3])
- {
- GetVehicleHealth(playerid, GetVehHp);
- }
- GivePlayerCash(playerid, rand);
- PlayerInfo[playerid][pMoney] += rand;
- format(info, sizeof(info), "~y~%d$", rand);
- PlayerInfo[playerid][pTure] += 1;
- PlayerInfo[playerid][pEarned] += rand;
- PlayerInfo[playerid][pLoads] += 1;
- TextDrawSetString(Quarry[3], info);
- TextDrawShowForPlayer(playerid, Quarry[3]);
- TextDrawHideForPlayer(playerid, Quarry[2]);
- SCMF(playerid, COLOR_GREY, "Castig:%d$", rand);
- if(GetVehHp < 990.0)
- {
- vehnev = 1;
- PlayerInfo[playerid][pMoney] += 100;
- SCM(playerid, COLOR_GREY, "Bonus vehicul nelovit:100$");
- GivePlayerCash(playerid, 100);
- }
- if(GetVehHp > 990.0)
- {
- vehnev = 0;
- SCM(playerid, COLOR_GREY, "Bonus vehicule nelovit:0$");
- }
- if(vehnev == 1){
- SCMF(playerid, COLOR_GREY, "Total:%d", rand+100);}
- if(vehnev == 0){
- SCMF(playerid, COLOR_GREY, "Total:%d", rand);}
- defer HideMoney(playerid);
- if(PlayerInfo[playerid][pTure] == 30)
- {
- PlayerInfo[playerid][pSkill] = 2;
- SendClientMessage(playerid, COLOR_YELLOW, "Felicitari, ai atins skill-ul 2 la jobul muncitor de cariera!");
- }
- if(PlayerInfo[playerid][pTure] == 60)
- {
- PlayerInfo[playerid][pSkill] = 2;
- SendClientMessage(playerid, COLOR_YELLOW, "Felicitari, ai atins skill-ul 3 la jobul muncitor de cariera!");
- }}
- return 1;
- }
- timer HideMoney[5000](playerid)
- {
- TextDrawHideForPlayer(playerid, Quarry[3]);
- return 1;
- }
- public OnPlayerExitVehicle(playerid, vehicleid)
- {
- if(carcheck == CarSkillQuarry[1])
- {
- SendClientMessage(playerid, COLOR_YELLOW, "Ai la dispozitie 20 de secunde sa te intorci la vehiculul de job sau vei pierde misiunea!");
- defer timerquarry(playerid);
- checkcar[playerid] = 0;
- }
- if(carcheck == CarSkillQuarry[2])
- {
- SendClientMessage(playerid, COLOR_YELLOW, "Ai la dispozitie 20 de secunde sa te intorci la vehiculul de job sau vei pierde misiunea!");
- defer timerquarry(playerid);
- checkcar[playerid] = 0;
- }
- if(carcheck == CarSkillQuarry[3])
- {
- SendClientMessage(playerid, COLOR_YELLOW, "Ai la dispozitie 20 de secunde sa te intorci la vehiculul de job sau vei pierde misiunea!");
- defer timerquarry(playerid);
- checkcar[playerid] = 0;
- }
- return 1;
- }
- timer timerquarry[20000](playerid)
- {
- if(checkcar[playerid] == 0)
- {
- DestroyVehicle(CarSkillQuarry[1]);
- DestroyVehicle(CarSkillQuarry[2]);
- DestroyVehicle(CarSkillQuarry[3]);
- DisablePlayerCheckpoint(playerid);
- RemovePlayerFromVehicle(playerid);
- CP[playerid] = 0;
- QuarryCP[playerid] = 0;
- TextDrawHideForPlayer(playerid, Quarry[0]);
- TextDrawHideForPlayer(playerid, Quarry[1]);
- TextDrawHideForPlayer(playerid, Quarry[2]);
- TextDrawHideForPlayer(playerid, Quarry[3]);
- PlayerTextDrawHide(playerid, PlayerQuarry[1]);
- PlayerTextDrawHide(playerid, PlayerQuarry[0]);
- } else return 0;
- return 1;
- }
- CMD:getjob(playerid, params[])
- {
- if(IsPlayerInRangeOfPoint(playerid, 3.0, 816.6284,856.8055,12.7891))
- {
- if(PlayerInfo[playerid][pJob] <= 10)
- {
- PlayerInfo[playerid][pJob] = 11;
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "Te-ai angajat la Muncitor de Cariera, foloseste /help daca ai nelamuriri!");
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "Foloseste comanda /work pentru a incepe munca.");
- }
- }
- return 1;
- }
- CMD:work(playerid, params[])
- {
- if(PlayerInfo[playerid][pJob] == 11)
- {
- if(!IsPlayerInRangeOfPoint(playerid, 3.5, 849.9559,854.2949,13.3515))
- {
- CP[playerid] = 1;
- SetPlayerCheckpoint(playerid, 849.9559,854.2949,13.3515, 5);
- SendClientMessage(playerid, COLOR_YELLOW, "Urmareste punctul rosu pentru a incepe munca.");
- return 1;
- }
- if(PlayerInfo[playerid][pSkill] == 1)
- {
- if(PlayerInfo[playerid][pWorking] == 0)
- {
- Iter_Add(Quarryplayers, playerid);
- CarSkillQuarry[1] = AddStaticVehicle(486,849.9193,854.2819,13.5156,0.1623,1,1);
- PutPlayerInVehicle(playerid, CarSkillQuarry[1], 0);
- QuarryCP[playerid] = 1;
- SetPlayerCheckpoint(playerid, 839.2156,885.3904,13.3516, 5);
- repeat CheckQuarry(playerid);
- PlayerTextDrawShow(playerid, PlayerQuarry[1]);
- PlayerTextDrawShow(playerid, PlayerQuarry[0]);
- TextDrawShowForPlayer(playerid, Quarry[1]);
- TextDrawShowForPlayer(playerid, Quarry[0]);
- SendClientMessage(playerid, COLOR_YELLOW, "Urmareste punctul de pe harta pentru a incepe munca.");
- PlayerInfo[playerid][pWorking] = 10;
- checkcar[playerid] = 1;
- }}
- if(PlayerInfo[playerid][pSkill] == 2)
- {
- if(PlayerInfo[playerid][pWorking] == 0)
- {
- Iter_Add(Quarryplayers, playerid);
- CarSkillQuarry[2] = AddStaticVehicle(486,849.9193,854.2819,13.5156,0.1623,1,1);
- PutPlayerInVehicle(playerid, CarSkillQuarry[2], 0);
- SetPlayerCheckpoint(playerid, 839.2156,885.3904,13.3516, 5);
- QuarryCP[playerid] = 1;
- repeat CheckQuarry(playerid);
- PlayerTextDrawShow(playerid, PlayerQuarry[1]);
- PlayerTextDrawShow(playerid, PlayerQuarry[0]);
- TextDrawShowForPlayer(playerid, Quarry[1]);
- TextDrawShowForPlayer(playerid, Quarry[0]);
- SendClientMessage(playerid, COLOR_YELLOW, "Urmareste punctul de pe harta pentru a incepe munca.");
- PlayerInfo[playerid][pWorking] = 10;
- checkcar[playerid] = 1;
- }}
- if(PlayerInfo[playerid][pSkill] == 3)
- {
- if(PlayerInfo[playerid][pWorking] == 0)
- {
- Iter_Add(Quarryplayers, playerid);
- CarSkillQuarry[3] = AddStaticVehicle(524,849.9193,854.2819,13.5156,0.1623,1,1);
- PutPlayerInVehicle(playerid, CarSkillQuarry[3], 0);
- SetPlayerCheckpoint(playerid, 839.2156,885.3904,13.3516, 5);
- QuarryCP[playerid] = 1;
- repeat CheckQuarry(playerid);
- PlayerTextDrawShow(playerid, PlayerQuarry[1]);
- PlayerTextDrawShow(playerid, PlayerQuarry[0]);
- TextDrawShowForPlayer(playerid, Quarry[1]);
- TextDrawShowForPlayer(playerid, Quarry[0]);
- SendClientMessage(playerid, COLOR_YELLOW, "Urmareste punctul de pe harta pentru a incepe munca.");
- PlayerInfo[playerid][pWorking] = 10;
- checkcar[playerid] = 1;
- }}
- }
- return 1;
- }
- public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
- {
- new carcheck = GetPlayerVehicleID(playerid);
- if(carcheck == CarSkillQuarry[1])
- {
- checkcar[playerid] = 1;
- }
- if(carcheck == CarSkillQuarry[2])
- {
- checkcar[playerid] = 1;
- }
- if(carcheck == CarSkillQuarry[3])
- {
- checkcar[playerid] = 1;
- }
- return 1;
- }
- stock LoadPlayerText(playerid)
- {
- PlayerQuarry[0] = CreatePlayerTextDraw(playerid, 597.999694, 327.386383, "You extracted 0 loods earned 0$");
- PlayerTextDrawLetterSize(playerid, PlayerQuarry[0], 0.277599, 0.778665);
- PlayerTextDrawTextSize(playerid, PlayerQuarry[0], -7.000000, 0.000000);
- PlayerTextDrawAlignment(playerid, PlayerQuarry[0], 3);
- PlayerTextDrawColor(playerid, PlayerQuarry[0], -1);
- PlayerTextDrawSetShadow(playerid, PlayerQuarry[0], 0);
- PlayerTextDrawBackgroundColor(playerid, PlayerQuarry[0], 255);
- PlayerTextDrawFont(playerid, PlayerQuarry[0], 1);
- PlayerTextDrawSetProportional(playerid, PlayerQuarry[0], 1);
- PlayerQuarry[1] = CreatePlayerTextDraw(playerid, 602.799804, 336.346282, "Workers on duty: 1 / Your skill: 1 (0/30)");
- PlayerTextDrawLetterSize(playerid, PlayerQuarry[1], 0.240799, 0.883198);
- PlayerTextDrawTextSize(playerid, PlayerQuarry[1], -2.000000, 0.000000);
- PlayerTextDrawAlignment(playerid, PlayerQuarry[1], 3);
- PlayerTextDrawColor(playerid, PlayerQuarry[1], -1);
- PlayerTextDrawSetShadow(playerid, PlayerQuarry[1], 0);
- PlayerTextDrawBackgroundColor(playerid, PlayerQuarry[1], 255);
- PlayerTextDrawFont(playerid, PlayerQuarry[1], 1);
- PlayerTextDrawSetProportional(playerid, PlayerQuarry[1], 1);
- return 1;
- }
Advertisement
Advertisement
Advertisement
RAW Paste Data
Copied
Advertisement