MistarA

Untitled

Jul 31st, 2019
162
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 7.86 KB | None | 0 0
  1. public OnPlayerEnterCheckpoint(playerid)
  2. {
  3.     if(CP[playerid] == 2)
  4.     {
  5.         SetPlayerCheckpoint(playerid, 1193.2904,-1850.5420,13.2301, 10.0);
  6.         CP[playerid] = 3;
  7.     }
  8.     else if(CP[playerid] == 3)
  9.     {
  10.         SetPlayerCheckpoint(playerid, 1181.9321,-1814.2745,13.2300, 10.0);
  11.         CP[playerid] = 4;
  12.     }
  13.     else if(CP[playerid] == 4)
  14.     {
  15.         SetPlayerCheckpoint(playerid, 1182.0990,-1730.4120,13.2457, 10.0);
  16.         CP[playerid] = 5;
  17.     }
  18.     else if(CP[playerid] == 5)
  19.     {
  20.         SetPlayerCheckpoint(playerid, 1128.6094,-1709.5916,13.2537, 10.0);
  21.         CP[playerid] = 6;
  22.     }
  23.     else if(CP[playerid] == 6)
  24.     {
  25.         SetPlayerCheckpoint(playerid, 1051.3091,-1710.0724,13.2140, 10.0);
  26.         CP[playerid] = 7;
  27.     }
  28.     else if(CP[playerid] == 7)
  29.     {
  30.         SetPlayerCheckpoint(playerid, 1039.4108,-1587.2677,13.2141, 10.0);
  31.         CP[playerid] = 8;
  32.     }
  33.     else if(CP[playerid] == 8)
  34.     {
  35.         SetPlayerCheckpoint(playerid, 1132.9540,-1574.9415,13.1589,10.0);
  36.         CP[playerid] = 9;
  37.     }
  38.     else if(CP[playerid] == 9)
  39.     {
  40.         SetPlayerCheckpoint(playerid, 1147.4756,-1698.1432,13.6124,10.0);
  41.         CP[playerid] = 10;
  42.     }
  43.     else if(CP[playerid] == 10)
  44.     {
  45.         SetPlayerCheckpoint(playerid, 1173.3815,-1795.8291,13.2300, 10.0);
  46.         CP[playerid] = 11;
  47.     }
  48.     else if(CP[playerid] == 11)
  49.     {
  50.         SetPlayerCheckpoint(playerid, 1221.2018,-1854.4736,13.2144, 10.0);
  51.         CP[playerid] = 12;
  52.     }
  53.     else if(CP[playerid] == 12)
  54.     {
  55.         SendClientMessage(playerid, -1, "Ai luat licenta");
  56.         DisablePlayerCheckpoint(playerid);
  57.         DestroyVehicle(dmvcar);
  58.         CP[playerid] = 0;
  59.         SetPlayerPos(playerid, 1219.3933,-1812.2993,16.5938);
  60.     }
  61.     if(CP[playerid] == 13)
  62.     {
  63.         SetPlayerCheckpoint(playerid, -2401.0020,-634.1581,132.4767, 10.0);
  64.         CP[playerid] = 14;
  65.     }
  66.     if(CP[playerid] == 14)
  67.     {
  68.         SetPlayerCheckpoint(playerid, -2365.6960,-658.1545,123.7594, 10.0);
  69.         CP[playerid] = 15;
  70.     }
  71.     else if(CP[playerid] == 15)
  72.     {
  73.         SetPlayerCheckpoint(playerid, -2346.7271,-702.2609,112.9825, 10.0);
  74.         CP[playerid] = 17;
  75.     }
  76.     else if(CP[playerid] == 17)
  77.     {
  78.         SetPlayerCheckpoint(playerid, -2354.2009,-777.4311,96.2525, 10.0);
  79.         CP[playerid] = 18;
  80.     }
  81.     else if(CP[playerid] == 18)
  82.     {
  83.         SetPlayerCheckpoint(playerid, -2354.2009,-777.4311,96.2525, 10.0);
  84.         CP[playerid] = 19;
  85.     }
  86.     else if(CP[playerid] == 19)
  87.     {
  88.         SetPlayerCheckpoint(playerid, -2307.3904,-782.2130,91.1840, 10.0);
  89.         CP[playerid] = 20;
  90.     }
  91.     else if(CP[playerid] == 20)
  92.     {
  93.         SetPlayerCheckpoint(playerid, -2248.5417,-752.0539,72.3725, 10.0);
  94.         CP[playerid] = 21;
  95.     }
  96.     else if(CP[playerid] == 21)
  97.     {
  98.         SetPlayerCheckpoint(playerid, -2196.0088,-794.5374,61.8084, 10.0);
  99.         CP[playerid] = 22;
  100.     }
  101.     else if(CP[playerid] == 22)
  102.     {
  103.         SetPlayerCheckpoint(playerid, -2217.0916,-898.0983,49.5288, 10.0);
  104.         CP[playerid] = 23;
  105.     }
  106.     else if(CP[playerid] == 23)
  107.     {
  108.         SetPlayerCheckpoint(playerid, -2209.4456,-986.7352,38.6899, 10.0);
  109.         CP[playerid] = 24;
  110.     }
  111.     else if(CP[playerid] == 24)
  112.     {
  113.         SendClientMessage(playerid, -1, "Ai luat licenta");
  114.         DisablePlayerCheckpoint(playerid);
  115.         DestroyVehicle(dmvcar);
  116.         SetPlayerPos(playerid, 1219.3933,-1812.2993,16.5938);
  117.     }
  118. }
  119.  
  120. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  121. {
  122.     if(dialogid == 1)
  123.     {
  124.         if(response)
  125.         {
  126.             switch(listitem)
  127.             {
  128.                 case 0:
  129.                 {
  130.                 ShowPlayerDialog(playerid, 2, DIALOG_STYLE_LIST, "Cand ai voie sa depasesti?", "Oricand\nPe linie continua\nPe linie intrerupta", "Alege", "Cancel");
  131.                 }
  132.                 case 1:
  133.                 {
  134.                 ShowPlayerDialog(playerid, 7, DIALOG_STYLE_LIST, "Cand ai voie sa depasesti?", "Oricand\nPe linie continua\nPe linie intrerupta", "Alege", "Cancel");
  135.                 }
  136.             }
  137.         }
  138.     }
  139.     if(dialogid == 2)
  140.     {
  141.         if(response)
  142.         {
  143.             if(listitem == 2)
  144.             {
  145.                 ShowPlayerDialog(playerid, 3, DIALOG_STYLE_LIST, "Care este viteza cu care trebuie sa circulati in oras?", "100km\n30km\n40km\n50km", "Alege", "Cancel");
  146.             }
  147.             else SendClientMessage(playerid, -1, "Ne pare rau dar ati raspuns gresit si ati picat testul");
  148.         }
  149.     }
  150.     if(dialogid == 3)
  151.     {
  152.         if(response)
  153.         {
  154.             if(listitem == 3)
  155.             {
  156.                 ShowPlayerDialog(playerid, 4, DIALOG_STYLE_LIST, "Cand ai voie sa opresti?", "Cand stationez, dar niciodata pe strada\nNu am voie", "Alege", "Cancel");
  157.             }
  158.             else SendClientMessage(playerid, -1, "Ne pare rau dar ati raspuns gresit si ati picat testul");
  159.         }
  160.     }
  161.     if(dialogid == 4)
  162.     {
  163.         if(response)
  164.         {
  165.             if(listitem == 0)
  166.             {
  167.                 ShowPlayerDialog(playerid, 5, DIALOG_STYLE_LIST, "Politia aprinde semnalele sonore ce faci?", "Imi continui drumul\nMa bag in fata ei\nClaxonez si eu\nMa dau pe partea dreapta a carosabilului", "Alege", "Cancel");
  168.             }
  169.             else SendClientMessage(playerid, -1, "Ne pare rau dar ati raspuns gresit si ati picat testul");
  170.         }
  171.     }
  172.     if(dialogid == 5)
  173.     {
  174.         if(response)
  175.         {
  176.             if(listitem == 3)
  177.             {
  178.                 ShowPlayerDialog(playerid, 6, DIALOG_STYLE_LIST, "Ce faci cand faci un accident?", "Sun la politie\nStau in masina\nPlec linistit", "Alege", "Cancel");
  179.             }
  180.             else SendClientMessage(playerid, -1, "Ne pare rau dar ati raspuns gresit si ati picat testul");
  181.         }
  182.     }
  183.     if(dialogid == 6)
  184.     {
  185.         if(response)
  186.         {
  187.             if(listitem == 0)
  188.             {
  189.                 //DMVTest[playerid] = 1;
  190.                 SendClientMessage(playerid, -1, "Ai fost dus de catre instructor intr-o masina de {009900}DMV{FFFFFF} urmeaza checkpoint-urile");
  191.                 dmvcar = AddStaticVehicle(507, 1279.2177,-1810.4950,13.2623,87.2657, 1, 1);
  192.                 PutPlayerInVehicle(playerid, dmvcar,0);
  193.                 CP[playerid] = 2;
  194.                 SetPlayerCheckpoint(playerid, 1213.3649,-1842.2529,13.2146,10.0);
  195.             }
  196.             else SendClientMessage(playerid, -1, "Ne pare rau dar ati raspuns gresit si ati picat testul");
  197.         }
  198.     }
  199.     if(dialogid == 7)
  200.     {
  201.         if(response)
  202.         {
  203.             if(listitem == 2)
  204.             {
  205.                 ShowPlayerDialog(playerid, 8, DIALOG_STYLE_LIST, "Care este viteza cu care trebuie sa circulati in oras?", "100km\n30km\n40km\n50km", "Alege", "Cancel");
  206.             }
  207.             else SendClientMessage(playerid, -1, "Ne pare rau dar ati raspuns gresit si ati picat testul");
  208.         }
  209.     }
  210.     if(dialogid == 8)
  211.     {
  212.         if(response)
  213.         {
  214.             if(listitem == 3)
  215.             {
  216.                 ShowPlayerDialog(playerid, 9, DIALOG_STYLE_LIST, "Cand ai voie sa opresti?", "Cand stationez, dar niciodata pe strada\nNu am voie", "Alege", "Cancel");
  217.             }
  218.             else SendClientMessage(playerid, -1, "Ne pare rau dar ati raspuns gresit si ati picat testul");
  219.         }
  220.     }
  221.     if(dialogid == 9)
  222.     {
  223.         if(response)
  224.         {
  225.             if(listitem == 0)
  226.             {
  227.                 ShowPlayerDialog(playerid, 10, DIALOG_STYLE_LIST, "Politia aprinde semnalele sonore ce faci?", "Imi continui drumul\nMa bag in fata ei\nClaxonez si eu\nMa dau pe partea dreapta a carosabilului", "Alege", "Cancel");
  228.             }
  229.             else SendClientMessage(playerid, -1, "Ne pare rau dar ati raspuns gresit si ati picat testul");
  230.         }
  231.     }
  232.     if(dialogid == 10)
  233.     {
  234.         if(response)
  235.         {
  236.             if(listitem == 3)
  237.             {
  238.                 ShowPlayerDialog(playerid, 11, DIALOG_STYLE_LIST, "Ce faci cand faci un accident?", "Sun la politie\nStau in masina\nPlec linistit", "Alege", "Cancel");
  239.             }
  240.             else SendClientMessage(playerid, -1, "Ne pare rau dar ati raspuns gresit si ati picat testul");
  241.         }
  242.     }
  243.     if(dialogid == 11)
  244.     {
  245.         if(response)
  246.         {
  247.             if(listitem == 0)
  248.             {
  249.                 //DMVTest[playerid] = 1;
  250.                 SendClientMessage(playerid, -1, "Ai fost dus de catre instructor intr-o masina de {009900}DMV{FFFFFF} urmeaza checkpoint-urile");
  251.                 dmvcar = AddStaticVehicle(515, -2503.9717,-614.2415,133.5815,267.3998, 1, 1);
  252.                 //dmvcar = AddStaticVehicle(435, x,y,z, 1, 1);
  253.                 PutPlayerInVehicle(playerid, dmvcar,0);
  254.                 CP[playerid] = 13;
  255.                 SetPlayerCheckpoint(playerid, -2435.4392,-615.8443,133.5792,10.0);
  256.             }
  257.             else SendClientMessage(playerid, -1, "Ne pare rau dar ati raspuns gresit si ati picat testul");
  258.             }
  259.         }
  260.     }
  261.  
  262. CMD:dmv(playerid, params[])
  263. {
  264.     if(IsPlayerConnected(playerid))
  265.     {
  266.         ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "DMV", "1.Categoria B (cars)\n2.Categoria C (camioane)", "Alege", "Iesi");
  267.     }
  268.     return 1;
  269. }
Advertisement
Add Comment
Please, Sign In to add comment