Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CMD:editinthouse(playerid,params[])
- {
- if(PlayerInfo[playerid][pAdmin] < 1337) return SCM(playerid,grey,"Niste ovlasceni da koristite tu komandu !");
- new int;
- if(sscanf(params, "i",int))
- {
- SCM(playerid,-1,"KORISCENJE: /edithouseint [Id Interiera]");
- SCM(playerid,-1,"INTERIJERI : Big Interiors 1-5 | Medium Interiors 6-25 | Small Interiors 26-37");
- return 1;
- }
- for(new i; i < MAX_HOUSE; i++)
- {
- if(IsPlayerInRangeOfPoint(playerid, 3.0, KucaInfo[i][kUlazX], KucaInfo[i][kUlazY], KucaInfo[i][kUlazZ]))
- {
- if(int == 1)
- {
- KucaInfo[i][kInt] = 5;
- KucaInfo[i][kIzlazX] = 140.17;
- KucaInfo[i][kIzlazY] = 1366.07;
- KucaInfo[i][kIzlazZ] = 1083.65;
- SCM(playerid,grey,"Postavili ste Interier ove kuce na (ID:1)");
- SacuvajKucu(i);
- }
- if(int == 2)
- {
- KucaInfo[i][kInt] = 12;
- KucaInfo[i][kIzlazX] = 2324.53;
- KucaInfo[i][kIzlazY] = -1149.54;
- KucaInfo[i][kIzlazZ] = 1050.71;
- SCM(playerid,grey,"Postavili ste Interier ove kuce na (ID:2)");
- SacuvajKucu(i);
- }
- if(int == 3)
- {
- KucaInfo[i][kInt] = 7;
- KucaInfo[i][kIzlazX] = 225.68;
- KucaInfo[i][kIzlazY] = 1021.45;
- KucaInfo[i][kIzlazZ] = 1084.02;
- SCM(playerid,grey,"Postavili ste Interier ove kuce na (ID:3)");
- SacuvajKucu(i);
- }
- if(int == 4)
- {
- KucaInfo[i][kInt] = 6;
- KucaInfo[i][kIzlazX] = 234.19;
- KucaInfo[i][kIzlazY] = 1063.73;
- KucaInfo[i][kIzlazZ] = 1084.21;
- SCM(playerid,grey,"Postavili ste Interier ove kuce na (ID:4)");
- SacuvajKucu(i);
- }
- if(int == 5)
- {
- KucaInfo[i][kInt] = 5;
- KucaInfo[i][kIzlazX] = 226.30;
- KucaInfo[i][kIzlazY] = 1114.24;
- KucaInfo[i][kIzlazZ] = 1080.99;
- SCM(playerid,grey,"Postavili ste Interier ove kuce na (ID:5)");
- SacuvajKucu(i);
- }
- //medium
- if(int == 6)
- {
- KucaInfo[i][kInt] = 3;
- KucaInfo[i][kIzlazX] = 235.34 ;
- KucaInfo[i][kIzlazY] = 1186.68;
- KucaInfo[i][kIzlazZ] = 1080.26;
- SCM(playerid,grey,"Postavili ste Interier ove kuce na (ID:6)");
- SacuvajKucu(i);
- }
- if(int == 7)
- {
- KucaInfo[i][kInt] = 2;
- KucaInfo[i][kIzlazX] = 491.07 ;
- KucaInfo[i][kIzlazY] = 1398.50;
- KucaInfo[i][kIzlazZ] = 1080.26;
- SCM(playerid,grey,"Postavili ste Interier ove kuce na (ID:7)");
- SacuvajKucu(i);
- }
- if(int == 8)
- {
- KucaInfo[i][kInt] = 10;
- KucaInfo[i][kIzlazX] = 24.04 ;
- KucaInfo[i][kIzlazY] = 1340.17;
- KucaInfo[i][kIzlazZ] = 1084.38 ;
- SCM(playerid,grey,"Postavili ste Interier ove kuce na (ID:8)");
- SacuvajKucu(i);
- }
- if(int == 9)
- {
- KucaInfo[i][kInt] = 15;
- KucaInfo[i][kIzlazX] = -283.44 ;
- KucaInfo[i][kIzlazY] = 1470.93 ;
- KucaInfo[i][kIzlazZ] = 1084.38 ;
- SCM(playerid,grey,"Postavili ste Interier ove kuce na (ID:9)");
- SacuvajKucu(i);
- }
- if(int == 10)
- {
- KucaInfo[i][kInt] = 4;
- KucaInfo[i][kIzlazX] = -260.49 ;
- KucaInfo[i][kIzlazY] = 1456.75 ;
- KucaInfo[i][kIzlazZ] = 1084.37 ;
- SCM(playerid,grey,"Postavili ste Interier ove kuce na (ID:10)");
- SacuvajKucu(i);
- }
- if(int == 11)
- {
- KucaInfo[i][kInt] = 9;
- KucaInfo[i][kIzlazX] = 83.03 ;
- KucaInfo[i][kIzlazY] = 1322.28 ;
- KucaInfo[i][kIzlazZ] = 1083.87 ;
- SCM(playerid,grey,"Postavili ste Interier ove kuce na (ID:11)");
- SacuvajKucu(i);
- }
- if(int == 12)
- {
- KucaInfo[i][kInt] = 9;
- KucaInfo[i][kIzlazX] = 2317.89 ;
- KucaInfo[i][kIzlazY] = -1026.76 ;
- KucaInfo[i][kIzlazZ] = 1050.22 ;
- SCM(playerid,grey,"Postavili ste Interier ove kuce na (ID:12)");
- SacuvajKucu(i);
- }
- if(int == 13)
- {
- KucaInfo[i][kInt] = 8;
- KucaInfo[i][kIzlazX] = 2807.48 ;
- KucaInfo[i][kIzlazY] = -1174.76 ;
- KucaInfo[i][kIzlazZ] = 1025.57 ;
- SCM(playerid,grey,"Postavili ste Interier ove kuce na (ID:13)");
- SacuvajKucu(i);
- }
- if(int == 14)
- {
- KucaInfo[i][kInt] = 6;
- KucaInfo[i][kIzlazX] = 2196.85 ;
- KucaInfo[i][kIzlazY] = -1204.25 ;
- KucaInfo[i][kIzlazZ] = 1049.02 ;
- SCM(playerid,grey,"Postavili ste Interier ove kuce na (ID:14)");
- SacuvajKucu(i);
- }
- if(int == 15)
- {
- KucaInfo[i][kInt] = 6;
- KucaInfo[i][kIzlazX] = 2196.85 ;
- KucaInfo[i][kIzlazY] = -1204.25 ;
- KucaInfo[i][kIzlazZ] = 1049.02 ;
- SCM(playerid,grey,"Postavili ste Interier ove kuce na (ID:15)");
- SacuvajKucu(i);
- }
- if(int == 16)
- {
- KucaInfo[i][kInt] = 15;
- KucaInfo[i][kIzlazX] = 377.15 ;
- KucaInfo[i][kIzlazY] = 1417.41 ;
- KucaInfo[i][kIzlazZ] = 1081.33 ;
- SCM(playerid,grey,"Postavili ste Interier ove kuce na (ID:16)");
- SacuvajKucu(i);
- }
- if(int == 17)
- {
- KucaInfo[i][kInt] = 10;
- KucaInfo[i][kIzlazX] = 2270.38 ;
- KucaInfo[i][kIzlazY] = -1210.35 ;
- KucaInfo[i][kIzlazZ] = 1047.56 ;
- SCM(playerid,grey,"Postavili ste Interier ove kuce na (ID:17)");
- SacuvajKucu(i);
- }
- if(int == 18)
- {
- KucaInfo[i][kInt] = 2;
- KucaInfo[i][kIzlazX] = 446.99 ;
- KucaInfo[i][kIzlazY] = 1397.07 ;
- KucaInfo[i][kIzlazZ] = 1084.30 ;
- SCM(playerid,grey,"Postavili ste Interier ove kuce na (ID:18)");
- SacuvajKucu(i);
- }
- if(int == 19)
- {
- KucaInfo[i][kInt] = 15;
- KucaInfo[i][kIzlazX] = 387.22 ;
- KucaInfo[i][kIzlazY] = 1471.70 ;
- KucaInfo[i][kIzlazZ] = 1080.19 ;
- SCM(playerid,grey,"Postavili ste Interier ove kuce na (ID:19)");
- SacuvajKucu(i);
- }
- if(int == 20)
- {
- KucaInfo[i][kInt] = 8;
- KucaInfo[i][kIzlazX] = 2365.31 ;
- KucaInfo[i][kIzlazY] = -1135.60 ;
- KucaInfo[i][kIzlazZ] = 1050.88 ;
- SCM(playerid,grey,"Postavili ste Interier ove kuce na (ID:20)");
- SacuvajKucu(i);
- }
- if(int == 21)
- {
- KucaInfo[i][kInt] = 2;
- KucaInfo[i][kIzlazX] = 2237.59 ;
- KucaInfo[i][kIzlazY] = -1081.64 ;
- KucaInfo[i][kIzlazZ] = 1049.02 ;
- SCM(playerid,grey,"Postavili ste Interier ove kuce na (ID:21)");
- SacuvajKucu(i);
- }
- if(int == 22)
- {
- KucaInfo[i][kInt] = 15;
- KucaInfo[i][kIzlazX] = 295.04 ;
- KucaInfo[i][kIzlazY] = 1472.26 ;
- KucaInfo[i][kIzlazZ] = 1080.26 ;
- SCM(playerid,grey,"Postavili ste Interier ove kuce na (ID:22)");
- SacuvajKucu(i);
- }
- if(int == 23)
- {
- KucaInfo[i][kInt] = 4;
- KucaInfo[i][kIzlazX] = 261.12 ;
- KucaInfo[i][kIzlazY] = 1284.30 ;
- KucaInfo[i][kIzlazZ] = 1080.26 ;
- SCM(playerid,grey,"Postavili ste Interier ove kuce na (ID:23)");
- SacuvajKucu(i);
- }
- if(int == 24)
- {
- KucaInfo[i][kInt] = 4;
- KucaInfo[i][kIzlazX] = 221.92 ;
- KucaInfo[i][kIzlazY] = 1140.20 ;
- KucaInfo[i][kIzlazZ] = 1082.61 ;
- SCM(playerid,grey,"Postavili ste Interier ove kuce na (ID:24)");
- SacuvajKucu(i);
- }
- if(int == 25)
- {
- KucaInfo[i][kInt] = 9;
- KucaInfo[i][kIzlazX] = 260.85 ;
- KucaInfo[i][kIzlazY] = 1237.24 ;
- KucaInfo[i][kIzlazZ] = 1084.26 ;
- SCM(playerid,grey,"Postavili ste Interier ove kuce na (ID:25)");
- SacuvajKucu(i);
- }
- //small
- if(int == 26)
- {
- KucaInfo[i][kInt] = 1;
- KucaInfo[i][kIzlazX] = 223.20 ;
- KucaInfo[i][kIzlazY] = 1287.08 ;
- KucaInfo[i][kIzlazZ] = 1082.14 ;
- SCM(playerid,grey,"Postavili ste Interier ove kuce na (ID:26)");
- SacuvajKucu(i);
- }
- if(int == 27)
- {
- KucaInfo[i][kInt] = 11;
- KucaInfo[i][kIzlazX] = 2283.04 ;
- KucaInfo[i][kIzlazY] = -1140.28 ;
- KucaInfo[i][kIzlazZ] = 1050.90 ;
- SCM(playerid,grey,"Postavili ste Interier ove kuce na (ID:27)");
- SacuvajKucu(i);
- }
- if(int == 28)
- {
- KucaInfo[i][kInt] = 15;
- KucaInfo[i][kIzlazX] = 328.05 ;
- KucaInfo[i][kIzlazY] = 1477.73 ;
- KucaInfo[i][kIzlazZ] = 1084.44 ;
- SCM(playerid,grey,"Postavili ste Interier ove kuce na (ID:28)");
- SacuvajKucu(i);
- }
- if(int == 29)
- {
- KucaInfo[i][kInt] = 1;
- KucaInfo[i][kIzlazX] = 223.20 ;
- KucaInfo[i][kIzlazY] = 1287.08 ;
- KucaInfo[i][kIzlazZ] = 1082.14 ;
- SCM(playerid,grey,"Postavili ste Interier ove kuce na (ID:29)");
- SacuvajKucu(i);
- }
- if(int == 30)
- {
- KucaInfo[i][kInt] = 8;
- KucaInfo[i][kIzlazX] = -42.59 ;
- KucaInfo[i][kIzlazY] = 1405.47 ;
- KucaInfo[i][kIzlazZ] = 1084.43 ;
- SCM(playerid,grey,"Postavili ste Interier ove kuce na (ID:30)");
- SacuvajKucu(i);
- }
- if(int == 31)
- {
- KucaInfo[i][kInt] = 4;
- KucaInfo[i][kIzlazX] = 299.78 ;
- KucaInfo[i][kIzlazY] = 309.89 ;
- KucaInfo[i][kIzlazZ] = 1003.30 ;
- SCM(playerid,grey,"Postavili ste Interier ove kuce na (ID:31)");
- SacuvajKucu(i);
- }
- if(int == 32)
- {
- KucaInfo[i][kInt] = 6;
- KucaInfo[i][kIzlazX] = 2308.77 ;
- KucaInfo[i][kIzlazY] = -1212.94 ;
- KucaInfo[i][kIzlazZ] = 1049.02 ;
- SCM(playerid,grey,"Postavili ste Interier ove kuce na (ID:32)");
- SacuvajKucu(i);
- }
- if(int == 33)
- {
- KucaInfo[i][kInt] = 5;
- KucaInfo[i][kIzlazX] = 2233.64 ;
- KucaInfo[i][kIzlazY] = -1115.26 ;
- KucaInfo[i][kIzlazZ] = 1050.88 ;
- SCM(playerid,grey,"Postavili ste Interier ove kuce na (ID:33)");
- SacuvajKucu(i);
- }
- if(int == 34)
- {
- KucaInfo[i][kInt] = 1;
- KucaInfo[i][kIzlazX] = 2218.40 ;
- KucaInfo[i][kIzlazY] = -1076.18 ;
- KucaInfo[i][kIzlazZ] = 1050.48 ;
- SCM(playerid,grey,"Postavili ste Interier ove kuce na (ID:34)");
- SacuvajKucu(i);
- }
- if(int == 35)
- {
- KucaInfo[i][kInt] = 2;
- KucaInfo[i][kIzlazX] = 266.50 ;
- KucaInfo[i][kIzlazY] = 304.90 ;
- KucaInfo[i][kIzlazZ] = 999.15 ;
- SCM(playerid,grey,"Postavili ste Interier ove kuce na (ID:35)");
- SacuvajKucu(i);
- }
- if(int == 36)
- {
- KucaInfo[i][kInt] = 6;
- KucaInfo[i][kIzlazX] = 343.81 ;
- KucaInfo[i][kIzlazY] = 304.86 ;
- KucaInfo[i][kIzlazZ] = 999.15 ;
- SCM(playerid,grey,"Postavili ste Interier ove kuce na (ID:36)");
- SacuvajKucu(i);
- }
- if(int == 37)
- {
- KucaInfo[i][kInt] = 10;
- KucaInfo[i][kIzlazX] = 2259.38 ;
- KucaInfo[i][kIzlazY] = -1135.77 ;
- KucaInfo[i][kIzlazZ] = 1050.64 ;
- SCM(playerid,grey,"Postavili ste Interier ove kuce na (ID:37)");
- SacuvajKucu(i);
- }
- }
- }
- return 1;
- }
- ////////////////////////////////////////////////////////////////////////////////////////
- CMD:enterhouse(playerid,params[])
- {
- if(PlayerInfo[playerid][pAdmin] < 5) return SCM(playerid,grey,"Niste ovlasceni !");
- {
- for(new i; i < MAX_HOUSE; i++)
- {
- if(IsPlayerInRangeOfPoint(playerid, 3.0, KucaInfo[i][kUlazX], KucaInfo[i][kUlazY], KucaInfo[i][kUlazZ]))
- {
- SetPlayerVirtualWorld(playerid, KucaInfo[i][kVW]);
- SetPlayerInterior(playerid, KucaInfo[i][kInt]);
- SetPlayerPos(playerid, KucaInfo[i][kIzlazX], KucaInfo[i][kIzlazY], KucaInfo[i][kIzlazZ]);
- }
- }
- }
- return 1;
- }
- ///////////////////////////////////////////////////////////////////////
- // debug
- [01:33:15] [debug] #0 0039693c in public cmd_enterhouse (0, 26144032) from MarkelaMod.amx
- [01:33:15] [debug] #1 native CallLocalFunction () from samp-serverrafa.exe
- [01:33:15] [debug] #2 00000848 in public OnPlayerCommandText (0, 26143984) from MarkelaMod.amx
- [01:33:28] [debug] Run time error 4: "Array index out of bounds"
- [01:33:28] [debug] Accessing element at index 501 past array upper bound 500
- [01:33:28] [debug] AMX backtrace:
- [01:33:28] [debug] #0 00393090 in public cmd_editinthouse (0, 26144052) from MarkelaMod.amx
- [01:33:28] [debug] #1 native CallLocalFunction () from samp-serverrafa.exe
- [01:33:28] [debug] #2 0000094c in public OnPlayerCommandText (0, 26143984) from MarkelaMod.amx
- [01:34:14] [part] Markela has left the server (0:1)
Advertisement
Add Comment
Please, Sign In to add comment