SHARE
TWEET

Untitled

a guest May 15th, 2019 64 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <a_samp>
  2. #if defined FILTERSCRIPT
  3.  
  4. enum LaWSyS
  5. {
  6.     brojac_tacnih,
  7.     brojac_pogresnih,
  8.     brojac_postotka,
  9.     checker = 0,
  10.     papiri,
  11. };
  12. new LawSySInfo[MAX_PLAYERS][LaWSyS];
  13. #define LAW1 0
  14. #define LAW2 1
  15. #define LAW3 2
  16. #define LAW4 3
  17. #define LAW5 4
  18. #define LAW6 5
  19.  
  20. public OnFilterScriptInit()
  21. {
  22.     print("\n--------------------------------------");
  23.     print(" Lawyer System by RYZYK BETA v0.0.1");
  24.     print("--------------------------------------\n");
  25.     Create3DTextLabel("SUDNICA ULAZ\nKORISTITE 'F' DA UDJETE", 0x008080FF, 1111.9679,-1370.0303,13.9844, 40.0, 0, 0);
  26.     Create3DTextLabel("ODVJETNICKA SLUZBA\nKORISTITE 'F' DA UDJETE", 0x008080FF, 1104.7826,-1370.0306,13.9844, 40.0, 0, 0);
  27.     Create3DTextLabel("DIZANJE PAPIRA \nKORISTITE '/takepaper' DA UZMETE PAPIRE", 0x008080FF, 246.6737,118.5377,1003.2188, 40.0, 0, 0);
  28.     Create3DTextLabel("SOBA 1 \nKORISTITE '/start' DA PRISTUPITE ROCISTU", 0x008080FF, 2315.6338,0.3556,26.7422, 40.0, 0, 0);
  29.     CreatePickup(1239, 2, 1111.9679,-1370.0303,13.9844, 0); //sudnica
  30.     CreatePickup(1239, 2, 1104.7826,-1370.0306,13.9844, 0); //papirara
  31.     CreatePickup(1239, 2, 2315.6338,0.3556,26.742, 0); //SOBA 1 U SUDNICI
  32.     CreatePickup(1239,2, 246.6737,118.5377,1003.2188, 0); // DIZANJE PAPIRCINA
  33.     //Ulaz SUDNICA
  34.     if(IsPlayerInRangeOfPoint(playerid, 1.0, 1111.9679,-1370.0303,13.9844))
  35.     {
  36.             SetPlayerPos(playerid, 2315.952880,-1.618174,26.742187);
  37.             SetPlayerFacingAngle(playerid, 0.1497);
  38.             SetCameraBehindPlayer(playerid);
  39.             SetPlayerInterior(playerid, 0);
  40.     //Izlaz SUDNICA
  41.     if(IsPlayerInRangeOfPoint(playerid, 1.0, 2315.952880,-1.618174,26.742187))
  42.     {
  43.         SetPlayerPos(playerid, 1111.9679,-1370.0303,13.9844);
  44.         SetPlayerFacingAngle(playerid, 270.6266);
  45.         SetCameraBehindPlayer(playerid);
  46.         SetPlayerInterior(playerid, 0);
  47.     }
  48.     //Ulaz PAPIRI
  49.     if(IsPlayerInRangeOfPoint(playerid, 1.0, 1104.7826,-1370.0306,13.9844))
  50.     {
  51.             SetPlayerPos(playerid, 246.375991,109.245994,1003.218750);
  52.             SetPlayerFacingAngle(playerid, 0.1497);
  53.             SetCameraBehindPlayer(playerid);
  54.             SetPlayerInterior(playerid, 10);
  55.     //Izlaz PAPIRI
  56.     if(IsPlayerInRangeOfPoint(playerid, 1.0, 246.375991,109.245994,1003.218750))
  57.     {
  58.         SetPlayerPos(playerid, 1104.7826,-1370.0306,13.9844);
  59.         SetPlayerFacingAngle(playerid, 270.6266);
  60.         SetCameraBehindPlayer(playerid);
  61.         SetPlayerInterior(playerid, 0);
  62.     }
  63.     //ULAZ U SOBU 1
  64.     return 1;
  65. }
  66.  
  67. public OnFilterScriptExit()
  68. {
  69.     return 1;
  70. }
  71. #endif
  72.  
  73. public OnPlayerDisconnect(playerid, reason)
  74. {
  75.     return 1;
  76. }
  77.  
  78. public OnPlayerDeath(playerid, killerid, reason)
  79. {
  80.     return 1;
  81. }
  82.  
  83. public OnPlayerCommandText(playerid, cmdtext[])
  84. {
  85.     YCMD:start(playerid,params[],help)
  86.     {
  87.      #pragma unused help
  88.      if(IsPlayerInRangeOfPoint(playerid, 2.0, 2315.6338,0.3556,26.7422))
  89.      {
  90.         SetPlayerPos(playerid, -2029.798339,-106.675910,1035.171875);
  91.         SetPlayerFacingAngle(playerid, 0);
  92.         SetCameraBehindPlayer(playerid);
  93.         SetPlayerInterior(playerid, 3);
  94.         LawSySInfo[playerid][checker] = 1;
  95.         ShowPlayerDialog(playerid,0,DIALOG_STYLE_MSGBOX,"Osoba 'NN' je optuzena za ubistvo, Vi njega zastupate na sudu\nDa li cete govoriti samo istinu?","POCETAK","Da","Ne");
  96.         //papiri = papiri - 1;
  97.      }
  98.      return 1;
  99.     }
  100.     /*YCMD:takepaper(playerid,params[],help)
  101.     {
  102.      #pragma unused help
  103.      if(IsPlayerInRangeOfPoint(playerid, 2.0, 246.6737,118.5377,1003.2188))
  104.      {
  105.         papiri = 10;
  106.      }
  107.      return 1;
  108.     }*/
  109. }
  110. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  111. {
  112.     CheckingFunkcija(playerid, dialogid, response, listitem, inputtext);
  113.     return 1;
  114. }
  115.  
  116.  
  117. forward CheckingFunkcija(playerid, dialogid, response, listitem, inputtext[]);
  118. public CheckingFunkcija(playerid, dialogid, response, listitem, inputtext[])
  119.     {
  120.         new pogresni = 0; new tacni = 0; new ukupno = 0;
  121.         LawSySInfo[playerid][brojac_pogresnih] = pogresni;
  122.         LawSySInfo[playerid][brojac_tacnih] = tacni;
  123.         LawSySInfo[playerid][brojac_postotka] = ukupno;
  124.  
  125.         if(LawSySInfo[playerid][checker] == 1) {
  126.             if(dialogid == LAW1)
  127.             {
  128.                 if(!response)
  129.                 {
  130.                     pogresni = pogresni + 1;
  131.                 }
  132.                 if(response)
  133.                 {
  134.                     tacni = tacni + 1;
  135.                 }
  136.                 ShowPlayerDialog(playerid,1,DIALOG_STYLE_MSGBOX,"2. Faza","TEXT TEXT TEXT TEXT TEXT TEXT ","Da","Ne");
  137.                 LawSySInfo[playerid][checker] = 2;
  138.             }
  139.         }
  140.         if(LawSySInfo[playerid][checker] == 2)
  141.         {
  142.         if(dialogid == LAW2)
  143.         {
  144.             if(!response)
  145.             {
  146.                 pogresni = pogresni + 1;
  147.             }
  148.             if(response)
  149.             {
  150.                 tacni = tacni + 1;
  151.             }
  152.             ShowPlayerDialog(playerid,2,DIALOG_STYLE_MSGBOX,"3. Faza","TEXT TEXT TEXT TEXT TEXT TEXT ","Da","Ne");
  153.             LawSySInfo[playerid][checker] = 3;
  154.         }
  155.         }
  156.         if(LawSySInfo[playerid][checker] == 3)
  157.         {
  158.         if(dialogid == LAW3)
  159.         {
  160.             if(!response)
  161.             {
  162.                 pogresni = pogresni + 1;
  163.             }
  164.             if(response)
  165.             {
  166.                 tacni = tacni + 1;
  167.             }
  168.             ShowPlayerDialog(playerid,3,DIALOG_STYLE_MSGBOX,"5. Faza","TEXT TEXT TEXT TEXT TEXT TEXT ","Da","Ne");
  169.             LawSySInfo[playerid][checker] = 4;
  170.         }
  171.         }
  172.         if(LawSySInfo[playerid][checker] == 4)
  173.         {
  174.         if(dialogid == LAW4)
  175.         {
  176.             if(!response)
  177.             {
  178.                 pogresni = pogresni + 1;
  179.             }
  180.             if(response)
  181.             {
  182.                 tacni = tacni + 1;
  183.             }
  184.             ShowPlayerDialog(playerid,4,DIALOG_STYLE_MSGBOX,"5. Faza","TEXT TEXT TEXT TEXT TEXT TEXT ","Da","Ne");
  185.             LawSySInfo[playerid][checker] = 5;
  186.         }
  187.         }
  188.         if(LawSySInfo[playerid][checker] == 5)
  189.         {
  190.         if(dialogid == LAW5)
  191.         {
  192.             if(!response)
  193.             {
  194.                 pogresni = pogresni + 1;
  195.             }
  196.             if(response)
  197.             {
  198.                 tacni = tacni + 1;
  199.             }
  200.             ShowPlayerDialog(playerid,5,DIALOG_STYLE_MSGBOX,"6. Faza","TEXT TEXT TEXT TEXT TEXT TEXT ","Da","Ne");
  201.             LawSySInfo[playerid][checker] = 6;
  202.         }
  203.         }
  204.         ukupno = tacni - pogresni;
  205.         if(ukupno >= 3)
  206.         {
  207.             ShowPlayerDialog(playerid,5,DIALOG_STYLE_MSGBOX,"REZULTAT ROCISTA", "Uspjesno ste odbranili 'NN' osobu, te ste zaradili 0 $", "UREDU", "");
  208.             SetPlayerPos(playerid, 2315.6338,0.3556,26.7422);
  209.         }
  210.         else
  211.         {
  212.             ShowPlayerDialog(playerid,5,DIALOG_STYLE_MSGBOX,"REZULTAT ROCISTA", "Uspjesno ste odbranili 'NN' osobu, te ste zaradili 0 $", "UREDU", "");
  213.             SetPlayerPos(playerid, 2315.6338,0.3556,26.7422);
  214.         }
  215.         LawSySInfo[playerid][checker] = 0;
  216.     }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top