Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //=================================[JOB TAIETOR LEMNE V1.0 [BETA] @pawno school]=======================================================
- //========================================[Job Creat de Famous (Anubis)]=====================================================================
- #include <a_samp>
- #include <a_objects>
- #include <streamer>
- #if defined FILTERSCRIPT
- #define COLOR_RED 0xE60000FF
- #endif
- forward EsteMasinaJOB(carid);
- forward timpjob(playerid);
- new objjob[MAX_PLAYERS];
- new timecut[MAX_PLAYERS];
- new skinjob[MAX_PLAYERS];
- new masina[MAX_PLAYERS];
- new PasJob[MAX_PLAYERS];
- new masina1, masina2, masina3, masina4, masina5;
- public OnFilterScriptInit()
- {
- print("\n--------------------------------------");
- print(" Job Taietor lemne by pawno School loaded");
- print("--------------------------------------\n");
- return 1;
- }
- public OnFilterScriptExit()
- {
- return 1;
- }
- main()
- {
- print("\n--------------------------------------");
- print(" Job Taietor lemne by pawno school unloaded");
- print("--------------------------------------\n");
- return 1;
- }
- public OnGameModeInit()
- {
- // Obiective
- CreateObject(3276, -117.14592, -1199.96472, 2.72656, 3.14159, 0.00000, 1.90836);
- CreateObject(3276, -106.42129, -1217.62317, 2.72660, 357.00000, 0.00000, -8.00000);
- CreateObject(3276, -99.50285, -1198.14978, 2.72660, 357.00000, 0.00000, -14.00000);
- CreateObject(3276, -110.37328, -1195.47974, 2.72660, 357.00000, 0.00000, -12.00000);
- CreateObject(967, -100.37933, -1217.53540, 1.68390, 0.00000, 0.00000, -185.00000);
- // 3dtext + pickup
- Create3DTextLabel("Job Taietor de Lemne\nTasteaza /incepemunca pentru a incepe", 0xFFFFFFAA, -87.8051,-1212.2844,2.8906);
- AddStaticPickup(1275, 23, -87.8051,-1212.2844,2.8906);
- // Masini Job
- masina1 = CreateVehicle(578, -103.7480, -1200.4038, 3.3278, 84.0000, -1, -1, 100);
- masina2 = CreateVehicle(578, -104.4939, -1204.9441, 3.3278, 84.0000, -1, -1, 100);
- masina3 = CreateVehicle(578, -108.5940, -1214.9368, 3.3278, 84.0000, -1, -1, 100);
- masina4 = CreateVehicle(578, -118.8193, -1224.0529, 3.3278, -4.0000, -1, -1, 100);
- masina5 = CreateVehicle(578, -123.7361, -1223.4977, 3.3278, -4.0000, -1, -1, 100);
- return 1;
- }
- public OnGameModeExit()
- {
- return 1;
- }
- public OnPlayerConnect(playerid)
- {
- PasJob[playerid] = 0;
- RemoveBuildingForPlayer(playerid, 1447, -107.0859, -1196.0859, 3.0391, 0.25);
- RemoveBuildingForPlayer(playerid, 1412, -112.1719, -1194.7500, 3.0391, 0.25);
- RemoveBuildingForPlayer(playerid, 1413, -101.2891, -1215.5859, 2.9609, 0.25);
- RemoveBuildingForPlayer(playerid, 1447, -100.1797, -1210.0781, 3.0391, 0.25);
- RemoveBuildingForPlayer(playerid, 1413, -102.1328, -1197.1641, 2.9609, 0.25);
- RemoveBuildingForPlayer(playerid, 1412, -98.9219, -1204.9141, 3.0391, 0.25);
- RemoveBuildingForPlayer(playerid, 1412, -98.8750, -1199.9297, 3.0391, 0.25);
- return 1;
- }
- public EsteMasinaJOB(carid)
- {
- if(carid == masina1||carid == masina2||carid == masina3||carid == masina4||carid == masina5)
- {
- return 1;
- }
- return 0;
- }
- public OnPlayerStateChange(playerid, newstate, oldstate)
- {
- new newcar = GetPlayerVehicleID(playerid);
- if(EsteMasinaJOB(newcar))
- {
- if(PasJob[playerid] == 0)
- {
- SendClientMessage(playerid, 0xFF0000C8, "Nu ai jobul de taietor de lmne!");
- RemovePlayerFromVehicle(playerid);
- }
- if(PasJob[playerid] == 1)
- {
- SendClientMessage(playerid, 0xFFFF00C8, "Dute la checkpoint-ul marcat pe radar pentru a incepe munca..");
- SetPlayerCheckpoint(playerid, -233.0633,-1218.7089,6.5594, 5);
- PasJob[playerid] = 2;
- masina[playerid] = newcar;
- return 1;
- }
- }
- return 1;
- }
- public OnPlayerDisconnect(playerid, reason)
- {
- return 1;
- }
- public OnPlayerSpawn(playerid)
- {
- return 1;
- }
- public OnPlayerDeath(playerid, killerid, reason)
- {
- return 1;
- }
- public OnVehicleSpawn(vehicleid)
- {
- return 1;
- }
- public OnVehicleDeath(vehicleid, killerid)
- {
- return 1;
- }
- public OnPlayerText(playerid, text[])
- {
- return 1;
- }
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- if (strcmp("/incepemunca", cmdtext, true, 10) == 0)
- {
- if(IsPlayerInRangeOfPoint(playerid, 3, -87.8051,-1212.2844,2.8906))
- {
- if(PasJob[playerid] == 0)
- {
- ShowPlayerDialog(playerid, 1, DIALOG_STYLE_MSGBOX, "{FFFFFF}Taietor de lemne", "{FFFFFF}Timp Lucru: {FF8000}7 Minute\n{FFFFFF}Suma Castigata: {FF8000}100.000$","Inchide", "");
- skinjob[playerid] = GetPlayerSkin(playerid);
- SetPlayerSkin(playerid, 1);
- PasJob[playerid] = 1;
- SendClientMessage(playerid, 0xFFFFFFAA, "Intra intr-un vehicul pentru a incepe.");
- }
- else
- {
- SendClientMessage(playerid, 0xFFFFFFAA, "Nu trebuia sa ai alt loc de munca , sau alta sarcina in progres!");
- return 1;
- }
- }
- else
- {
- SendClientMessage(playerid, 0xFFFFFFAA, "Nu esti in cabina de schimbare!");
- return 1;
- }
- return 1;
- }
- return 0;
- }
- public OnPlayerEnterCheckpoint(playerid)
- {
- if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER && EsteMasinaJOB(GetPlayerVehicleID(playerid)))
- {
- if(PasJob[playerid] == 2 && IsPlayerInRangeOfPoint(playerid, 5, -233.0633,-1218.7089,6.5594))
- {
- DisablePlayerCheckpoint(playerid);
- SendClientMessage(playerid, 0xFFFFFFAA, "Parcheaza Masina in lateral.");
- SetPlayerCheckpoint(playerid, -242.7653,-1198.1378,7.4173, 5);
- PasJob[playerid] = 3;
- }
- else if(PasJob[playerid] == 3 && IsPlayerInRangeOfPoint(playerid, 5, -242.7653,-1198.1378,7.4173))
- {
- DisablePlayerCheckpoint(playerid);
- SendClientMessage(playerid, 0xFFFFFFAA, "Coboara din vehicul si dute la copacii pentru ai taia.");
- SetPlayerCheckpoint(playerid, -253.6463,-1220.2349,6.1858, 1.0);
- PasJob[playerid] = 4;
- }
- else if(PasJob[playerid] == 12 && IsPlayerInRangeOfPoint(playerid, 5, -380.8114,-1426.4735,25.7750))
- {
- new vehid;
- vehid = GetPlayerVehicleID(playerid);
- DisablePlayerCheckpoint(playerid);
- SendClientMessage(playerid, 0xFFFFFFAA, "Ai terminat slujba , ai primit : $100.000");
- GivePlayerMoney(playerid, 100000);
- DestroyPlayerObject(playerid, objjob[playerid]);
- SetVehicleToRespawn(vehid);
- SetPlayerSkin(playerid, 20);
- PasJob[playerid] = 0;
- masina[playerid] = 0;
- }
- }
- else if(GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
- {
- if(PasJob[playerid] == 4 && IsPlayerInRangeOfPoint(playerid, 1, -253.6463,-1220.2349,6.1858))
- {
- DisablePlayerCheckpoint(playerid);
- TogglePlayerControllable(playerid, 0);
- timecut[playerid] = SetTimerEx("timpjob",5000,false,"i", playerid);
- }
- else if(PasJob[playerid] == 5 && IsPlayerInRangeOfPoint(playerid, 2, -103.7549, -1546.4635, 2.6107))
- {
- DisablePlayerCheckpoint(playerid);
- if(IsPlayerAttachedObjectSlotUsed(playerid,1)) RemovePlayerAttachedObject(playerid,1);
- SendClientMessage(playerid, 0xFFFFFFAA, "Du-te acum la alt copac si taie-l.");
- SetPlayerCheckpoint(playerid, -245.1579,-1211.6552,6.7876, 1.0);
- PasJob[playerid] = 6;
- }
- else if(PasJob[playerid] == 6 && IsPlayerInRangeOfPoint(playerid, 1, -245.1579,-1211.6552,6.7876))
- {
- DisablePlayerCheckpoint(playerid);
- TogglePlayerControllable(playerid, 0);
- timecut[playerid] = SetTimerEx("timpjob",5000,false,"i", playerid);
- }
- else if(PasJob[playerid] == 7 && IsPlayerInRangeOfPoint(playerid, 2, -103.7549, -1546.4635, 2.6107))
- {
- DisablePlayerCheckpoint(playerid);
- if(IsPlayerAttachedObjectSlotUsed(playerid,1)) RemovePlayerAttachedObject(playerid,1);
- SetPlayerCheckpoint(playerid, -245.1579,-1211.6552,6.7876, 1.0);
- PasJob[playerid] = 8;
- }
- else if(PasJob[playerid] == 8 && IsPlayerInRangeOfPoint(playerid, 1, -245.1579,-1211.6552,6.7876))
- {
- DisablePlayerCheckpoint(playerid);
- TogglePlayerControllable(playerid, 0);
- timecut[playerid] = SetTimerEx("timpjob",5000,false,"i", playerid);
- }
- else if(PasJob[playerid] == 9 && IsPlayerInRangeOfPoint(playerid, 2, -103.7549, -1546.4635, 2.6107))
- {
- DisablePlayerCheckpoint(playerid);
- if(IsPlayerAttachedObjectSlotUsed(playerid,1)) RemovePlayerAttachedObject(playerid,1);
- SetPlayerCheckpoint(playerid, -255.9491,-1219.1299,6.5362, 1.0);
- PasJob[playerid] = 10;
- }
- else if(PasJob[playerid] == 10 && IsPlayerInRangeOfPoint(playerid, 1, -255.9491,-1219.1299,6.5362))
- {
- DisablePlayerCheckpoint(playerid);
- TogglePlayerControllable(playerid, 0);
- timecut[playerid] = SetTimerEx("timpjob",5000,false,"i", playerid);
- }
- else if(PasJob[playerid] == 11 && IsPlayerInRangeOfPoint(playerid, 2, -103.7549, -1546.4635, 2.6107))
- {
- DisablePlayerCheckpoint(playerid);
- if(IsPlayerAttachedObjectSlotUsed(playerid,1)) RemovePlayerAttachedObject(playerid,1);
- objjob[playerid] = CreatePlayerObject(playerid, 18609, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 300.0);
- AttachPlayerObjectToVehicle(playerid, objjob[playerid], masina[playerid], -0.06195, -4.93747, 0.73480, 0.00000, 0.00000, 5.00000);
- SendClientMessage(playerid, 0xFFFFFFAA, "Ai Adunat Lemnele necesare , urca in vehicul si dute sa duci lemnele la depozit.");
- SetPlayerCheckpoint(playerid, -380.8114,-1426.4735,25.7750, 5);
- PasJob[playerid] = 12;
- }
- }
- return 1;
- }
- public timpjob(playerid)
- {
- if(PasJob[playerid] == 4)
- {
- TogglePlayerControllable(playerid, 1);
- SetPlayerAttachedObject(playerid, 1, 1463, 1,0.20,0.36,0.0,0.0,90.0, 0.0, 0.4, 0.3, 0.6);
- ApplyAnimation(playerid,"CARRY","crry_prtial",4.0,1,0,0,1,1,1);
- SetPlayerCheckpoint(playerid,-245.1016,-1198.7922,7.1984,2.0);
- PasJob[playerid] = 5;
- SendClientMessage(playerid, 0xFFFFFFAA, "Du-te si incarca lemnele in masina.");
- }
- if(PasJob[playerid] == 6)
- {
- TogglePlayerControllable(playerid, 1);
- SetPlayerAttachedObject(playerid, 1, 1463, 1,0.20,0.36,0.0,0.0,90.0, 0.0, 0.4, 0.3, 0.6);
- ApplyAnimation(playerid,"CARRY","crry_prtial",4.0,1,0,0,1,1,1);
- SetPlayerCheckpoint(playerid,-245.1016,-1198.7922,7.1984,2.0);
- PasJob[playerid] = 7;
- }
- if(PasJob[playerid] == 8)
- {
- TogglePlayerControllable(playerid, 1);
- SetPlayerAttachedObject(playerid, 1, 1463, 1,0.20,0.36,0.0,0.0,90.0, 0.0, 0.4, 0.3, 0.6);
- ApplyAnimation(playerid,"CARRY","crry_prtial",4.0,1,0,0,1,1,1);
- SetPlayerCheckpoint(playerid,-245.1016,-1198.7922,7.1984,2.0);
- PasJob[playerid] = 9;
- }
- if(PasJob[playerid] == 10)
- {
- TogglePlayerControllable(playerid, 1);
- SetPlayerAttachedObject(playerid, 1, 1463, 1,0.20,0.36,0.0,0.0,90.0, 0.0, 0.4, 0.3, 0.6);
- ApplyAnimation(playerid,"CARRY","crry_prtial",4.0,1,0,0,1,1,1);
- SetPlayerCheckpoint(playerid,-245.1016,-1198.7922,7.1984,2.0);
- PasJob[playerid] = 11;
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement