Guest User

Crash

a guest
Aug 7th, 2016
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 10.85 KB | None | 0 0
  1. CMD:editinthouse(playerid,params[])
  2. {
  3.  if(PlayerInfo[playerid][pAdmin] < 1337) return SCM(playerid,grey,"Niste ovlasceni da koristite tu komandu !");
  4.  new int;
  5.  if(sscanf(params, "i",int))
  6.  {
  7.  SCM(playerid,-1,"KORISCENJE: /edithouseint [Id Interiera]");
  8.  SCM(playerid,-1,"INTERIJERI : Big Interiors 1-5 | Medium Interiors 6-25 | Small Interiors 26-37");
  9.  return 1;
  10.  }
  11.  for(new i; i < MAX_HOUSE; i++)
  12.  {
  13.  if(IsPlayerInRangeOfPoint(playerid, 3.0, KucaInfo[i][kUlazX], KucaInfo[i][kUlazY], KucaInfo[i][kUlazZ]))
  14.  {
  15.  if(int == 1)
  16.  {
  17.   KucaInfo[i][kInt] = 5;
  18.   KucaInfo[i][kIzlazX] = 140.17;
  19.   KucaInfo[i][kIzlazY] = 1366.07;
  20.   KucaInfo[i][kIzlazZ] = 1083.65;
  21.   SCM(playerid,grey,"Postavili ste Interier ove kuce na (ID:1)");
  22.   SacuvajKucu(i);
  23.  }
  24.   if(int == 2)
  25.  {
  26.   KucaInfo[i][kInt] = 12;
  27.   KucaInfo[i][kIzlazX] = 2324.53;
  28.   KucaInfo[i][kIzlazY] = -1149.54;
  29.   KucaInfo[i][kIzlazZ] = 1050.71;
  30.   SCM(playerid,grey,"Postavili ste Interier ove kuce na (ID:2)");
  31.   SacuvajKucu(i);
  32.  }
  33.   if(int == 3)
  34.  {
  35.   KucaInfo[i][kInt] = 7;
  36.   KucaInfo[i][kIzlazX] = 225.68;
  37.   KucaInfo[i][kIzlazY] = 1021.45;
  38.   KucaInfo[i][kIzlazZ] = 1084.02;
  39.   SCM(playerid,grey,"Postavili ste Interier ove kuce na (ID:3)");
  40.   SacuvajKucu(i);
  41.  }
  42.   if(int == 4)
  43.  {
  44.   KucaInfo[i][kInt] = 6;
  45.   KucaInfo[i][kIzlazX] = 234.19;
  46.   KucaInfo[i][kIzlazY] = 1063.73;
  47.   KucaInfo[i][kIzlazZ] = 1084.21;
  48.   SCM(playerid,grey,"Postavili ste Interier ove kuce na (ID:4)");
  49.   SacuvajKucu(i);
  50.  }
  51.   if(int == 5)
  52.  {
  53.   KucaInfo[i][kInt] = 5;
  54.   KucaInfo[i][kIzlazX] = 226.30;
  55.   KucaInfo[i][kIzlazY] = 1114.24;
  56.   KucaInfo[i][kIzlazZ] = 1080.99;
  57.   SCM(playerid,grey,"Postavili ste Interier ove kuce na (ID:5)");
  58.   SacuvajKucu(i);
  59.  }
  60.  //medium
  61.   if(int == 6)
  62.  {
  63.   KucaInfo[i][kInt] = 3;
  64.   KucaInfo[i][kIzlazX] = 235.34 ;
  65.   KucaInfo[i][kIzlazY] = 1186.68;
  66.   KucaInfo[i][kIzlazZ] = 1080.26;
  67.   SCM(playerid,grey,"Postavili ste Interier ove kuce na (ID:6)");
  68.   SacuvajKucu(i);
  69.  }
  70.   if(int == 7)
  71.  {
  72.   KucaInfo[i][kInt] = 2;
  73.   KucaInfo[i][kIzlazX] = 491.07 ;
  74.   KucaInfo[i][kIzlazY] = 1398.50;
  75.   KucaInfo[i][kIzlazZ] = 1080.26;
  76.   SCM(playerid,grey,"Postavili ste Interier ove kuce na (ID:7)");
  77.   SacuvajKucu(i);
  78.  }
  79.   if(int == 8)
  80.  {
  81.   KucaInfo[i][kInt] = 10;
  82.   KucaInfo[i][kIzlazX] = 24.04  ;
  83.   KucaInfo[i][kIzlazY] = 1340.17;
  84.   KucaInfo[i][kIzlazZ] = 1084.38 ;
  85.   SCM(playerid,grey,"Postavili ste Interier ove kuce na (ID:8)");
  86.   SacuvajKucu(i);
  87.  }
  88.   if(int == 9)
  89.  {
  90.   KucaInfo[i][kInt] = 15;
  91.   KucaInfo[i][kIzlazX] = -283.44  ;
  92.   KucaInfo[i][kIzlazY] = 1470.93 ;
  93.   KucaInfo[i][kIzlazZ] = 1084.38 ;
  94.   SCM(playerid,grey,"Postavili ste Interier ove kuce na (ID:9)");
  95.   SacuvajKucu(i);
  96.  }
  97.   if(int == 10)
  98.  {
  99.   KucaInfo[i][kInt] = 4;
  100.   KucaInfo[i][kIzlazX] = -260.49  ;
  101.   KucaInfo[i][kIzlazY] = 1456.75 ;
  102.   KucaInfo[i][kIzlazZ] = 1084.37 ;
  103.   SCM(playerid,grey,"Postavili ste Interier ove kuce na (ID:10)");
  104.   SacuvajKucu(i);
  105.  }
  106.   if(int == 11)
  107.  {
  108.   KucaInfo[i][kInt] = 9;
  109.   KucaInfo[i][kIzlazX] = 83.03   ;
  110.   KucaInfo[i][kIzlazY] = 1322.28 ;
  111.   KucaInfo[i][kIzlazZ] = 1083.87 ;
  112.   SCM(playerid,grey,"Postavili ste Interier ove kuce na (ID:11)");
  113.   SacuvajKucu(i);
  114.  }
  115.   if(int == 12)
  116.  {
  117.   KucaInfo[i][kInt] = 9;
  118.   KucaInfo[i][kIzlazX] = 2317.89   ;
  119.   KucaInfo[i][kIzlazY] = -1026.76 ;
  120.   KucaInfo[i][kIzlazZ] = 1050.22 ;
  121.   SCM(playerid,grey,"Postavili ste Interier ove kuce na (ID:12)");
  122.   SacuvajKucu(i);
  123.  }
  124.   if(int == 13)
  125.  {
  126.   KucaInfo[i][kInt] = 8;
  127.   KucaInfo[i][kIzlazX] = 2807.48   ;
  128.   KucaInfo[i][kIzlazY] = -1174.76 ;
  129.   KucaInfo[i][kIzlazZ] = 1025.57 ;
  130.   SCM(playerid,grey,"Postavili ste Interier ove kuce na (ID:13)");
  131.   SacuvajKucu(i);
  132.  }
  133.   if(int == 14)
  134.  {
  135.   KucaInfo[i][kInt] = 6;
  136.   KucaInfo[i][kIzlazX] = 2196.85   ;
  137.   KucaInfo[i][kIzlazY] = -1204.25 ;
  138.   KucaInfo[i][kIzlazZ] = 1049.02 ;
  139.   SCM(playerid,grey,"Postavili ste Interier ove kuce na (ID:14)");
  140.   SacuvajKucu(i);
  141.  }
  142.   if(int == 15)
  143.  {
  144.   KucaInfo[i][kInt] = 6;
  145.   KucaInfo[i][kIzlazX] = 2196.85   ;
  146.   KucaInfo[i][kIzlazY] = -1204.25 ;
  147.   KucaInfo[i][kIzlazZ] = 1049.02 ;
  148.   SCM(playerid,grey,"Postavili ste Interier ove kuce na (ID:15)");
  149.   SacuvajKucu(i);
  150.  }
  151.  if(int == 16)
  152.  {
  153.   KucaInfo[i][kInt] = 15;
  154.   KucaInfo[i][kIzlazX] = 377.15   ;
  155.   KucaInfo[i][kIzlazY] = 1417.41 ;
  156.   KucaInfo[i][kIzlazZ] = 1081.33 ;
  157.   SCM(playerid,grey,"Postavili ste Interier ove kuce na (ID:16)");
  158.   SacuvajKucu(i);
  159.  }
  160.   if(int == 17)
  161.  {
  162.   KucaInfo[i][kInt] = 10;
  163.   KucaInfo[i][kIzlazX] = 2270.38   ;
  164.   KucaInfo[i][kIzlazY] = -1210.35 ;
  165.   KucaInfo[i][kIzlazZ] = 1047.56 ;
  166.   SCM(playerid,grey,"Postavili ste Interier ove kuce na (ID:17)");
  167.   SacuvajKucu(i);
  168.  }
  169.   if(int == 18)
  170.  {
  171.   KucaInfo[i][kInt] = 2;
  172.   KucaInfo[i][kIzlazX] = 446.99  ;
  173.   KucaInfo[i][kIzlazY] = 1397.07 ;
  174.   KucaInfo[i][kIzlazZ] = 1084.30 ;
  175.   SCM(playerid,grey,"Postavili ste Interier ove kuce na (ID:18)");
  176.   SacuvajKucu(i);
  177.  }
  178.   if(int == 19)
  179.  {
  180.   KucaInfo[i][kInt] = 15;
  181.   KucaInfo[i][kIzlazX] = 387.22  ;
  182.   KucaInfo[i][kIzlazY] = 1471.70  ;
  183.   KucaInfo[i][kIzlazZ] = 1080.19  ;
  184.   SCM(playerid,grey,"Postavili ste Interier ove kuce na (ID:19)");
  185.   SacuvajKucu(i);
  186.  }
  187.   if(int == 20)
  188.  {
  189.   KucaInfo[i][kInt] = 8;
  190.   KucaInfo[i][kIzlazX] = 2365.31  ;
  191.   KucaInfo[i][kIzlazY] = -1135.60  ;
  192.   KucaInfo[i][kIzlazZ] = 1050.88  ;
  193.   SCM(playerid,grey,"Postavili ste Interier ove kuce na (ID:20)");
  194.   SacuvajKucu(i);
  195.  }
  196.  if(int == 21)
  197.  {
  198.   KucaInfo[i][kInt] = 2;
  199.   KucaInfo[i][kIzlazX] = 2237.59  ;
  200.   KucaInfo[i][kIzlazY] = -1081.64  ;
  201.   KucaInfo[i][kIzlazZ] = 1049.02  ;
  202.   SCM(playerid,grey,"Postavili ste Interier ove kuce na (ID:21)");
  203.   SacuvajKucu(i);
  204.  }
  205.   if(int == 22)
  206.  {
  207.   KucaInfo[i][kInt] = 15;
  208.   KucaInfo[i][kIzlazX] = 295.04  ;
  209.   KucaInfo[i][kIzlazY] = 1472.26  ;
  210.   KucaInfo[i][kIzlazZ] = 1080.26  ;
  211.   SCM(playerid,grey,"Postavili ste Interier ove kuce na (ID:22)");
  212.   SacuvajKucu(i);
  213.  }
  214.  if(int == 23)
  215.  {
  216.   KucaInfo[i][kInt] = 4;
  217.   KucaInfo[i][kIzlazX] = 261.12 ;
  218.   KucaInfo[i][kIzlazY] = 1284.30  ;
  219.   KucaInfo[i][kIzlazZ] = 1080.26  ;
  220.   SCM(playerid,grey,"Postavili ste Interier ove kuce na (ID:23)");
  221.   SacuvajKucu(i);
  222.  }
  223.   if(int == 24)
  224.  {
  225.   KucaInfo[i][kInt] = 4;
  226.   KucaInfo[i][kIzlazX] = 221.92 ;
  227.   KucaInfo[i][kIzlazY] = 1140.20  ;
  228.   KucaInfo[i][kIzlazZ] = 1082.61  ;
  229.   SCM(playerid,grey,"Postavili ste Interier ove kuce na (ID:24)");
  230.   SacuvajKucu(i);
  231.  }
  232.   if(int == 25)
  233.  {
  234.   KucaInfo[i][kInt] = 9;
  235.   KucaInfo[i][kIzlazX] = 260.85 ;
  236.   KucaInfo[i][kIzlazY] = 1237.24  ;
  237.   KucaInfo[i][kIzlazZ] = 1084.26  ;
  238.   SCM(playerid,grey,"Postavili ste Interier ove kuce na (ID:25)");
  239.   SacuvajKucu(i);
  240.  }
  241.  //small
  242.   if(int == 26)
  243.  {
  244.   KucaInfo[i][kInt] = 1;
  245.   KucaInfo[i][kIzlazX] = 223.20 ;
  246.   KucaInfo[i][kIzlazY] = 1287.08  ;
  247.   KucaInfo[i][kIzlazZ] = 1082.14  ;
  248.   SCM(playerid,grey,"Postavili ste Interier ove kuce na (ID:26)");
  249.   SacuvajKucu(i);
  250.  }
  251.   if(int == 27)
  252.  {
  253.   KucaInfo[i][kInt] = 11;
  254.   KucaInfo[i][kIzlazX] = 2283.04 ;
  255.   KucaInfo[i][kIzlazY] = -1140.28  ;
  256.   KucaInfo[i][kIzlazZ] = 1050.90  ;
  257.   SCM(playerid,grey,"Postavili ste Interier ove kuce na (ID:27)");
  258.   SacuvajKucu(i);
  259.  }
  260.   if(int == 28)
  261.  {
  262.   KucaInfo[i][kInt] = 15;
  263.   KucaInfo[i][kIzlazX] = 328.05 ;
  264.   KucaInfo[i][kIzlazY] = 1477.73 ;
  265.   KucaInfo[i][kIzlazZ] = 1084.44  ;
  266.   SCM(playerid,grey,"Postavili ste Interier ove kuce na (ID:28)");
  267.   SacuvajKucu(i);
  268.  }
  269.   if(int == 29)
  270.  {
  271.   KucaInfo[i][kInt] = 1;
  272.   KucaInfo[i][kIzlazX] = 223.20 ;
  273.   KucaInfo[i][kIzlazY] = 1287.08 ;
  274.   KucaInfo[i][kIzlazZ] = 1082.14  ;
  275.   SCM(playerid,grey,"Postavili ste Interier ove kuce na (ID:29)");
  276.   SacuvajKucu(i);
  277.  }
  278.  if(int == 30)
  279.  {
  280.   KucaInfo[i][kInt] = 8;
  281.   KucaInfo[i][kIzlazX] = -42.59 ;
  282.   KucaInfo[i][kIzlazY] = 1405.47 ;
  283.   KucaInfo[i][kIzlazZ] = 1084.43  ;
  284.   SCM(playerid,grey,"Postavili ste Interier ove kuce na (ID:30)");
  285.   SacuvajKucu(i);
  286.  }
  287.   if(int == 31)
  288.  {
  289.   KucaInfo[i][kInt] = 4;
  290.   KucaInfo[i][kIzlazX] = 299.78 ;
  291.   KucaInfo[i][kIzlazY] = 309.89 ;
  292.   KucaInfo[i][kIzlazZ] = 1003.30  ;
  293.   SCM(playerid,grey,"Postavili ste Interier ove kuce na (ID:31)");
  294.   SacuvajKucu(i);
  295.  }
  296.   if(int == 32)
  297.  {
  298.   KucaInfo[i][kInt] = 6;
  299.   KucaInfo[i][kIzlazX] = 2308.77 ;
  300.   KucaInfo[i][kIzlazY] = -1212.94 ;
  301.   KucaInfo[i][kIzlazZ] = 1049.02  ;
  302.   SCM(playerid,grey,"Postavili ste Interier ove kuce na (ID:32)");
  303.   SacuvajKucu(i);
  304.  }
  305.   if(int == 33)
  306.  {
  307.   KucaInfo[i][kInt] = 5;
  308.   KucaInfo[i][kIzlazX] = 2233.64 ;
  309.   KucaInfo[i][kIzlazY] = -1115.26 ;
  310.   KucaInfo[i][kIzlazZ] = 1050.88  ;
  311.   SCM(playerid,grey,"Postavili ste Interier ove kuce na (ID:33)");
  312.   SacuvajKucu(i);
  313.  }
  314.   if(int == 34)
  315.  {
  316.   KucaInfo[i][kInt] = 1;
  317.   KucaInfo[i][kIzlazX] = 2218.40 ;
  318.   KucaInfo[i][kIzlazY] = -1076.18 ;
  319.   KucaInfo[i][kIzlazZ] = 1050.48  ;
  320.   SCM(playerid,grey,"Postavili ste Interier ove kuce na (ID:34)");
  321.   SacuvajKucu(i);
  322.  }
  323.   if(int == 35)
  324.  {
  325.   KucaInfo[i][kInt] = 2;
  326.   KucaInfo[i][kIzlazX] = 266.50 ;
  327.   KucaInfo[i][kIzlazY] = 304.90  ;
  328.   KucaInfo[i][kIzlazZ] = 999.15  ;
  329.   SCM(playerid,grey,"Postavili ste Interier ove kuce na (ID:35)");
  330.   SacuvajKucu(i);
  331.  }
  332.   if(int == 36)
  333.  {
  334.   KucaInfo[i][kInt] = 6;
  335.   KucaInfo[i][kIzlazX] = 343.81 ;
  336.   KucaInfo[i][kIzlazY] = 304.86  ;
  337.   KucaInfo[i][kIzlazZ] = 999.15  ;
  338.   SCM(playerid,grey,"Postavili ste Interier ove kuce na (ID:36)");
  339.   SacuvajKucu(i);
  340.  }
  341.   if(int == 37)
  342.  {
  343.   KucaInfo[i][kInt] = 10;
  344.   KucaInfo[i][kIzlazX] = 2259.38 ;
  345.   KucaInfo[i][kIzlazY] = -1135.77  ;
  346.   KucaInfo[i][kIzlazZ] = 1050.64   ;
  347.   SCM(playerid,grey,"Postavili ste Interier ove kuce na (ID:37)");
  348.   SacuvajKucu(i);
  349.  }
  350.  
  351.  }
  352.  }
  353.  
  354.  return 1;
  355. }
  356. ////////////////////////////////////////////////////////////////////////////////////////
  357. CMD:enterhouse(playerid,params[])
  358. {
  359.  if(PlayerInfo[playerid][pAdmin] < 5) return SCM(playerid,grey,"Niste ovlasceni !");
  360.  {
  361.  for(new i; i < MAX_HOUSE; i++)
  362.  {
  363.  if(IsPlayerInRangeOfPoint(playerid, 3.0, KucaInfo[i][kUlazX], KucaInfo[i][kUlazY], KucaInfo[i][kUlazZ]))
  364.  {
  365.  SetPlayerVirtualWorld(playerid, KucaInfo[i][kVW]);
  366.  SetPlayerInterior(playerid, KucaInfo[i][kInt]);
  367.  SetPlayerPos(playerid, KucaInfo[i][kIzlazX], KucaInfo[i][kIzlazY], KucaInfo[i][kIzlazZ]);
  368.  }
  369.  }
  370.  }
  371.  return 1;
  372. }
  373. ///////////////////////////////////////////////////////////////////////
  374. // debug
  375.  
  376. [01:33:15] [debug] #0 0039693c in public cmd_enterhouse (0, 26144032) from MarkelaMod.amx
  377. [01:33:15] [debug] #1 native CallLocalFunction () from samp-serverrafa.exe
  378. [01:33:15] [debug] #2 00000848 in public OnPlayerCommandText (0, 26143984) from MarkelaMod.amx
  379. [01:33:28] [debug] Run time error 4: "Array index out of bounds"
  380. [01:33:28] [debug]  Accessing element at index 501 past array upper bound 500
  381. [01:33:28] [debug] AMX backtrace:
  382. [01:33:28] [debug] #0 00393090 in public cmd_editinthouse (0, 26144052) from MarkelaMod.amx
  383. [01:33:28] [debug] #1 native CallLocalFunction () from samp-serverrafa.exe
  384. [01:33:28] [debug] #2 0000094c in public OnPlayerCommandText (0, 26143984) from MarkelaMod.amx
  385. [01:34:14] [part] Markela has left the server (0:1)
Advertisement
Add Comment
Please, Sign In to add comment