Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Sistema Basico para Listagem de Interiores
- //By: k2bi_YT
- #include <a_samp>
- #include <Pawn.CMD>
- #define FILTERSCRIPT
- #if defined FILTERSCRIPT
- public OnFilterScriptInit()
- {
- print("\n\n***********************************************************\n");
- print("| By: k2bi_YT |");
- print(" [FilterScript] Seleção de Interiores Carregado com sucesso!");
- print("| By: k2bi_YT |");
- print("\n***********************************************************\n\n");
- return 1;
- }
- #define K2::%0(%1) forward %0(%1);\
- public %0(%1)
- new Listagem[MAX_PLAYERS];
- enum FSInt
- {
- InteriorName[50],
- Float:X,
- Float:Y,
- Float:Z,
- Interior,
- Lista
- };
- new Interiores[][FSInt] =
- {
- {"Kickstart Stadium", -1410.72,1591.16,1052.53, 14, 1},
- {"Campo de Guerra", -1079.99,1061.58,1343.04, 10, 2},
- {"Arena Cross", -1395.958,-208.197,1051.170, 7, 3},
- {"Arena Bike", -1424.9319,-664.5869,1059.8585, 4, 4},
- {"24/7 - 1", -25.9423, -185.9284, 1003.7457, 17, 5},
- {"24/7 - 2", 5.7279, -30.1459, 1003.7467, 10, 6},
- {"24/7 - 3", -30.9134, -91.2362, 1003.7469, 18, 7},
- {"24/7 - 4", -25.8434, -140.4682, 1003.7463, 16, 8},
- {"24/7 - 5", -27.3693, -30.2188, 1003.8464, 4, 9},
- {"24/7 - 6", -27.3599, -57.0132, 1003.8460, 6, 10},
- {"Ammu Nation SF", 285.4198, -40.0557, 1001.8151, 1, 11},
- {"Ammu Nation LV", 286.1476, -84.7087, 1001.9285, 4, 12},
- {"Ammu Nation Angel Pine SF", 296.8592, -110.7661, 1001.9582, 6, 13},
- {"Ammu Nation 2 Andares", 315.5938, -142.6737, 999.8000, 7, 14},
- {"Ammu Nation El Quebrados", 316.4774, -168.1234, 999.8909, 6, 15},
- {"Ammu Nation Estande de Tiro", 302.292877, -143.139099, 1004.062500, 7, 16},
- {"Conveniencia de Posto", 664.19,-570.73,16.34, 0, 17},
- {"Rusty Brown's Donuts", 376.99,-191.21,1000.63, 17, 18},
- {"Saida Aeroporto Internacional", -1830.81,16.83,1061.14, 14, 19},
- {"Motel Jefferson", 2220.26,-1148.01,1025.80, 15, 20},
- {"Bagagens Aero Porto Internacional", -1870.80, 59.81, 1056.25, 14, 21},
- {"Casa do Ryder", 2451.77,-1699.80,1013.51, 2, 22},
- {"Pub", 681.66,-453.32,-25.61, 1, 23},
- {"Zero RC Shop", -2240.00,131.00,1035.40, 6, 24},
- {"Tatto", -203.0764,-24.1658,1002.2734, 16, 25},
- {"Burger Shot", 363.4129,-74.5786,1001.5078, 10, 26},
- {"Well Stacked Pizza", 372.3520,-131.6510,1001.4922, 5, 27},
- {"Cluckin' Bell", 365.7158,-9.8873,1001.8516, 9, 28},
- {"Caligulas Casino", 2233.8032, 1712.2303, 1011.7632, 1, 29},
- {"Casino", 1118.8878,-10.2737,1002.0859, 12, 30},
- {"Four Dragons Casino", 2016.2699, 1017.7790, 996.8750, 10, 31},
- {"Academia LS", 771.6130, -2.7349, 1000.8080, 5, 32},
- {"Academia SF", 768.4251, -37.9545, 1000.9843, 6, 33},
- {"Academia LV", 773.5867, -75.4854, 1000.9478, 7, 34},
- {"Casa de Apostas", 833.3909, 7.3095, 1004.3746, 3, 35},
- {"Motel", 963.5654, -53.0267, 1001.5135, 3, 36},
- {"Motel 2", 941.4691, -16.2798, 1001.9398, 3, 37},
- {"Puteiro", 1208.4030, -11.1789, 1001.9225, 2, 38},
- {"Armazem", 1286.9550, -17.5530, 1002.9039, 0, 39},
- {"Armazem Vazio", 1401.0801, -12.0454, 1002.8927, 1, 40},
- {"Bar", 502.7398, -70.7305, 998.9508, 11, 41},
- {"Balada", 488.0612, -15.3945, 1001.1556, 17, 42},
- {"SubUrban", 204.7000, -45.4901, 1001.9353, 1, 43},
- {"Binco", 207.8036, -106.5122, 1005.1501, 15, 44},
- {"Pro-Laps", 206.8884, -136.3246, 1002.9662, 3, 45},
- {"DS", 204.3314, -165.5309, 1000.6178, 14, 46},
- {"ZIP", 161.7886, -94.2764, 1002.8009, 0, 47},
- {"Victim", 225.8927, -8.4293, 1002.2307, 5, 48},
- {"Loco Low LS", 616.7820,-74.8151, 997.6350, 2, 49},
- {"Wheel Arch Angels", 615.2851,-124.2390,997.6350, 3, 50},
- {"Transfender", 617.5380, -1.9900, 1000.6829, 1, 51},
- {"Casa 1", 235.4227, 1187.9962, 1080.3564, 3, 52},
- {"Casa 2", 225.1174, 1240.1389, 1082.5353, 2, 53},
- {"Casa 3", 223.2494, 1288.4028, 1082.5355, 1, 54},
- {"Casa 4", 225.6445, 1023.8162, 1084.5031, 7, 55},
- {"Casa 5", 295.3956, 1474.2166, 1080.4376, 15, 56},
- {"Casa 6", 328.0774, 1479.3639, 1084.6354, 15, 57},
- {"Casa 7", 385.4252, 1471.6716, 1080.5425, 15, 58},
- {"Casa 8", 380.9062, 1466.2152, 1080.1829, 15, 59},
- {"Casa 9", 446.9320, 1400.8756, 1084.3019, 2, 60},
- {"Casa 10", 446.3732, 509.0471, 1001.4163, 12, 61},
- {"Casa 11", 295.5905, 1478.4093, 1080.2583, 15, 62},
- {"Casa 12", 139.3309, 1368.9408, 1083.8602, 5, 63},
- {"Casa 13", 84.4217, 1323.7705, 1083.8611, 9, 64},
- {"Casa 14", 24.4360, 1341.8451, 1084.3688, 10, 65},
- {"Casa 15", -68.9299, 1353.0726, 1080.2123, 6, 66},
- {"House +18", 745.7979, 1440.9464, 1102.7001, 6, 67},
- {"Casa 17", 234.6448, 1066.9340, 1084.2025, 6, 68},
- {"Casa 18", 229.7284, 1114.4078, 1080.9872, 5, 69},
- {"Quarto Golden Bed Motel", 2251.5356, -1139.0465, 1050.8318, 9, 70},
- {"Hashbury House", 2260.5166, -1210.0226, 1049.5371, 10, 71},
- {"Johnsons House", 2496.1089, -1694.0446, 1014.9439, 3, 72},
- {"Mansao Madd Doggs", 1298.8080, -794.7337, 1084.2444, 5, 73},
- {"Quarto Red Bed Motel", 2261.0967, -1136.2394, 1050.8322, 10, 74},
- {"Verdant Bluffs Safehouse", 2365.3169, -1134.3051, 1051.7450, 8, 75},
- {"Casa Segura Nao Usada", 2324.6868, -1146.9592, 1050.9134, 12, 76},
- {"Casa Queimada", 2350.6614, -1180.9188, 1028.5739, 5, 77},
- {"Casa Tio Sam", 2807.63,-1170.15, 1025.57, 8, 78},
- {"Palacio Jizzy's", -2637.69,1404.24,906.46, 3, 79},
- {"Garagem San Fierro", -2042.42,178.59,28.84, 1, 80},
- {"Casa do Sweets", 2535.83,-1674.32,1015.50, 1, 81},
- {"Apartamento Woozies", -2158.72,641.29,1052.38, 1, 82},
- {"Casa de Crack", 318.565,1115.210,1082.98, 5, 83},
- {"Quarto Pequeno", 247.2933, 303.7934, 999.1485, 1, 84},
- {"Quarto Pequeno 2", 269.9006, 304.4876, 999.1475, 2, 85},
- {"Celeiro", 291.4038, 310.0945, 999.1482, 3, 86},
- {"Fazenda", 302.1178, 309.0974, 1003.2997, 4, 87},
- {"Quarto Sexual", 347.4583, 308.7669, 999.1468, 8},
- {"Departamento SF", 246.40,110.84,1003.22, 10, 89},
- {"Departamento LS", 246.8182, 64.2112, 1003.6406, 6, 90},
- {"Departamento LV", 238.7373, 141.8880, 1003.0234, 3, 91},
- {"Departamento Geral", 366.1646, 174.2116, 1008.3804, 3, 92},
- {"Departamento LV", 321.6228, 304.6485, 999.1475, 5, 93}
- };
- public OnPlayerSpawn(playerid)
- {
- SendClientMessage(playerid, 0xFFFF0AAA, "[FS Interiores]: Para ver todos os interiores disponíveis, use: /interiores.");
- SendClientMessage(playerid, 0xFFFF0AAA, "[FS Interiores]: Para salvar o interior, use: /sinterior.");
- Listagem[playerid] = 0;
- return 1;
- }
- public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
- {
- if(newkeys & KEY_YES)
- {
- if(Listagem[playerid])
- {
- Listagem[playerid]++;
- ProxList(playerid);
- }
- }
- if(newkeys & KEY_NO)
- {
- if(Listagem[playerid])
- {
- Listagem[playerid]--;
- ProxList(playerid);
- }
- }
- return 1;
- }
- K2::ProxList(playerid)
- {
- new i = Listagem[playerid], str[128];
- switch(Listagem[playerid])
- {
- case 1..93:
- {
- SetPlayerPos(playerid, Interiores[i][X], Interiores[i][Y], Interiores[i][Z]);
- SetPlayerInterior(playerid, Interiores[i][Interior]);
- format(str, sizeof(str), "Nome: %s | Interior ID: %d", Interiores[i][InteriorName], Interiores[Listagem[playerid]][Interior]);
- SendClientMessage(playerid, 0x4CEA9BAA, str);
- }
- default:
- {
- Listagem[playerid] = 0;
- SetPlayerPos(playerid, 2489.6042, -1667.4849, 13.9405);
- SetPlayerInterior(playerid, 0);
- SetPlayerVirtualWorld(playerid, 0);
- SendClientMessage(playerid, 0x4CEA9BAA, "Erro ao tentar conectar com o próximo interior.");
- }
- }
- return 1;
- }
- CMD:sinterior(playerid)
- {
- if(Listagem[playerid] > 1 && Listagem[playerid] < 94)
- {
- new str[256];
- new i = Listagem[playerid];
- format(str, sizeof(str), "Int Nome: %s | Interior ID: %d | Coord: %f, %f, %f", Interiores[i][InteriorName],
- Interiores[i][Interior], Interiores[i][X], Interiores[i][Y], Interiores[i][Z]);
- SInteriores(str);
- SendClientMessage(playerid, 0xF07F0EAA, "Interior salvo com sucesso!");
- return 1;
- }
- return 1;
- }
- CMD:interiores(playerid)
- {
- Listagem[playerid] = 1;
- ProxList(playerid);
- return 1;
- }
- stock SInteriores(const string[])
- {
- new entry[256], strlog[128];
- format(entry, sizeof(entry), "%s\r\n",string);
- new File:hFile;
- format(strlog, sizeof strlog, "Interiores.ini");
- hFile = fopen(strlog, io_append);
- fwrite(hFile, entry);
- fclose(hFile);
- return 0;
- }
- #endif
Add Comment
Please, Sign In to add comment