Advertisement
xt3z0ne

Untitled

Dec 23rd, 2018
186
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 11.00 KB | None | 0 0
  1. //=================================[JOB TAIETOR LEMNE V1.0 [BETA] @pawno school]=======================================================
  2. //========================================[Job Creat de Famous (Anubis)]=====================================================================
  3. #include <a_samp>
  4. #include <a_objects>
  5. #include <streamer>
  6.  
  7. #if defined FILTERSCRIPT
  8. #define COLOR_RED 0xE60000FF
  9. #endif
  10.  
  11. forward EsteMasinaJOB(carid);
  12. forward timpjob(playerid);
  13.  
  14. new objjob[MAX_PLAYERS];
  15. new timecut[MAX_PLAYERS];
  16. new skinjob[MAX_PLAYERS];
  17. new masina[MAX_PLAYERS];
  18. new PasJob[MAX_PLAYERS];
  19. new masina1, masina2, masina3, masina4, masina5;
  20.  
  21. public OnFilterScriptInit()
  22. {
  23.     print("\n--------------------------------------");
  24.     print(" Job Taietor lemne by pawno School loaded");
  25.     print("--------------------------------------\n");
  26.     return 1;
  27. }
  28.  
  29. public OnFilterScriptExit()
  30. {
  31.     return 1;
  32. }
  33.  
  34.  
  35. main()
  36. {
  37.     print("\n--------------------------------------");
  38.     print(" Job Taietor lemne by pawno school unloaded");
  39.     print("--------------------------------------\n");
  40.     return 1;
  41. }
  42.  
  43.  
  44. public OnGameModeInit()
  45. {
  46.     // Obiective
  47.     CreateObject(3276, -117.14592, -1199.96472, 2.72656,   3.14159, 0.00000, 1.90836);
  48.     CreateObject(3276, -106.42129, -1217.62317, 2.72660,   357.00000, 0.00000, -8.00000);
  49.     CreateObject(3276, -99.50285, -1198.14978, 2.72660,   357.00000, 0.00000, -14.00000);
  50.     CreateObject(3276, -110.37328, -1195.47974, 2.72660,   357.00000, 0.00000, -12.00000);
  51.     CreateObject(967, -100.37933, -1217.53540, 1.68390,   0.00000, 0.00000, -185.00000);
  52.     // 3dtext + pickup
  53.     Create3DTextLabel("Job Taietor de Lemne\nTasteaza /incepemunca pentru a incepe", 0xFFFFFFAA, -87.8051,-1212.2844,2.8906);
  54.     AddStaticPickup(1275, 23, -87.8051,-1212.2844,2.8906);
  55.     // Masini Job
  56.     masina1 = CreateVehicle(578, -103.7480, -1200.4038, 3.3278, 84.0000, -1, -1, 100);
  57.     masina2 = CreateVehicle(578, -104.4939, -1204.9441, 3.3278, 84.0000, -1, -1, 100);
  58.     masina3 = CreateVehicle(578, -108.5940, -1214.9368, 3.3278, 84.0000, -1, -1, 100);
  59.     masina4 = CreateVehicle(578, -118.8193, -1224.0529, 3.3278, -4.0000, -1, -1, 100);
  60.     masina5 = CreateVehicle(578, -123.7361, -1223.4977, 3.3278, -4.0000, -1, -1, 100);
  61.     return 1;
  62. }
  63.  
  64. public OnGameModeExit()
  65. {
  66.     return 1;
  67. }
  68. public OnPlayerConnect(playerid)
  69. {
  70.     PasJob[playerid] = 0;
  71.     RemoveBuildingForPlayer(playerid, 1447, -107.0859, -1196.0859, 3.0391, 0.25);
  72.     RemoveBuildingForPlayer(playerid, 1412, -112.1719, -1194.7500, 3.0391, 0.25);
  73.     RemoveBuildingForPlayer(playerid, 1413, -101.2891, -1215.5859, 2.9609, 0.25);
  74.     RemoveBuildingForPlayer(playerid, 1447, -100.1797, -1210.0781, 3.0391, 0.25);
  75.     RemoveBuildingForPlayer(playerid, 1413, -102.1328, -1197.1641, 2.9609, 0.25);
  76.     RemoveBuildingForPlayer(playerid, 1412, -98.9219, -1204.9141, 3.0391, 0.25);
  77.     RemoveBuildingForPlayer(playerid, 1412, -98.8750, -1199.9297, 3.0391, 0.25);
  78.     return 1;
  79. }
  80. public EsteMasinaJOB(carid)
  81. {
  82.     if(carid == masina1||carid == masina2||carid == masina3||carid == masina4||carid == masina5)
  83.     {
  84.         return 1;
  85.     }
  86.     return 0;
  87. }
  88. public OnPlayerStateChange(playerid, newstate, oldstate)
  89. {
  90.     new newcar = GetPlayerVehicleID(playerid);
  91.     if(EsteMasinaJOB(newcar))
  92.     {
  93.         if(PasJob[playerid] == 0)
  94.         {
  95.             SendClientMessage(playerid, 0xFF0000C8, "Nu ai jobul de taietor de lmne!");
  96.             RemovePlayerFromVehicle(playerid);
  97.         }
  98.         if(PasJob[playerid] == 1)
  99.         {
  100.             SendClientMessage(playerid, 0xFFFF00C8, "Dute la checkpoint-ul marcat pe radar pentru a incepe munca..");
  101.             SetPlayerCheckpoint(playerid, -233.0633,-1218.7089,6.5594, 5);
  102.             PasJob[playerid] = 2;
  103.             masina[playerid] = newcar;
  104.             return 1;
  105.         }
  106.     }
  107.     return 1;
  108. }
  109. public OnPlayerDisconnect(playerid, reason)
  110. {
  111.     return 1;
  112. }
  113.  
  114. public OnPlayerSpawn(playerid)
  115. {
  116.     return 1;
  117. }
  118.  
  119. public OnPlayerDeath(playerid, killerid, reason)
  120. {
  121.     return 1;
  122. }
  123.  
  124. public OnVehicleSpawn(vehicleid)
  125. {
  126.     return 1;
  127. }
  128.  
  129. public OnVehicleDeath(vehicleid, killerid)
  130. {
  131.     return 1;
  132. }
  133.  
  134. public OnPlayerText(playerid, text[])
  135. {
  136.     return 1;
  137. }
  138.  
  139. public OnPlayerCommandText(playerid, cmdtext[])
  140. {
  141.     if (strcmp("/incepemunca", cmdtext, true, 10) == 0)
  142.     {
  143.         if(IsPlayerInRangeOfPoint(playerid, 3, -87.8051,-1212.2844,2.8906))
  144.         {
  145.             if(PasJob[playerid] == 0)
  146.             {
  147.                 ShowPlayerDialog(playerid, 1, DIALOG_STYLE_MSGBOX, "{FFFFFF}Taietor de lemne", "{FFFFFF}Timp Lucru: {FF8000}7 Minute\n{FFFFFF}Suma Castigata: {FF8000}100.000$","Inchide", "");
  148.                 skinjob[playerid] = GetPlayerSkin(playerid);
  149.                 SetPlayerSkin(playerid, 1);
  150.                 PasJob[playerid] = 1;
  151.                 SendClientMessage(playerid, 0xFFFFFFAA, "Intra intr-un vehicul pentru a incepe.");
  152.             }
  153.             else
  154.             {
  155.                 SendClientMessage(playerid, 0xFFFFFFAA, "Nu trebuia sa ai alt loc de munca , sau alta sarcina in progres!");
  156.                 return 1;
  157.             }
  158.         }
  159.         else
  160.         {
  161.             SendClientMessage(playerid, 0xFFFFFFAA, "Nu esti in cabina de schimbare!");
  162.             return 1;
  163.         }
  164.         return 1;
  165.     }
  166.     return 0;
  167. }
  168. public OnPlayerEnterCheckpoint(playerid)
  169. {
  170.     if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER && EsteMasinaJOB(GetPlayerVehicleID(playerid)))
  171.     {
  172.         if(PasJob[playerid] == 2 && IsPlayerInRangeOfPoint(playerid, 5, -233.0633,-1218.7089,6.5594))
  173.         {
  174.             DisablePlayerCheckpoint(playerid);
  175.             SendClientMessage(playerid, 0xFFFFFFAA, "Parcheaza Masina in lateral.");
  176.             SetPlayerCheckpoint(playerid, -242.7653,-1198.1378,7.4173, 5);
  177.             PasJob[playerid] = 3;
  178.         }
  179.         else if(PasJob[playerid] == 3 && IsPlayerInRangeOfPoint(playerid, 5, -242.7653,-1198.1378,7.4173))
  180.         {
  181.             DisablePlayerCheckpoint(playerid);
  182.             SendClientMessage(playerid, 0xFFFFFFAA, "Coboara din vehicul si dute la copacii pentru ai taia.");
  183.             SetPlayerCheckpoint(playerid, -253.6463,-1220.2349,6.1858, 1.0);
  184.             PasJob[playerid] = 4;
  185.         }
  186.         else if(PasJob[playerid] == 12 && IsPlayerInRangeOfPoint(playerid, 5, -380.8114,-1426.4735,25.7750))
  187.         {
  188.             new vehid;
  189.             vehid = GetPlayerVehicleID(playerid);
  190.             DisablePlayerCheckpoint(playerid);
  191.             SendClientMessage(playerid, 0xFFFFFFAA, "Ai terminat slujba , ai primit : $100.000");
  192.             GivePlayerMoney(playerid, 100000);
  193.             DestroyPlayerObject(playerid, objjob[playerid]);
  194.             SetVehicleToRespawn(vehid);
  195.             SetPlayerSkin(playerid, 20);
  196.             PasJob[playerid] = 0;
  197.             masina[playerid] = 0;
  198.         }
  199.     }
  200.     else if(GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
  201.     {
  202.         if(PasJob[playerid] == 4 && IsPlayerInRangeOfPoint(playerid, 1, -253.6463,-1220.2349,6.1858))
  203.         {
  204.             DisablePlayerCheckpoint(playerid);
  205.             TogglePlayerControllable(playerid, 0);
  206.             timecut[playerid] = SetTimerEx("timpjob",5000,false,"i", playerid);
  207.         }
  208.         else if(PasJob[playerid] == 5 && IsPlayerInRangeOfPoint(playerid, 2, -103.7549, -1546.4635, 2.6107))
  209.         {
  210.             DisablePlayerCheckpoint(playerid);
  211.             if(IsPlayerAttachedObjectSlotUsed(playerid,1)) RemovePlayerAttachedObject(playerid,1);
  212.             SendClientMessage(playerid, 0xFFFFFFAA, "Du-te acum la alt copac si taie-l.");
  213.             SetPlayerCheckpoint(playerid, -245.1579,-1211.6552,6.7876, 1.0);
  214.             PasJob[playerid] = 6;
  215.         }
  216.         else if(PasJob[playerid] == 6 && IsPlayerInRangeOfPoint(playerid, 1, -245.1579,-1211.6552,6.7876))
  217.         {
  218.             DisablePlayerCheckpoint(playerid);
  219.             TogglePlayerControllable(playerid, 0);
  220.             timecut[playerid] = SetTimerEx("timpjob",5000,false,"i", playerid);
  221.         }
  222.         else if(PasJob[playerid] == 7 && IsPlayerInRangeOfPoint(playerid, 2, -103.7549, -1546.4635, 2.6107))
  223.         {
  224.             DisablePlayerCheckpoint(playerid);
  225.             if(IsPlayerAttachedObjectSlotUsed(playerid,1)) RemovePlayerAttachedObject(playerid,1);
  226.             SetPlayerCheckpoint(playerid, -245.1579,-1211.6552,6.7876, 1.0);
  227.             PasJob[playerid] = 8;
  228.         }
  229.         else if(PasJob[playerid] == 8 && IsPlayerInRangeOfPoint(playerid, 1, -245.1579,-1211.6552,6.7876))
  230.         {
  231.             DisablePlayerCheckpoint(playerid);
  232.             TogglePlayerControllable(playerid, 0);
  233.             timecut[playerid] = SetTimerEx("timpjob",5000,false,"i", playerid);
  234.         }
  235.         else if(PasJob[playerid] == 9 && IsPlayerInRangeOfPoint(playerid, 2, -103.7549, -1546.4635, 2.6107))
  236.         {
  237.             DisablePlayerCheckpoint(playerid);
  238.             if(IsPlayerAttachedObjectSlotUsed(playerid,1)) RemovePlayerAttachedObject(playerid,1);
  239.             SetPlayerCheckpoint(playerid, -255.9491,-1219.1299,6.5362, 1.0);
  240.             PasJob[playerid] = 10;
  241.         }
  242.         else if(PasJob[playerid] == 10 && IsPlayerInRangeOfPoint(playerid, 1, -255.9491,-1219.1299,6.5362))
  243.         {
  244.             DisablePlayerCheckpoint(playerid);
  245.             TogglePlayerControllable(playerid, 0);
  246.             timecut[playerid] = SetTimerEx("timpjob",5000,false,"i", playerid);
  247.         }
  248.         else if(PasJob[playerid] == 11 && IsPlayerInRangeOfPoint(playerid, 2, -103.7549, -1546.4635, 2.6107))
  249.         {
  250.             DisablePlayerCheckpoint(playerid);
  251.             if(IsPlayerAttachedObjectSlotUsed(playerid,1)) RemovePlayerAttachedObject(playerid,1);
  252.             objjob[playerid] = CreatePlayerObject(playerid, 18609, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 300.0);
  253.             AttachPlayerObjectToVehicle(playerid, objjob[playerid], masina[playerid], -0.06195, -4.93747, 0.73480, 0.00000, 0.00000, 5.00000);
  254.             SendClientMessage(playerid, 0xFFFFFFAA, "Ai Adunat Lemnele necesare , urca in vehicul si dute sa duci lemnele la depozit.");
  255.             SetPlayerCheckpoint(playerid, -380.8114,-1426.4735,25.7750, 5);
  256.             PasJob[playerid] = 12;
  257.         }
  258.     }
  259.     return 1;
  260. }
  261.  
  262. public timpjob(playerid)
  263. {
  264.         if(PasJob[playerid] == 4)
  265.         {
  266.                 TogglePlayerControllable(playerid, 1);
  267.                 SetPlayerAttachedObject(playerid, 1, 1463, 1,0.20,0.36,0.0,0.0,90.0, 0.0, 0.4, 0.3, 0.6);
  268.                 ApplyAnimation(playerid,"CARRY","crry_prtial",4.0,1,0,0,1,1,1);
  269.                 SetPlayerCheckpoint(playerid,-245.1016,-1198.7922,7.1984,2.0);
  270.                 PasJob[playerid] = 5;
  271.                 SendClientMessage(playerid, 0xFFFFFFAA, "Du-te si incarca lemnele in masina.");
  272.         }
  273.         if(PasJob[playerid] == 6)
  274.         {
  275.                 TogglePlayerControllable(playerid, 1);
  276.                 SetPlayerAttachedObject(playerid, 1, 1463, 1,0.20,0.36,0.0,0.0,90.0, 0.0, 0.4, 0.3, 0.6);
  277.                 ApplyAnimation(playerid,"CARRY","crry_prtial",4.0,1,0,0,1,1,1);
  278.                 SetPlayerCheckpoint(playerid,-245.1016,-1198.7922,7.1984,2.0);
  279.                 PasJob[playerid] = 7;
  280.         }
  281.         if(PasJob[playerid] == 8)
  282.         {
  283.                 TogglePlayerControllable(playerid, 1);
  284.                 SetPlayerAttachedObject(playerid, 1, 1463, 1,0.20,0.36,0.0,0.0,90.0, 0.0, 0.4, 0.3, 0.6);
  285.                 ApplyAnimation(playerid,"CARRY","crry_prtial",4.0,1,0,0,1,1,1);
  286.                 SetPlayerCheckpoint(playerid,-245.1016,-1198.7922,7.1984,2.0);
  287.                 PasJob[playerid] = 9;
  288.         }
  289.         if(PasJob[playerid] == 10)
  290.         {
  291.                 TogglePlayerControllable(playerid, 1);
  292.                 SetPlayerAttachedObject(playerid, 1, 1463, 1,0.20,0.36,0.0,0.0,90.0, 0.0, 0.4, 0.3, 0.6);
  293.                 ApplyAnimation(playerid,"CARRY","crry_prtial",4.0,1,0,0,1,1,1);
  294.                 SetPlayerCheckpoint(playerid,-245.1016,-1198.7922,7.1984,2.0);
  295.                 PasJob[playerid] = 11;
  296.         }
  297.         return 1;
  298. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement